SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Closed
0
0

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 :-/

  • You must to post comments
0
0

After a drink, a fresh start and reading this. I simply set the datacontext of an inner control to innercontrol.DataContext = this. Solved everything;

(an essential) tutorial on usercontrols and databinding

  • You must to post comments
Showing 1 result