Opening context menu makes the tabcontrol items datacontext null #2929
-
When I created a TabControl with the original control style and right-clicked to open a context menu, everything works fine. However, when I applied the MaterialDesigin theme and did the same operation, the DataContext of TabControl's items become null. The startup view: Then I right-clicked the textbox and opened the context menu, the tab item contents were gone: From the visual hierarchy view, I found the DataContext of the TextBox was changed from ViewModel to null. If I add a DataContextChanged event to the TextBox, the event will be fired. Before right click: After right click: The DataContext become null and the TextBox's content went empty, but why DataCotext changed? Is there something I did incorrectly? Here is the code: MainWindows.xaml.cs
MainWindow.cs
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@qqdown I just had a brief look at this. I can quite easily reproduce it in the demo app, and something seems to be really strange. I need to dig a bit deeper, but it seems if you set The issue seems to occur when a new "window" opens; this can either be a |
Beta Was this translation helpful? Give feedback.
@qqdown The issue has been fixed. You can grab one of the nightly builds and verify it if you want.