SHARE
TWEET

Untitled

a guest May 19th, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <DataGrid Grid.Row="2"
  2.             Margin="5"
  3.             ItemsSource="{Binding Users}"
  4.             SelectedItem="{Binding SelectedUser}"
  5.             AutoGenerateColumns="False"
  6.             IsReadOnly="True">
  7.  
  8.             <DataGrid.InputBindings>
  9.                 <MouseBinding Gesture="LeftDoubleClick" Command="{Binding ItemClickCommand}"/>
  10.             </DataGrid.InputBindings>
  11.  
  12.             <DataGrid.Columns>
  13.                 <DataGridTextColumn Header="ID" Width="auto" Binding="{Binding Id}"/>
  14.                 <DataGridTextColumn Header="First name" Width="*" Binding="{Binding FirstName}"/>
  15.                 <DataGridTextColumn Header="Last Name" Width="*" Binding="{Binding LastName}"/>
  16.                 <DataGridTextColumn Header="Barcode" Width="*" Binding="{Binding Barcode}"/>
  17.                 <DataGridTextColumn Header="Birth Date" Width="*" Binding="{Binding BirthDate}"/>
  18.                 <DataGridTextColumn Header="Email" Width="*" Binding="{Binding Email}"/>
  19.                 <DataGridTextColumn Header="Phone number" Width="*" Binding="{Binding PhoneNumber}"/>
  20.                 <DataGridTextColumn Header="Registration date" Width="*" Binding="{Binding RegistrationDate}"/>
  21.                 <DataGridTextColumn Header="Role" Width="*" Binding="{Binding Role}"/>
  22.             </DataGrid.Columns>
  23.  
  24.             <DataGrid.RowHeaderTemplate>
  25.                 <DataTemplate>
  26.                     <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=DataGridRow},
  27.                         Converter={StaticResource DataGridRowNumberConverter}}"
  28.                         Margin="2,0,2,0"/>
  29.                 </DataTemplate>
  30.             </DataGrid.RowHeaderTemplate>
  31.  
  32.         </DataGrid>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top