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
300
Explode only one splice
posted

Hi

How can I explode only one(clicked) slice in XamPieChart. Is There any way to traverse over slices in SliceClick_EventHandler and unexplode exploded slices?

Thanks

  • 34430
    Suggested Answer
    Offline posted

    Hello Xetish,

    Thank you for your post!

    I have been investigating into a way you could do this, and I would recommend that to start, you cast the sender of the SliceClick event handler to your XamPieChart. Then, by using the static GetDescendantFromType method on the Infragistics.Windows.Utilities class, you can get an element of type Canvas from the XamPieChart. The first child of this Canvas is another Canvas object, which holds the Slice objects of the XamPieChart. If you loop through this second Canvas's children using a foreach(Slice s in sliceCanvas.Children) loop, you can set each of the slices' IsExploded property to false.

    I have attached a sample project to demonstrate the above.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support

    XamPieChartOneExplodedCase.zip