How to defeat a bug with Grid.Row / Column in ItemsPanelTemplate?
问题 Created a simple Attached property to simplify bindings from an element template. Instead of this: <ItemsControl ItemsSource="{Binding Mode=OneWay, Source={StaticResource Points.Grid}}" ItemsPanel="{StaticResource Grid.Panel}"> <ItemsControl.ItemTemplate> <DataTemplate DataType="Point"> <Ellipse Fill="Coral"/> </DataTemplate> </ItemsControl.ItemTemplate> <ItemsControl.ItemContainerStyle> <Style> <Setter Property="Grid.Row" Value="{Binding Y}"/> <Setter Property="Grid.Column" Value="{Binding X