Advertisement
Guest User

Avalonia Sandbox

a guest
Sep 9th, 2019
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.38 KB | None | 0 0
  1. <Window 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="300"
  6.        x:Class="Kohctpyktop.Avalonia.MainWindow"
  7.        Title="Avalonia Sandbox">
  8.   <DockPanel Classes="MenuPanel" LastChildFill="True">
  9.     <DockPanel.Styles>
  10.       <Style Selector="DockPanel TextBlock">
  11.         <Setter Property="Width" Value="0"></Setter>
  12.         <Setter Property="Margin" Value="0"></Setter>
  13.       </Style>
  14.       <Style Selector="DockPanel:pointerover TextBlock">
  15.         <Setter Property="Width" Value="NaN"></Setter>
  16.         <Setter Property="Margin" Value="10"></Setter>
  17.       </Style>
  18.     </DockPanel.Styles>
  19.     <StackPanel Orientation="Vertical" DockPanel.Dock="Left">
  20.       <Button Padding="10" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left">
  21.         <DockPanel>
  22.           <Rectangle DockPanel.Dock="Left" Fill="LightBlue" Stroke="Black" StrokeThickness="1" Width="48" Height="48"></Rectangle>
  23.           <TextBlock FontSize="16" FontWeight="Bold" VerticalAlignment="Center">Levels</TextBlock>
  24.         </DockPanel>
  25.       </Button>
  26.       <Button Padding="10" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left">
  27.         <DockPanel>
  28.           <Rectangle DockPanel.Dock="Left" Fill="AntiqueWhite" Stroke="Black" StrokeThickness="1" Width="48" Height="48"></Rectangle>
  29.           <TextBlock FontSize="16" FontWeight="Bold" VerticalAlignment="Center">Scores</TextBlock>
  30.         </DockPanel>
  31.       </Button>
  32.       <Button Padding="10" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left">
  33.         <DockPanel>
  34.           <Rectangle DockPanel.Dock="Left" Fill="LightPink" Stroke="Black" StrokeThickness="1" Width="48" Height="48"></Rectangle>
  35.           <TextBlock FontSize="16" FontWeight="Bold" VerticalAlignment="Center">Menu</TextBlock>
  36.         </DockPanel>
  37.       </Button>
  38.     </StackPanel>
  39.     <Canvas>
  40.       <Border Classes="non-animated" Width="100" Height="100" Background="Red" Canvas.Left="100" Canvas.Top="100">
  41.         <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="LightGreen" FontWeight="Bold">TEXT</TextBlock>
  42.       </Border>
  43.     </Canvas>
  44.   </DockPanel>
  45. </Window>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement