AdminPage.axaml 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
  6. x:Class="AvaloniaApplication1.AdminPage"
  7. xmlns:vm="using:AvaloniaApplication1.ViewModels"
  8. x:DataType="vm:AdminViewModel">
  9. <SplitView IsPaneOpen="{Binding Flag}"
  10. DisplayMode="CompactInline"
  11. CompactPaneLength="100"
  12. OpenPaneLength="300"
  13. >
  14. <SplitView.Pane>
  15. <StackPanel Orientation="Vertical" HorizontalAlignment="Center" Height="300" VerticalAlignment="Stretch">
  16. <Button Content=">" Command="{Binding Press}"/>
  17. <ListBox ItemsSource="{Binding Pages}" Width="200" Height="300" SelectionMode="Single" SelectedItem="{Binding SelectedItem}" IsVisible="{Binding Flag}">
  18. <ListBox.ItemTemplate>
  19. <DataTemplate>
  20. <StackPanel Orientation="Horizontal">
  21. <TextBlock Text="{Binding }"/>
  22. </StackPanel>
  23. </DataTemplate>
  24. </ListBox.ItemTemplate>
  25. </ListBox>
  26. </StackPanel>
  27. </SplitView.Pane>
  28. <StackPanel>
  29. <ContentControl Content="{Binding Page}" Grid.Column="1" Grid.Row="1"/>
  30. </StackPanel>
  31. </SplitView>
  32. </UserControl>