UserControlFather.xaml 3.15 KB
<UserControl x:Class="OS.Spin.View.SquareBox.UserControlFather"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:OS.Spin.View.SquareBox"
              mc:Ignorable="d" Loaded="UserControl_Loaded">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Style/ScrollViewDictionary.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <!--<ScrollViewer Template="{StaticResource MyScrollViewer}" VerticalScrollBarVisibility="Auto" Height="845" ManipulationBoundaryFeedback="ScrollViewer_ManipulationBoundaryFeedback">
        <StackPanel x:Name="stackPanelFather">
            <Canvas x:Name="father"  Width="1395" Height="Auto" SizeChanged="Father_SizeChanged">
            </Canvas>
        </StackPanel>
    </ScrollViewer>-->
    <!--测试动态添加子控件后,滑动条无法访问问题-->
    <!--<ScrollViewer VerticalScrollBarVisibility="Auto" Height="845" ManipulationBoundaryFeedback="ScrollViewer_ManipulationBoundaryFeedback">
        <StackPanel x:Name="stackPanelFather">
            <Canvas x:Name="father"  Width="1395" Height="Auto" SizeChanged="Father_SizeChanged">
            </Canvas>
        </StackPanel>
    </ScrollViewer>-->
    <!--调式使用-->
    <!--<ScrollViewer Height="845"
                HorizontalScrollBarVisibility="Auto"
                  VerticalScrollBarVisibility="Visible">
        <StackPanel Height="Auto" Width="1395" x:Name="stackPanelFather">
        <Canvas x:Name="father" Width="1395" Height="Auto" SizeChanged="Father_SizeChanged">
        </Canvas>
        </StackPanel>
    </ScrollViewer>-->
    <ScrollViewer Height="790" x:Name="BaseScroll" Template="{StaticResource MyScrollViewer}"
                HorizontalScrollBarVisibility="Auto"
                  VerticalScrollBarVisibility="Auto">
        <WrapPanel Orientation="Horizontal" x:Name="stackPanelFather" Width="1080" Height="Auto" SizeChanged="Father_SizeChanged">

        </WrapPanel>
    </ScrollViewer>
    
    <!--<ScrollViewer Height="300"  VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Visible">
        <StackPanel x:Name="stackPanelFather" Width="1395" Height="Auto">
            <Canvas Height="Auto" Width="1395" x:Name="father" SizeChanged="Father_SizeChanged"></Canvas>
        </StackPanel>
    </ScrollViewer>-->
    <!--<ScrollViewer Height="845" ManipulationBoundaryFeedback="ScrollViewer_ManipulationBoundaryFeedback">
        <ScrollViewer.Content>
            <StackPanel x:Name="stackPanelFather" Orientation="Horizontal" ScrollViewer.VerticalScrollBarVisibility="Auto">
                <Canvas x:Name="father"  Width="1395" Height="Auto"  SizeChanged="Father_SizeChanged">
            </Canvas>
        </StackPanel>
        </ScrollViewer.Content>
    </ScrollViewer>-->
</UserControl>