This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
We are using Version 7 of WPF Element When the Chart is shown with some legend style, then I need to change the style to different one, it will crash the application. 1) I tried to use direct setting: Chart.LegendStyle = MyStyle; when need to change it, we set it again like: Chart.LegendStyle = MyNewStyle; 2) I tried to use DataBinding, when later on I need to change it, I call BindingOperations.ClearBinding(this, Chart.LegendStyleProperty); and then binding it again. Both ways will crash my application. Also, I notice that as time goes on, there is more and more legend item need to be put in the legend, then it also crashes the application, as the application need to relocate the size of graph and legend area. Please help... Thanks, Gordon |
|
|
Hi Gordon, I have not been able to reproduce a crash when changing the LegendStyle template. Please send any information about the crash if available. Also, to help me reproduce this, please send a copy of the 2 legend styles that you are trying to switch between. Are you able to make 2 very simple templates (just displaying a colored rectangle) and switch between those without crashing? Regarding adding more items, you could create a custom legend style that displays items in a scroll viewer. This should prevent the chart from resizing when lots of items have been added. If this is not doable, let me know and I'll look into reproducing this crash too. -Jason Fauchelle |
|
|
Thanks Jason, I was on Vacation and will give you reproducing project soon. Gordon |
|