Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <DataGridTextColumn Header="Name" binding={wont work in here as this element is bounded to the itemsource of the DataGrid} IsReadOnly="True" Width="150">
- <DataGridTextColumn.ElementStyle>
- <Style TargetType="TextBlock">
- <Setter Property="Text"
- Value="{Binding DataContext.CustomerCollection.Name}"></Setter>
- </Style>
- </DataGridTextColumn.ElementStyle>
- </DataGridTextColumn>
- <DataGrid.Resources>
- <l:BindingProxy x:Key="proxy" Data="{Binding}" />
- </DataGrid.Resources>
- <DataGridTextColumn.ElementStyle>
- <Style TargetType="TextBlock">
- <Setter Property="Text"
- Value="{Binding Data.Name, Source={StaticResource proxy}}"></Setter>
- </Style>
- </DataGridTextColumn.ElementStyle>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement