how to apply inverse transform for an UI element in windows store apps [C++] ? RRS feed

  • Question

  • Hi,

    how to apply inverse transform for an UI element in windows store apps [C++] ?



    Thursday, October 11, 2012 4:34 AM

All replies

  • Hi,

    Do you mean that you want to whirl 180 degrees?
    If so, you can follow these codes

            <Image HorizontalAlignment="Left" Height="193" Margin="684,272,0,0" VerticalAlignment="Top" Width="190" Source="1.png">
                    <CompositeTransform x:Name="ImageTransform"

    In a button click event


    Best regards,

    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Friday, October 12, 2012 7:39 AM
  • Hi Jesse,

    Not exactly. I have a rectangle and 4 ellipses in a container grid element. what i actually need is to apply scale and translate transform to the children ie rect and ellipses. But now the requirement is to apply scale transform to rectangle only and ellipse could not be rescaled.

    My xaml looks like this

    <Grid Width="auto" Height="auto"  x:Name="rectLayout_" PointerExited="RectLayoutPointerExited" Background="Transparent" PointerMoved="RectLayoutPointerMoved" PointerReleased="RectLayoutPointerReleased">        <Grid.RowDefinitions>            <RowDefinition Height="auto"/>            <RowDefinition Height="auto"/>            <RowDefinition Height="auto" />        </Grid.RowDefinitions>        <Grid.ColumnDefinitions>            <ColumnDefinition Width="auto"/>            <ColumnDefinition Width="auto"/>            <ColumnDefinition Width="auto"/>        </Grid.ColumnDefinitions>                <Rectangle x:Name="clipRect_"    Grid.Row="1" Grid.Column="1" Width="auto" Height="auto" Stroke="Red"  Fill="Transparent"  />        <Ellipse   x:Name="topLeft_"     Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Bottom" Stroke="Gray" Fill="White"  Width="15" Height="15"  PointerPressed="ltpointerPressed" />        <Ellipse   x:Name="leftBottom_"  Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Top"    Stroke="Gray" Fill="White"  Width="15" Height="15"  PointerPressed="lbpointerPressed" />        <Ellipse   x:Name="rightTop_"    Grid.Row="0" Grid.Column="2" HorizontalAlignment="Left"  VerticalAlignment="Bottom" Stroke="Gray" Fill="White"  Width="15" Height="15"  PointerPressed="rtpointerPressed" />        <Ellipse   x:Name="rightBottom_" Grid.Row="2" Grid.Column="2" HorizontalAlignment="Left"  VerticalAlignment="Top"    Stroke="Gray" Fill="White"  Width="15" Height="15"  PointerPressed="rbpointerPressed" />    </Grid>



    Friday, October 12, 2012 11:10 AM