-
-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AutomationProperties property not found on object of type MenuItem ( After updating to v4.0.0) #1341
Comments
I seem to get this issue when I am creating |
Hi, I encountered the same issue in ui:DropDownButton when using MenuItem. OS version .NET version WPF-UI NuGet version |
Yes, I just noticed this, too. I found the source of the problem, and I'll submit a PR to fix it. |
Use more efficient `{TemplateBinding}` for `MenuItem` templates, which also fixes the incorrect `{Binding Path}` syntax for attached properties.
Hi John, thanks for your help! |
I'll take a look at that, since I already have a PR for the Can you provide a ZIP'ed up repro project? |
I haven't got time to test right now, but I think I fixed an issue with command bindings not working on sub-menu items by settings the TextBlock IsHitTestVisible property (on the newly-added TextBlock that contains the AutomationProperties.Name text) to false. |
Describe the bug
I get this exception after updating to the new release. I don't have this problem with version 4.0.0-rc.3
System.Windows.Data Error: 40 : BindingExpression path error: 'AutomationProperties' property not found on 'object' ''MenuItem' (Name='')'. BindingExpression:Path=AutomationProperties.Name; DataItem='MenuItem' (Name=''); target element is 'TextBlock' (Name=''); target property is 'Text' (type 'String')
To Reproduce
Open the MenuItem
Expected behavior
don't get any xaml error
Screenshots
OS version
Windows 11
.NET version
net9
WPF-UI NuGet version
4.0.0
Additional context
No response
The text was updated successfully, but these errors were encountered: