Ticket Q382044
Visible to All Users

ChartControl and DependencyProperty Binding

created 13 years ago

Hello -
I have a FreezableCollection of DependencyObjects with the DependencyProperties [type FrameworkPropertyMetaData] xDate and yValue.
I bound it with the crosshair curso chart of the demo but the graph does not handle the notifications and is not updated when a value changes. Am I missing something ? Is there anything like DisplayMemberBinding to manage the notifications ?
Thanks,

<dxc:XYDiagram2D.Series>
   <dxc:LineSeries2D x:Name="series" ArgumentScaleType="DateTime"
                    ArgumentDataMember="xDate" ValueDataMember="yValue"
                    MarkerSize="5">
        <dxc:LineSeries2D.Label>
            <dxc:SeriesLabel Visible="False" />
        </dxc:LineSeries2D.Label>
    </dxc:LineSeries2D>
</dxc:XYDiagram2D.Series>

Show previous comments (6)
DevExpress Support Team 13 years ago

    Hello Boris,
    It looks like you provided us with an old version your sample project. It does not contain the TextBox control.
    Please provide us with a modified version of your project, and our developers will investigate it.
    Thanks,
    Valdemar

      Yes indeed. My bad. Here is a version with the binding with the textbox.
      Thank you
      Boris

      DevExpress Support Team 13 years ago

        Hello Boris,
        Thank you for your sample project. We will investigate it.
        I will get back to you once we have any results or need extra information. Thanks for your patience.
        Thanks,
        Valdemar

        Answers approved by DevExpress Support

        created 13 years ago (modified 13 years ago)

        Hello Boris,
        This approach works with a Label, because it is bound to a separate collection item. However, the whole collection "does not know" that its item is changed. Thus, this approach does not work with the Chart.
        To accomplish this task, you can create a descendant of the FreezableCollection<FinancialPoint> class and implement the INotifyCollectionChanged interface.
        Attached is a modified sample project that demonstrates how to accomplish this.
        Thanks,
        Valdemar

          Comments (2)

            Perfect thanks, it works fine.
            Boris

            DevExpress Support Team 13 years ago

              Hello Boris,
              Thank you for informing us that the issue has been resolved. I am glad to hear that you have found our assistance helpful.
              Thanks,
              Valdemar

              Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

              Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.