0

当用户尝试在左侧站点上的视图/应用程序中捕捉时,我的图像和画布遇到了很大问题。我已经声明了一个方法和一个委托

 Window.Current.SizeChanged += OnWindowSizeChanged; 

但这并不是很酷,因为我已经有了 pinchZoom。当 AppWindow 被调整大小时,我真的不希望视图被缩小。是否有任何参数我可以设置在该事件上不调整视图大小?

 <Grid Height="758" Grid.RowSpan="2"  Width="10000" ManipulationMode="All" x:Name="paper" PointerWheelChanged="scrolled" ManipulationDelta="PaperManipulation" >
            <Grid.RenderTransform>
                <CompositeTransform></CompositeTransform>
            </Grid.RenderTransform>


            <Image Source="images/page.png" x:Name="backgroundpaper"  HorizontalAlignment="Left" Height="758" Width="10000" Margin="10,0,0,0" VerticalAlignment="Top" />

            <Grid Margin="240,140,0,0"  Height="600" x:Name="canvases" ManipulationMode="All" VerticalAlignment="Center">
                <Grid.RenderTransform>
                    <CompositeTransform></CompositeTransform>
                </Grid.RenderTransform>

                <Canvas    Tapped="canvasTapped" Background="Transparent" ManipulationMode="All" RenderTransformOrigin="0.5, 0.5" x:Name="background_canvas" Height="600"  VerticalAlignment="Top" Width="600" HorizontalAlignment="Left">

                </Canvas>

               .... // SOME MORE ELEMENTS
            </Grid>
        </Grid>

感谢到目前为止。

4

1 回答 1

1

你能检查一下你在 XAML 中的代码吗?我想你在那里设置了一些宽度。

  <VisualStateManager.VisualStateGroups>
    <VisualStateGroup x:Name="ApplicationViewStates">
        <VisualState x:Name="Snapped">
            <Storyboard>
                //check your code here in snapped view handling
            </Storyboard>
        </VisualState>
    </VisualStateGroup>
  </VisualStateManager.VisualStateGroups>
于 2013-10-21T13:20:19.040 回答