2023-04-27 10:25:39 +08:00
|
|
|
<UserControl
|
|
|
|
|
x:Class="Semi.Avalonia.Demo.Pages.ScrollViewerDemo"
|
|
|
|
|
xmlns="https://github.com/avaloniaui"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
d:DesignHeight="450"
|
|
|
|
|
d:DesignWidth="800"
|
|
|
|
|
mc:Ignorable="d">
|
2023-07-11 17:40:57 +08:00
|
|
|
<ScrollViewer>
|
|
|
|
|
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
2025-03-13 13:27:14 +08:00
|
|
|
<ToggleSwitch Name="inset" Content="Inset Content" />
|
|
|
|
|
<ToggleSwitch Name="autohide" Content="Allow AutoHide" />
|
2023-07-11 17:40:57 +08:00
|
|
|
<ScrollViewer
|
2025-03-13 13:27:14 +08:00
|
|
|
Margin="10"
|
|
|
|
|
Width="200" Height="200"
|
2025-03-13 11:15:50 +08:00
|
|
|
AllowAutoHide="{Binding #autohide.IsChecked}"
|
|
|
|
|
Classes.InsetContent="{Binding #inset.IsChecked}"
|
2023-07-11 17:40:57 +08:00
|
|
|
HorizontalScrollBarVisibility="Auto">
|
2025-03-13 13:27:14 +08:00
|
|
|
<UniformGrid
|
|
|
|
|
Rows="2" Columns="2"
|
|
|
|
|
Width="300" Height="300">
|
|
|
|
|
<Rectangle Fill="{DynamicResource SemiYellow2}" />
|
|
|
|
|
<Rectangle Fill="{DynamicResource SemiBlue2}" />
|
|
|
|
|
<Rectangle Fill="{DynamicResource SemiPink2}" />
|
|
|
|
|
<Rectangle Fill="{DynamicResource SemiGreen2}" />
|
|
|
|
|
</UniformGrid>
|
2023-07-11 17:40:57 +08:00
|
|
|
</ScrollViewer>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
</UserControl>
|