csharpc-sharpdotnetxamlavaloniauicross-platformcross-platform-xamlavaloniaguimulti-platformuser-interfacedotnetcore
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
2.7 KiB
67 lines
2.7 KiB
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
x:Class="ControlCatalog.Pages.NavigationPageTransitionsPage">
|
|
<DockPanel>
|
|
<ScrollViewer DockPanel.Dock="Right" Width="260">
|
|
<StackPanel Margin="12" Spacing="8">
|
|
<TextBlock Text="Page Transition" />
|
|
<ComboBox x:Name="TransitionCombo"
|
|
SelectedIndex="1"
|
|
HorizontalAlignment="Stretch"
|
|
SelectionChanged="OnTransitionChanged">
|
|
<ComboBoxItem Content="— Default —" IsEnabled="False" FontWeight="SemiBold" />
|
|
<ComboBoxItem Content="Page Slide" />
|
|
<ComboBoxItem Content="— Custom —" IsEnabled="False" FontWeight="SemiBold" />
|
|
<ComboBoxItem Content="Parallax Slide" />
|
|
<ComboBoxItem Content="Cross Fade" />
|
|
<ComboBoxItem Content="Fade Through" />
|
|
<ComboBoxItem Content="Page Slide (Horizontal)" />
|
|
<ComboBoxItem Content="Page Slide (Vertical)" />
|
|
<ComboBoxItem Content="Composite (Slide + Fade)" />
|
|
<ComboBoxItem Content="None" />
|
|
</ComboBox>
|
|
|
|
<TextBlock Text="Duration (ms)" />
|
|
<Slider x:Name="DurationSlider"
|
|
Minimum="100"
|
|
Maximum="1000"
|
|
Value="300"
|
|
TickFrequency="100"
|
|
IsSnapToTickEnabled="True"
|
|
ValueChanged="OnDurationChanged" />
|
|
<TextBlock x:Name="DurationLabel"
|
|
Text="300 ms"
|
|
HorizontalAlignment="Center"
|
|
Opacity="0.7" />
|
|
|
|
<Separator />
|
|
|
|
<Button Content="Push Page"
|
|
HorizontalAlignment="Stretch"
|
|
Click="OnPush" />
|
|
<Button Content="Pop"
|
|
HorizontalAlignment="Stretch"
|
|
Click="OnPop" />
|
|
|
|
<Separator />
|
|
|
|
<TextBlock Text="Custom transitions"
|
|
FontWeight="SemiBold" />
|
|
<TextBlock TextWrapping="Wrap"
|
|
Opacity="0.7"
|
|
FontSize="11"
|
|
Text="The Custom group shows IPageTransition implementations included in this sample. Use them as starting points for building your own transitions." />
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
|
|
<Border DockPanel.Dock="Right" Width="1" Background="{DynamicResource SystemControlForegroundBaseMediumLowBrush}" />
|
|
|
|
<Border Margin="12"
|
|
BorderBrush="{DynamicResource SystemControlForegroundBaseMediumLowBrush}"
|
|
BorderThickness="1"
|
|
CornerRadius="6"
|
|
ClipToBounds="True">
|
|
<NavigationPage x:Name="DemoNav" />
|
|
</Border>
|
|
</DockPanel>
|
|
</UserControl>
|
|
|