BorderPage.xaml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. d:DesignHeight="800"
  6. d:DesignWidth="400"
  7. x:Class="ControlCatalog.Pages.BorderPage">
  8. <StackPanel Orientation="Vertical" Spacing="4">
  9. <TextBlock Classes="h2">A control which decorates a child with a border and background</TextBlock>
  10. <StackPanel Orientation="Vertical"
  11. Margin="0,16,0,0"
  12. HorizontalAlignment="Center"
  13. Spacing="16">
  14. <Border BorderBrush="{DynamicResource SystemAccentColor}" BorderThickness="2" Padding="16">
  15. <TextBlock>Border</TextBlock>
  16. </Border>
  17. <Border Background="{DynamicResource SystemAccentColorDark1}"
  18. BorderBrush="{DynamicResource SystemAccentColor}"
  19. BorderThickness="4"
  20. Padding="16">
  21. <TextBlock>Border and Background</TextBlock>
  22. </Border>
  23. <Border BorderBrush="{DynamicResource SystemAccentColor}"
  24. BorderThickness="4"
  25. CornerRadius="8"
  26. Padding="16">
  27. <TextBlock>Rounded Corners</TextBlock>
  28. </Border>
  29. <Border Background="{DynamicResource SystemAccentColor}"
  30. CornerRadius="8"
  31. Padding="16">
  32. <TextBlock>Rounded Corners</TextBlock>
  33. </Border>
  34. <Border Width="100" Height="100"
  35. BorderThickness="0"
  36. Background="White"
  37. CornerRadius="100" ClipToBounds="True">
  38. <Image Source="/Assets/maple-leaf-888807_640.jpg" Stretch="UniformToFill" />
  39. </Border>
  40. <TextBlock Text="Border with Clipping" HorizontalAlignment="Center" />
  41. </StackPanel>
  42. </StackPanel>
  43. </UserControl>