Permalink
Browse files

Using datagrid to show license information

  • Loading branch information...
1 parent 68dbd5e commit 79a4761fddf1bf2b5700ce642300d581eb2d2785 @HEskandari HEskandari committed Nov 6, 2010
@@ -104,6 +104,10 @@
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="WindowsBase" />
+ <Reference Include="WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\SharedLibs\WPFToolkit.dll</HintPath>
+ </Reference>
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
@@ -1,5 +1,6 @@
using System;
using System.IO;
+using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Windows;
using Caliburn.PresentationFramework.Filters;
@@ -138,7 +139,14 @@ public virtual ISaveFileDialogViewModel CreateSaveDialogModel()
public virtual void CopyToClipboard(string text)
{
- Clipboard.SetText(text, TextDataFormat.UnicodeText);
+ try
+ {
+ Clipboard.SetText(text, TextDataFormat.UnicodeText);
+ }
+ catch(COMException)
+ {
+ //May thorw COM exception
+ }
}
}
}
@@ -3,8 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:cal="http://www.caliburnproject.org"
- mc:Ignorable="d"
+ xmlns:cal="http://www.caliburnproject.org" xmlns:ctrl="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit" mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300" Padding="5">
<DockPanel LastChildFill="True">
@@ -76,8 +75,12 @@
</GroupBox>
<GroupBox Header="Issued Licenses" Grid.Row="1">
- <ListBox ItemsSource="{Binding CurrentProject.Product.IssuedLicenses}"
- ItemTemplate="{DynamicResource IssuedLicenseTemplate}" />
+ <!--<ListBox ItemsSource="{Binding CurrentProject.Product.IssuedLicenses}"
+ ItemTemplate="{DynamicResource IssuedLicenseTemplate}" />-->
+
+ <ctrl:DataGrid ItemsSource="{Binding CurrentProject.Product.IssuedLicenses}" AutoGenerateColumns="True">
+ </ctrl:DataGrid>
+
</GroupBox>
</Grid>
</DockPanel>
@@ -6,6 +6,7 @@
xmlns:cal="http://www.caliburnproject.org"
xmlns:lib="clr-namespace:Microsoft.Samples.KMoore.WPFSamples.Transition;assembly=J832.Wpf.BagOTricksLib"
mc:Ignorable="d"
+ WindowStartupLocation="CenterScreen"
Title="{Binding DisplayName}"
d:DesignHeight="300" d:DesignWidth="300"
Height="480" Width="640">

0 comments on commit 79a4761

Please sign in to comment.