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

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

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