Binding-Error with ListBoxItem style
See original GitHub issueHello,
there is a issue with the properties “HorizontalContentAlignment” and “VerticalContentAlignment” in conjunction with the ListBoxItem style. This is the error message which is shown in the Output-Window:
This error occurs if the ItemsSource of the ListBox is binded to a ObservableCollection an their elements change. The error message is not displayed when I do the following:
<Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}"> <Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="VerticalContentAlignment" Value="Top" /> </Style>
But that is not a good solution. I hope that this bug will be corrected. Thanks! 😃
Sorry for my bad English. 😄
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (7 by maintainers)
I think I have a fix too. I will continue working on this tomorrow.
I was planning on attaching a ZIP after I thought this issue is resolved (and I delete that repo). I thought you prefered a GitHub repo like that over an attached ZIP since the new issue template says
Sorry for not also attaching a ZIP of the MWE.