Jay Posted February 6, 2008 Report Share Posted February 6, 2008 I have been reading up on data binding for WPF and it sounds like Microsoft doesn't have a clear standard yet. This article, for example, mentions that vendors are being put in a tough position: http://www.lhotka.net/weblog/WhySoFewWPFXAMLGridControls.aspx Is it true that there isn't a standard yet for data binding within WPF? Jay Quote Link to comment Share on other sites More sharing options...
JuanC Posted February 6, 2008 Report Share Posted February 6, 2008 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.