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.
44 lines
1.8 KiB
44 lines
1.8 KiB
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
x:Class="ControlCatalog.Pages.CarouselPageDataTemplatePage">
|
|
<DockPanel>
|
|
<ScrollViewer DockPanel.Dock="Right" Width="240">
|
|
<StackPanel Margin="12" Spacing="8">
|
|
<TextBlock Text="Data Templates" FontWeight="SemiBold" FontSize="16"
|
|
Foreground="{DynamicResource SystemControlHighlightAccentBrush}" />
|
|
|
|
<TextBlock FontSize="12" Opacity="0.7" TextWrapping="Wrap"
|
|
Text="Bind a CarouselPage to a view-model collection, render each item with PageTemplate, and switch templates at runtime." />
|
|
|
|
<Separator />
|
|
|
|
<Button Content="Add Page" Click="OnAddPage" HorizontalAlignment="Stretch" />
|
|
<Button Content="Remove Last" Click="OnRemovePage" HorizontalAlignment="Stretch" />
|
|
<Button Content="Switch Template" Click="OnSwitchTemplate" HorizontalAlignment="Stretch" />
|
|
|
|
<Separator />
|
|
|
|
<TextBlock Text="Navigate" FontWeight="SemiBold" FontSize="13" />
|
|
<StackPanel Spacing="6">
|
|
<Button Content="Previous" Click="OnPrevious" HorizontalAlignment="Stretch" />
|
|
<Button Content="Next" Click="OnNext" HorizontalAlignment="Stretch" />
|
|
</StackPanel>
|
|
|
|
<Separator />
|
|
|
|
<TextBlock x:Name="StatusText" Text="4 pages" Opacity="0.7" />
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
|
|
<Border DockPanel.Dock="Right" Width="1"
|
|
Background="{DynamicResource SystemControlForegroundBaseMediumLowBrush}" />
|
|
|
|
<Border Margin="12"
|
|
BorderBrush="{DynamicResource SystemControlForegroundBaseMediumLowBrush}"
|
|
BorderThickness="1"
|
|
CornerRadius="6"
|
|
ClipToBounds="True">
|
|
<Panel x:Name="CarouselHost" />
|
|
</Border>
|
|
</DockPanel>
|
|
</UserControl>
|
|
|