Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

WPF Legend Binding

Hello,

can anybody tell me how to use the WPF-Legend by an Itemssource ?

Thanks a Lot.

 

0 Kudos
Message 1 of 4
(6,106 Views)

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}" />

~ Paul H
0 Kudos
Message 2 of 4
(6,100 Views)

Thank you very much. That will help me a lot.

Can i bin the Plots of an Graph to an Itemscollection too ?

Manuel

0 Kudos
Message 3 of 4
(6,092 Views)

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.

~ Paul H
0 Kudos
Message 4 of 4
(6,078 Views)