1
0

ImagePage.xaml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <UserControl xmlns="https://github.com/avaloniaui">
  2. <StackPanel Orientation="Vertical" Spacing="4">
  3. <TextBlock Classes="h1">Image</TextBlock>
  4. <TextBlock Classes="h2">Displays an image</TextBlock>
  5. <StackPanel Orientation="Horizontal"
  6. Margin="0,16,0,0"
  7. HorizontalAlignment="Center"
  8. Spacing="16">
  9. <StackPanel Orientation="Vertical">
  10. <TextBlock>No Stretch</TextBlock>
  11. <Image Source="resm:ControlCatalog.Assets.delicate-arch-896885_640.jpg"
  12. Width="100" Height="200"
  13. Stretch="None"/>
  14. </StackPanel>
  15. <StackPanel Orientation="Vertical">
  16. <TextBlock>Fill</TextBlock>
  17. <Image Source="resm:ControlCatalog.Assets.delicate-arch-896885_640.jpg"
  18. Width="100" Height="200"
  19. Stretch="Fill"/>
  20. </StackPanel>
  21. <StackPanel Orientation="Vertical">
  22. <TextBlock>Uniform</TextBlock>
  23. <Image Source="resm:ControlCatalog.Assets.delicate-arch-896885_640.jpg"
  24. Width="100" Height="200"
  25. Stretch="Uniform"/>
  26. </StackPanel>
  27. <StackPanel Orientation="Vertical">
  28. <TextBlock>UniformToFill</TextBlock>
  29. <Image Source="resm:ControlCatalog.Assets.delicate-arch-896885_640.jpg"
  30. Width="100" Height="200"
  31. Stretch="UniformToFill"/>
  32. </StackPanel>
  33. </StackPanel>
  34. <StackPanel Orientation="Vertical">
  35. <TextBlock>Window Icon as an Image</TextBlock>
  36. <Image Name="Icon" Width="100" Height="200" Stretch="None" />
  37. </StackPanel>
  38. </StackPanel>
  39. </UserControl>