Bind Grid.Row / Grid.Column inside a DataTemplate
Posted
by Thorsten79
on Stack Overflow
See other posts from Stack Overflow
or by Thorsten79
Published on 2010-03-12T13:06:31Z
Indexed on
2010/03/12
13:07 UTC
Read the original article
Hit count: 220
Hope this is not a dupe.
I would like to be able to do the following in XAML:
<DataTemplate DataType="{x:Type NewGACCTestApp:ButtonVM}">
<Button
Grid.Column="{Binding GridColumn}"
Grid.Row="{Binding GridRow}"
Content="{Binding Path=Info}"
/>
</DataTemplate>
The Content binding works fine but Grid.Column and Grid.Row simply don't exist in the produced object. Not even when I set them to some value without binding (like in Grid.Column="1"). I've snooped the application and saw that inside my grid nobody ever sets Grid.Column and Grid.Row.
Any ideas?
© Stack Overflow or respective owner