Can Reproduce BindingExpression path error: ... property not found ... On DropDownButton #2883

Closed
steevcoco opened this Issue Mar 8, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@steevcoco

I have a simple test case on GitHub:

https://github.com/steevcoco/MahAppsTests

It's a WPF XAML App. It uses a DropDownButton in a DataTemplate. The template does not set the ItemTemplateSelector, ItemStringFormat, or other properties; yet the XAML throws abundant Binding traces during execution:

BindingExpression path error: 'ItemTemplateSelector' property not found on 'object' ''ContentPresenter' (Name='')'. BindingExpression:Path=ItemTemplateSelector; DataItem='ContentPresenter' (Name=''); target element is 'DropDownButton' (Name='AccentBorderWithPopUpDropDownButton'); target property is 'NoTarget' (type 'Object')

The template does set Items in the DropDownButton ... And in the MahApps Style, there are triggers that check if the TemplatedParent ContentTemplateSelector is null and ItemTemplateSelector is not; and if so it sets the ContentTemplateSelector on the PART_ButtonContent ContentControl to the TemplatedParent ItemTemplateSelector. Perhaps the Items trigger the binding ... But I do not exactly know where the problem is. (My XAML does not set the template selectors or string format.)

@punker76 punker76 added the Bug label Mar 27, 2017

@punker76 punker76 added this to the 1.5.0 milestone Mar 27, 2017

@punker76 punker76 self-assigned this Mar 27, 2017

@punker76 punker76 closed this in 4120c71 Mar 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment