Note that there are some explanatory texts on larger screens.

plurals
  1. POScale Transform with zooming in (x,y) direction at a time
    primarykey
    data
    text
    <p>I have chart in a canvas. when i click the chart i want it to zoom. i have this code.</p> <pre><code>&lt;Canvas x:Name="SampleCanvas" Background="#F5F7F9" MouseLeftButtonDown="brdMovable_MouseLeftButtonDown" MouseLeftButtonUp="brdMovable_MouseLeftButtonUp" MouseMove="brdMovable_MouseMove" Height="570" Width="875"&gt; &lt;chartingToolkit:Chart x:Name="mcChart" Loaded="mcChart_Loaded" Width="400" Height="250" Canvas.Left="185" Canvas.Top="5" Background="LightSteelBlue"&gt; &lt;chartingToolkit:Chart.RenderTransform&gt; &lt;ScaleTransform x:Name="scaleTransform"&gt;&lt;/ScaleTransform&gt; &lt;/chartingToolkit:Chart.RenderTransform&gt; &lt;chartingToolkit:Chart.Series&gt; &lt;chartingToolkit:ColumnSeries Title="Experience" IndependentValueBinding="{Binding Path=ModelName}" DependentValueBinding="{Binding Path=SaleCount}"&gt; &lt;/chartingToolkit:ColumnSeries&gt; &lt;/chartingToolkit:Chart.Series&gt; &lt;/chartingToolkit:Chart&gt; </code></pre> <p></p> <h2>In code behind</h2> <pre><code> Storyboard storyBoard = new Storyboard(); ///////// X Transform DoubleAnimation ds = new DoubleAnimation(); storyBoard.Children.Add(ds); ds.From = 1; ds.To = 1.5; ds.Duration = new Duration(TimeSpan.FromSeconds(2)); Storyboard.SetTargetName(ds, "scaleTransform"); Storyboard.SetTargetProperty(ds, new PropertyPath("(ScaleX)")); ////Y Transform DoubleAnimation dsy = new DoubleAnimation(); storyBoard.Children.Add(dsy); dsy.From = 1; dsy.To = 1.5; ds.Duration = new Duration(TimeSpan.FromSeconds(3)); Storyboard.SetTargetName(dsy, "scaleTransform"); Storyboard.SetTargetProperty(dsy, new PropertyPath("(ScaleY)")); LayoutRoot.Resources.Remove("unique_id"); LayoutRoot.Resources.Add("unique_id",storyBoard); storyBoard.Begin(); </code></pre> <p>This is showing the output first in x direction then in y direction but i want both directions at a time. How can we do that ?</p> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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