Jump to content
Software FX Community

Problems with custom axis templates


thubble

Recommended Posts

This is a follow-up to this thread: http://community.softwarefx.com/forums/t/10389.aspx 

We've been having issues with axis templates for a while now. Many of these are still occurring in build 3547. The main issue we're having right now is that if you resize the chart, the axis labels will either disappear or flicker. See the last post in the above thread for more details and an example app.

Also, when a UserControl contains a chart and that UserControl is moved in code from one ContentPresenter to another, the following crash occurs:

System.InvalidOperationException: Specified element is already the logical child of another element. Disconnect it first. at System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent) at MS.Internal.FrameworkObject.ChangeLogicalParent(DependencyObject newParent) at System.Windows.FrameworkElement.AddLogicalChild(Object child) at System.Windows.Controls.UIElementCollection.SetLogicalParent(UIElement element) at System.Windows.Controls.UIElementCollection.AddInternal(UIElement element) at System.Windows.Controls.UIElementCollection.Add(UIElement element) at ChartFX.WPF.Internal.MyItemsControlCanvas.a(IEnumerable A_0) at ChartFX.WPF.Axis.AxisCategoricalItems.c(Size A_0) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at ChartFX.WPF.Controls.AxisPanel.ArrangeOverride(Size finalSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at ChartFX.WPF.Controls.SpacingDockPanel.ArrangeOverride(Size finalSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.Border.ArrangeOverride(Size finalSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.Border.ArrangeOverride(Size finalSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.ContextLayoutManager.UpdateLayout() at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg) at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork() at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget) at System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget) at System.Windows.Interop.HwndTarget.OnResize() at System.Windows.Interop.HwndTarget.HandleMessage(Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

It works fine if there is no custom axis label. Unfortunately I can't seem to reproduce it in a sample app, it seems to be something specific to our application. As I said, this problem doesn't seem to occur anywhere else though.

Are there any plans to fix the issues with custom axis labels, or can you give me any suggestions on how to get around this?

Thank you.

Link to comment
Share on other sites

Both these issues (dissapering labels and flickering) have been fixed in build 3554.

There is still a performance hit suffered when using templated axis labels, we will continue working on this to try to improve the performance but it should be used with caution.

We are still working on the crash when the chart control is reparented.

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...