Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. <DataGridTextColumn Header="Name" binding={wont work in here as this element is bounded to the itemsource of the DataGrid} IsReadOnly="True" Width="150">
  2. <DataGridTextColumn.ElementStyle>
  3. <Style TargetType="TextBlock">
  4. <Setter Property="Text"
  5. Value="{Binding DataContext.CustomerCollection.Name}"></Setter>
  6. </Style>
  7. </DataGridTextColumn.ElementStyle>
  8. </DataGridTextColumn>
  9.  
  10. <DataGrid.Resources>
  11. <l:BindingProxy x:Key="proxy" Data="{Binding}" />
  12. </DataGrid.Resources>
  13.  
  14. <DataGridTextColumn.ElementStyle>
  15. <Style TargetType="TextBlock">
  16. <Setter Property="Text"
  17. Value="{Binding Data.Name, Source={StaticResource proxy}}"></Setter>
  18. </Style>
  19. </DataGridTextColumn.ElementStyle>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement