Multitouch-Event for selectedItem in ElementFlow

Jun 16, 2012 at 3:08 PM
Edited Jun 16, 2012 at 11:30 PM

Hello everyone,

i'm using ElementFlow Project for my Thesis. I have a problem manipulate selectedItem in ElementFlow.

Following code for Manipulation of whole ElementFlow works great(Zoom)

 

c#:
public MainWindow()
        {
            InitializeComponent();
            mywindow.ManipulationDelta += new EventHandler<ManipulationDeltaEventArgs>(mywindow_ManipulationDelta);
 
        }

     

        void mywindow_ManipulationDelta(object sender, ManipulationDeltaEventArgs e)
        {
            
            MatrixTransform transform = _elementFlow.RenderTransform  as MatrixTransform;
            if (transform != null)
            {
       
                matrix.ScaleAt(e.DeltaManipulation.Scale.X, e.DeltaManipulation.Scale.Y, e.ManipulationOrigin.X, e.ManipulationOrigin.Y);
                transform.Matrix = matrix;
                e.Handled = true;
            }

 

XAML:
 <flow:ElementFlow x:Name="_elementFlow"
            ItemsSource="{DynamicResource DataSource}"
            ItemTemplate="{DynamicResource TestDataTemplate}"
            TiltAngle="45"
            ItemGap="0.2"
            FrontItemGap="1"
            PopoutDistance="1.5"
         
              Margin="0,47,0,0">
            <flow:ElementFlow .Layout>
                <my:CoverFlow />
            </flow:ElementFlow .Layout>
            
            <flow:ElementFlow .RenderTransform>
                <MatrixTransform/>
            </flow:ElementFlow .RenderTransform>
            <flow:ElementFlow .Camera>
                <PerspectiveCamera FieldOfView="45"
                    Position="0,0,6"
                    LookDirection="0,-0,-6" />
            </flow:ElementFlow .Camera>
        </flow:ElementFlow >

 

------------------------------

But if i want to manipulate only _elementFlow.SelectedItem, it doesn't work. what should be changed in my code. because  _elementFlow.SelectedItem doesn't have RenderTransform property.

Thanks for helping Gary