Note that there are some explanatory texts on larger screens.

plurals
  1. POVisual Studio Media element rotate/scaling with multitouch in WPF/XAML
    primarykey
    data
    text
    <p>I'm developing this multitouch app in WPF with visual studio 2010.</p> <p>I have the follow problem:</p> <p>I'm trying to use the rotate,scaling and other effect with multitouch (like gallery in ipad style).</p> <p>Can anyone tell me how to do that with a MEDIA ELEMENT?For the image as you see i haven't problem,and the rotate/scaling works fine.</p> <p>The source is the follow:</p> <pre><code>&lt;Window x:Class="TouchRect.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:TouchRect" Title="MainWindow" Height="600" Width="800"&gt; &lt;Grid Width="auto"&gt; &lt;local:RulerCanvas x:Name="canvas" &gt; &lt;!--&lt;ListBox ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="215" Width="736"&gt; &lt;ListBox.ItemsPanel&gt; &lt;ItemsPanelTemplate&gt; &lt;UniformGrid Columns="3" HorizontalAlignment="Center" VerticalAlignment="Stretch"/&gt; &lt;/ItemsPanelTemplate&gt; &lt;/ListBox.ItemsPanel&gt;--&gt; &lt;Image x:Name="image3" Width="74" Height="49" IsManipulationEnabled="True" Source="flower3.jpg" Canvas.Left="239" Canvas.Top="-273"&gt; &lt;Image.RenderTransform&gt; &lt;MatrixTransform Matrix="2.41806325085411,0,0,2.41806325085411,280.737615796121,292.420001677231" /&gt; &lt;/Image.RenderTransform&gt; &lt;/Image&gt; &lt;Image x:Name="image2" Width="64" Height="49" IsManipulationEnabled="True" Source="flower2.jpg" VerticalAlignment="Stretch" Canvas.Left="-236" Canvas.Top="-272"&gt; &lt;Image.RenderTransform&gt; &lt;MatrixTransform Matrix="2.41806325085411,0,0,2.41806325085411,280.737615796121,292.420001677231"/&gt; &lt;/Image.RenderTransform&gt; &lt;/Image&gt; &lt;StackPanel Orientation="Horizontal" Margin="0,10,0,0"&gt;&lt;/StackPanel&gt; &lt;Image x:Name="image" Width="74" Height="49" IsManipulationEnabled="True" Source="flower.jpg" Stretch="Fill" HorizontalAlignment="Center" Canvas.Left="-7" Canvas.Top="-271"&gt; &lt;Image.RenderTransform&gt; &lt;MatrixTransform Matrix="2.41806325085411,0,0,2.41806325085411,280.737615796121,292.420001677231" /&gt; &lt;/Image.RenderTransform&gt; &lt;/Image&gt; &lt;MediaElement x:Name="media" Source="C:\Users\Public\Videos\Sample Videos\Wildlife.wmv" Width="633" Height="366" Canvas.Left="65" Canvas.Top="164" LoadedBehavior="Manual" IsManipulationEnabled="True" /&gt; &lt;!--&lt;/ListBox&gt;--&gt; &lt;/local:RulerCanvas&gt; &lt;/Grid&gt; </code></pre> <p></p> <p>Thanks a lot!</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.
    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