Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
860
Dynamic Axis/Legend Binding
posted

In our application a varying number of charts can be created based upon user configuration.  The axis information is also user configurable, and this is where the problem comes in.

In creating the axes for the chart, can the name be bound to a property on our axis viewmodel? (I do not think so as my experimentation with x:Name={Binding Path=ViewModel.Name} so far) or is there some way to use RelativeSource binding to locate the axis information?  Can this be done for the legend as well?  Thank you!

Parents
  • 14517
    Offline posted

    Hello,

    The x:Name directive uniquely identifies XAML-defined elements in a XAML namescope the name is equivalent to the variable that holds an object reference or an instance as returned by a constructor so binding not a valid value for this property. You can bind to a different ItemsSource to change the data used by the axis or you can add the axis to the grid at runtime.  Please let me know more about what you are trying to accomplish if you need further assistance.

    Valerie

Reply Children