StartUpMenu.axaml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <UserControl
  2. MinHeight="{CompiledBinding WindowMinSize}"
  3. MinWidth="{CompiledBinding WindowMinSize}"
  4. d:DesignHeight="450"
  5. d:DesignWidth="800"
  6. mc:Ignorable="d"
  7. x:Class="PicView.Avalonia.Views.StartUpMenu"
  8. x:DataType="vm:MainViewModel"
  9. xmlns="https://github.com/avaloniaui"
  10. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  11. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  12. xmlns:vm="clr-namespace:PicView.Avalonia.ViewModels"
  13. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  14. <Design.DataContext>
  15. <vm:MainViewModel />
  16. </Design.DataContext>
  17. <UserControl.Resources>
  18. <SolidColorBrush Color="{StaticResource SecondaryTextColor}" x:Key="SelectFileBrush" />
  19. <SolidColorBrush Color="{StaticResource SecondaryTextColor}" x:Key="OpenLastFileBrush" />
  20. <SolidColorBrush Color="{StaticResource SecondaryTextColor}" x:Key="PasteBrush" />
  21. </UserControl.Resources>
  22. <Panel>
  23. <Viewbox
  24. Height="400"
  25. HorizontalAlignment="Center"
  26. Margin="15,20"
  27. VerticalAlignment="Center"
  28. Width="435"
  29. x:Name="LogoViewbox">
  30. <Image
  31. HorizontalAlignment="Center"
  32. Source="{StaticResource LogoImage}"
  33. Stretch="Fill"
  34. VerticalAlignment="Center"
  35. x:Name="Logo" />
  36. </Viewbox>
  37. <StackPanel
  38. Height="30"
  39. HorizontalAlignment="Center"
  40. Margin="0,220,25,16"
  41. Orientation="Horizontal"
  42. VerticalAlignment="Center"
  43. x:Name="Buttons">
  44. <Button Command="{CompiledBinding OpenFileCommand}" x:Name="SelectFileButton">
  45. <StackPanel Orientation="Horizontal">
  46. <Image Height="20.091">
  47. <Image.Source>
  48. <DrawingImage>
  49. <DrawingImage.Drawing>
  50. <DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z">
  51. <GeometryDrawing Geometry="F1 M512,512z M0,0z M64,192L64,120A40,40,0,0,1,104,80L179.89,80A40,40,0,0,1,202.08,86.72L229.92,105.28A40,40,0,0,0,252.11,112L408,112A40,40,0,0,1,448,152L448,192">
  52. <GeometryDrawing.Pen>
  53. <Pen
  54. Brush="{StaticResource SelectFileBrush}"
  55. LineJoin="Round"
  56. MiterLimit="1"
  57. Thickness="32" />
  58. </GeometryDrawing.Pen>
  59. </GeometryDrawing>
  60. <GeometryDrawing Geometry="F1 M512,512z M0,0z M479.9,226.55L463.68,392A40,40,0,0,1,423.75,432L88.25,432A40,40,0,0,1,48.32,392L32.1,226.55A32,32,0,0,1,64,192L448.1,192A32,32,0,0,1,479.9,226.55z">
  61. <GeometryDrawing.Pen>
  62. <Pen
  63. Brush="{StaticResource SelectFileBrush}"
  64. LineJoin="Round"
  65. MiterLimit="1"
  66. Thickness="32" />
  67. </GeometryDrawing.Pen>
  68. </GeometryDrawing>
  69. </DrawingGroup>
  70. </DrawingImage.Drawing>
  71. </DrawingImage>
  72. </Image.Source>
  73. </Image>
  74. <Label
  75. Content="{CompiledBinding Translation.SelectFile.Value,
  76. Mode=OneWay}"
  77. FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
  78. FontSize="14"
  79. Foreground="{StaticResource SelectFileBrush}"
  80. Padding="8,9,15,5"
  81. x:Name="OpenFileDialogLabel" />
  82. </StackPanel>
  83. </Button>
  84. <Button Command="{CompiledBinding OpenLastFileCommand}" x:Name="OpenLastFileButton">
  85. <StackPanel Height="30" Orientation="Horizontal">
  86. <Image Height="20.091">
  87. <Image.Source>
  88. <DrawingImage>
  89. <DrawingImage.Drawing>
  90. <DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z">
  91. <GeometryDrawing Geometry="F1 M512,512z M0,0z M112,111L112,401C112,418.44,129,429.52,143,421.16L390.9,272.79C403.02,265.54,403.02,246.46,390.9,239.21L143,90.84C129,82.48,112,93.56,112,111z">
  92. <GeometryDrawing.Pen>
  93. <Pen
  94. Brush="{StaticResource OpenLastFileBrush}"
  95. LineJoin="Miter"
  96. MiterLimit="1"
  97. Thickness="32" />
  98. </GeometryDrawing.Pen>
  99. </GeometryDrawing>
  100. <GeometryDrawing Geometry="F1 M512,512z M0,0z M400,80L400,432">
  101. <GeometryDrawing.Pen>
  102. <Pen
  103. Brush="{StaticResource OpenLastFileBrush}"
  104. LineJoin="Miter"
  105. MiterLimit="1"
  106. Thickness="32" />
  107. </GeometryDrawing.Pen>
  108. </GeometryDrawing>
  109. </DrawingGroup>
  110. </DrawingImage.Drawing>
  111. </DrawingImage>
  112. </Image.Source>
  113. </Image>
  114. <Label
  115. Content="{CompiledBinding Translation.OpenLastFile.Value,
  116. Mode=OneWay}"
  117. FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
  118. FontSize="14"
  119. Foreground="{StaticResource OpenLastFileBrush}"
  120. Padding="8,8,15,2"
  121. x:Name="OpenLastFileLabel" />
  122. </StackPanel>
  123. </Button>
  124. <Button Command="{CompiledBinding PasteCommand}" x:Name="PasteButton">
  125. <StackPanel Height="30" Orientation="Horizontal">
  126. <Path
  127. Data="{StaticResource PasteGeometry}"
  128. Fill="{StaticResource PasteBrush}"
  129. Height="20"
  130. Stretch="Fill"
  131. Width="20" />
  132. <Label
  133. Content="{CompiledBinding Translation.Paste.Value,
  134. Mode=OneWay}"
  135. FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
  136. FontSize="14"
  137. Foreground="{StaticResource PasteBrush}"
  138. Padding="8,9,15,5"
  139. x:Name="FilePasteLabel" />
  140. </StackPanel>
  141. </Button>
  142. </StackPanel>
  143. </Panel>
  144. </UserControl>