Note that there are some explanatory texts on larger screens.

plurals
  1. POteechart zoom & scroll on windows phone 8
    primarykey
    data
    text
    <p>In a windows phone 8 project I'm creating a TChart inside a UserControl like this:</p> <pre><code> Chart.Legend.LegendStyle = LegendStyles.Series; Chart.Legend.Alignment = LegendAlignments.Bottom; Chart.Header.Visible = false; if (Page.ZoomMode) { Chart.Aspect.GestureOptions = Steema.TeeChart.Silverlight.Drawing.Aspect.Gestures.PinchAndDrag; Chart.Aspect.GestureStyle = Steema.TeeChart.Silverlight.Drawing.Aspect.GestureStyles.FullChart; } else { Chart.Aspect.GestureOptions = Steema.TeeChart.Silverlight.Drawing.Aspect.Gestures.None; Chart.Aspect.GestureStyle = Steema.TeeChart.Silverlight.Drawing.Aspect.GestureStyles.InChart; } var theme = ThemeManager.GetDefaultTChartTheme(Chart.Chart); theme.Apply(); </code></pre> <p>The UserControl is inside a PivotItem. The idea is to lock the pivot while in zoom mode to allow the Chart to respond to drag &amp; pinch gestures.</p> <p>Problem 1: Changing dynamically Chart.Aspect.GestureStyle and Chart.Aspect.GestureOptions after a first draw launches this exception:</p> <pre><code>System.InvalidOperationException: Element is already the child of another element. at MS.Internal.XcpImports.CheckHResult(UInt32 hr) at MS.Internal.XcpImports.Collection_AddValue[T](PresentationFrameworkCollection`1 collection, CValue value) at MS.Internal.XcpImports.Collection_AddDependencyObject[T](PresentationFrameworkCollection`1 collection, DependencyObject value) at System.Windows.PresentationFrameworkCollection`1.AddDependencyObject(DependencyObject value) at System.Windows.Controls.UIElementCollection.AddInternal(UIElement value) at System.Windows.PresentationFrameworkCollection`1.Add(T value) at Steema.TeeChart.Silverlight.Drawing.TBlockCanvas.ShowImage() at Steema.TeeChart.Silverlight.TChart.Draw(Rect rect) at Steema.TeeChart.Silverlight.TChart.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Double inWidth, Double inHeight, Double&amp; outWidth, Double&amp; outHeight) </code></pre> <p>Problem 2: If the first draw is with zoom enabled. After locking the pivot all seems to work, I can drag the chart on the screen. But everytime I load new series after a tChart.Series.Clear() the rendered image displaces again and again...</p> <p>I hope someone can help me. Thank you!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload