开发者

RotateTransform on an Ellipse within a PivotItem

开发者 https://www.devze.com 2023-02-13 14:32 出处:网络
I\'m new to WPF/Silverlight and I\'m just playing about with my new Windows Phone 7. I created a new Pivot application and changed it to the following code:

I'm new to WPF/Silverlight and I'm just playing about with my new Windows Phone 7.

I created a new Pivot application and changed it to the following code:

<Grid x:Name="LayoutRoot" Background="Transparent">
        <!--Pivot Control-->
        <controls:Pivot Title="MY APPLICATION">
            <!--Pivot item one-->
            <controls:PivotItem Header="first">
                <Ellipse Width="300" Height="300" Fill="Red">
                    <Ellipse.RenderTransform>
                        <开发者_运维百科;RotateTransform CenterX="150" CenterY="150" Angle="90"/>
                    </Ellipse.RenderTransform>
                </Ellipse>
            </controls:PivotItem>
            <controls:PivotItem Header="second">
                <Ellipse Width="300" Height="300" Fill="Blue"/>
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>

On the first pivot item, if you start your swipe over the ellipse, it is necessary to swipe upwards to move to the next pivotitem. If you begin the swipe somewhere outside of the ellipse, the swipe gesture is left right as expected.

I'm pretty sure that this is will be obvious to a XAML veteran, I'm not really sure how I should be preventing the gesture being affected by the RotateTransform too?

Any help appreciated.

Edit:

I think that I have figured this out. If I set IsHitTestVisible="False" on the Ellipse then it all works as expected.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号