06-25-2013 09:42 AM
Hello,
can anybody tell me how to use the WPF-Legend by an Itemssource ?
Thanks a Lot.
06-25-2013 02:44 PM
You can bind the ItemsSource
of a Legend
to a graph, or a collection of graph components like Plots
:
<ni:Graph x:Name="graph" ... />
<ni:Legend ItemsSource="{Binding ElementName=graph}" />
<ni:Legend ItemsSource="{Binding ElementName=graph, Path=Plots}" />
06-26-2013 01:13 AM
Thank you very much. That will help me a lot.
Can i bin the Plots of an Graph to an Itemscollection too ?
Manuel
06-26-2013 09:00 AM
If you want to populate the Plots
collection based on another collection, I believe the question How to bind plots on WPF graph will be helpful to you.
If you mean to bind an ItemsControl
to the Plots
collection, then yes: any IEnumerable
type can be used to populate an items control.