1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
<Page x:Class="WpfBrowserApplication1.Page1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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"
mc:Ignorable="d"
d:DesignHeight="329" d:DesignWidth="603"
Title="Page1"
xmlns:local="clr-namespace:WpfBrowserApplication1">
<Page.Resources>
<ObjectDataProvider x:Key="TTypeValues"/>
</Page.Resources>
<Grid Height="340" Width="615">
<Button Content="save" Height="23" HorizontalAlignment="Left" Margin="342,20,0,0" Name="button2" VerticalAlignment="Top" Width="75" Click="button2_Click" />
<DataGrid AutoGenerateColumns="False" EnableRowVirtualization="True" Height="173" HorizontalAlignment="Left" ItemsSource="{Binding }" Margin="46,73,0,0" Name="tUsersDataGrid" RowDetailsVisibilityMode="VisibleWhenSelected" VerticalAlignment="Top" Width="527">
<DataGrid.Columns>
<DataGridTextColumn x:Name="usernameColumn" Binding="{Binding Path=username}" Header="username" Width="SizeToHeader" />
<DataGridTemplateColumn x:Name="ref_typeColumn" Header="ref type" Width="150">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<ComboBox ItemsSource="{Binding Source={StaticResource TTypeValues}}" DisplayMemberPath="nom_type" SelectedValuePath="id_type" SelectedValue="{Binding Path=ref_type, Mode=TwoWay}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Page> |
Partager