Using a standard ContextMenu as defined with;
<s:SciChartSurface.ContextMenu>
<ContextMenu>
blablabla
<ContextMenu>
</s:....>
How can I set the DataContext of this ContextMenu to a dependency property as defined on the usercontrol and not to the datacontext of the usercontrol (which is inherited from its parent). I tried setting an x:Name on the usercontrol and using {Binding property, ElementName=root} but it does not seem to work. Sorry if this is a general WPF question :-/
- Michel Moe asked 9 years ago
- You must login to post comments
After a drink, a fresh start and reading this. I simply set the datacontext of an inner control to innercontrol.DataContext = this. Solved everything;
- Michel Moe answered 9 years ago
- last edited 9 years ago
- You must login to post comments