Jump to content
Software FX Community

Data binding in WPF


Jay

Recommended Posts

To be honest, even going back to COM and WinForms, there has always been standards for data-binding if you are a control that consumes a single value (e.g. a textbox, slider, etc.) but when it relates to consuming a database SQL statement or list of objects there was never a clear standard.

In our WPF chart we tried to support databinding in a similar way to "ItemsControl" classes such as ListBox. We expose an ItemsSource property of type IEnumerable where we support the following

- A CLR collection

- Observable<T> class

- The result of an ObjectDataProvider or XmlDataProvider

You then have to create or more series and provide the CLR property names or XPath expression mapped to the series (Series.BindingPath), additionally you can specify which field should be used as the labels (AxisX.LabelPath).

If you have a particular databinding scenario that you are having problems with please provide details and we will be happy to help.

Regards,

JuanC

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...