BasicControlsView.xaml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <UserControl x:Class="SKMC.UI.DesignApp.Views.BasicControlsView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:SKMC.UI.DesignApp.Views"
  7. xmlns:c="clr-namespace:SKMC.UI.CustomControls;assembly=SKMC.UI"
  8. xmlns:u="clr-namespace:SKMC.UI.UserControls;assembly=SKMC.UI"
  9. xmlns:prism="http://prismlibrary.com/"
  10. prism:ViewModelLocator.AutoWireViewModel="True"
  11. mc:Ignorable="d"
  12. d:DesignHeight="800" d:DesignWidth="1200">
  13. <Grid>
  14. <Border Style="{StaticResource Border.Base}"
  15. Background="Transparent">
  16. <StackPanel Orientation="Horizontal" Margin="3">
  17. <StackPanel HorizontalAlignment="Left">
  18. <Button Style="{StaticResource Button.Base}"
  19. Content="Button.Base"/>
  20. <Button Style="{StaticResource Button.Primary}"
  21. Content="Button.Primary"/>
  22. <Button Style="{StaticResource Button.Secondary}"
  23. Content="Button.Secondary"/>
  24. <Button Style="{StaticResource Button.Debug}"
  25. Content="Button.Debug"/>
  26. <Button Style="{StaticResource Button.WindowControl}"
  27. Content="{StaticResource Icon.Minimize}"
  28. ToolTip="Button.WindowControl Content = Icon.Minimize"/>
  29. <Button Style="{StaticResource Button.WindowControl}"
  30. Content="{StaticResource Icon.Maximize}"
  31. ToolTip="Button.WindowControl Content = Icon.Maximize"/>
  32. <Button Style="{StaticResource Button.WindowControl}"
  33. Content="{StaticResource Icon.Restore}"
  34. ToolTip="Button.WindowControl Content = Icon.Restore"/>
  35. <Button Style="{StaticResource Button.WindowControl}"
  36. Content="{StaticResource Icon.Close}"
  37. ToolTip="Button.WindowControl Content = Icon.Close"/>
  38. <Button Style="{StaticResource Button.SimpleIcon}"
  39. Content="{StaticResource Icon.Home}"
  40. ToolTip="Button.SimpleIcon Content = Icon.Home FontSize = 45"
  41. Height="50"
  42. Width="50"
  43. FontSize="35"/>
  44. <c:SKButton Style="{StaticResource Button.WithIcon}"
  45. Content="Button.WithIcon" Width="160"
  46. Icon="{StaticResource Icon.HomePosition}"
  47. FontSize="15"
  48. ToolTip="SKMC.UI.CustomControls.SKButton"/>
  49. <ToggleButton Style="{StaticResource ToggleButton.Base}" Margin="5"
  50. Content="ToggleButton.Base" Width="180"/>
  51. <ToggleButton Style="{StaticResource ToggleButton.Primary}" Margin="5"
  52. Content="ToggleButton.Primary" Width="180"/>
  53. <ToggleButton Style="{StaticResource ToggleButton.SimpleLamp}" Margin="5"
  54. Content="ToggleButton.SimpleLamp" Width="180"
  55. Height="40"
  56. FontSize="12"/>
  57. <ToggleButton Style="{StaticResource ToggleButton.SimpleLocker}" Margin="5"
  58. Content="ToggleButton.SimpleLocker" Width="60" Height="60"
  59. FontSize="45"/>
  60. <ToggleButton Style="{StaticResource ToggleButton.ThemeSwitch}" Margin="5"
  61. Content="ToggleButton.ThemeSwitch" Width="60" Height="60"
  62. FontSize="45"/>
  63. </StackPanel>
  64. <StackPanel Margin="3">
  65. <ComboBox Style="{StaticResource ComboBox.Primary}"
  66. Height="30" Width="180" Text="ComboBox.Primary">
  67. <ComboBoxItem>ComboBox.Primary</ComboBoxItem>
  68. <ComboBoxItem>ComboBox.Primary</ComboBoxItem>
  69. <ComboBoxItem>ComboBox.Primary</ComboBoxItem>
  70. </ComboBox>
  71. <DatePicker Style="{StaticResource DatePicker.Primary}"
  72. ToolTip="DatePicker.Primary"
  73. Margin="5"
  74. Width="150"/>
  75. <PasswordBox Style="{StaticResource PasswordBox.Base}"
  76. ToolTip="PasswordBox.Base"/>
  77. <RadioButton Style="{StaticResource RadioButton.Base}"
  78. Content="RadioButton.Base"
  79. Margin="5"/>
  80. <RadioButton Style="{StaticResource RadioButton.Base}"
  81. Content="RadioButton.Base"
  82. Margin="5"/>
  83. <RadioButton Style="{StaticResource RadioButton.Primary}"
  84. Content="RadioButton.Base"
  85. Margin="5"
  86. Width="150"
  87. FontSize="15"/>
  88. <c:SKRadioButton Style="{StaticResource RadioButton.SystemMenu}"
  89. Content="RadioButton.SystemMenu"
  90. Margin="5"
  91. Icon="{StaticResource Icon.Home}"
  92. FontSize="13"/>
  93. <c:SKTextBox Icon="{StaticResource Icon.MagnifyingGlass}"
  94. Text="TextBox.Primary"
  95. Style="{StaticResource TextBox.Primary}"
  96. Margin="5"
  97. Height="40"
  98. Width="180"
  99. ToolTip="SKTextBox"/>
  100. <c:SKTextBox Text="TextBox.Primary"
  101. Style="{StaticResource TextBox.Primary}"
  102. Margin="5"
  103. Height="40"
  104. ToolTip="SKTextBox"
  105. Unit="mm/s²"
  106. Width="180"/>
  107. <c:SKTextBox Text="TextBox.Primary"
  108. Style="{StaticResource TextBox.Primary}"
  109. Margin="5"
  110. Height="40"
  111. Width="180"
  112. ToolTip="SKTextBox"
  113. Unit="mm/s²"
  114. NumpadActivity="True"/>
  115. <TextBox Style="{StaticResource TextBox.SimpleWatermark}"
  116. Height="40"
  117. Margin="5"
  118. Width="180"
  119. Tag="TextBox.SimpleWatermark"/>
  120. <TextBox Style="{StaticResource TextBox.Base}"
  121. Height="40"
  122. Margin="5"
  123. Width="180"/>
  124. <CheckBox Style="{StaticResource Checkbox.Base}"
  125. Content="Checkbox.Base"/>
  126. <CheckBox Style="{StaticResource Checkbox.DefaultMargin}"
  127. Content="Checkbox.Default"/>
  128. <Label Content="ProgressBar.Base" Foreground="{StaticResource Brush.Text}"/>
  129. <ProgressBar Style="{StaticResource ProgressBar.Base}"
  130. Value="50"/>
  131. <Expander Style="{StaticResource Expander.Base}"
  132. Header="Expander.Base"
  133. Foreground="{StaticResource Brush.Text}"/>
  134. </StackPanel>
  135. <StackPanel>
  136. <DataGrid Style="{StaticResource DataGrid.Primary}"
  137. Width="500"
  138. Height="400"
  139. CanUserResizeColumns="True"
  140. ScrollViewer.HorizontalScrollBarVisibility="Visible"
  141. ScrollViewer.VerticalScrollBarVisibility="Visible">
  142. <DataGrid.Columns>
  143. <DataGridTextColumn
  144. Width="0.2*"
  145. Header="Id"
  146. IsReadOnly="True"/>
  147. <DataGridTextColumn
  148. Width="0.5*"
  149. Header="Name"
  150. IsReadOnly="True"/>
  151. <DataGridTextColumn
  152. Width="0.3*"
  153. Header="Time"
  154. IsReadOnly="True"/>
  155. <DataGridTextColumn
  156. Width="0.3*"
  157. Header="Level"
  158. IsReadOnly="True"/>
  159. <DataGridTextColumn
  160. Width="*"
  161. Header="Message"
  162. IsReadOnly="True"/>
  163. </DataGrid.Columns>
  164. </DataGrid>
  165. <ListView
  166. Grid.Row="0"
  167. Grid.ColumnSpan="2"
  168. Margin="0,5,0,0"
  169. BorderThickness="1"
  170. Style="{StaticResource ListView.Primary}"
  171. Width="500"
  172. Height="400"
  173. ScrollViewer.VerticalScrollBarVisibility="Visible"
  174. ScrollViewer.HorizontalScrollBarVisibility="Visible">
  175. <ListView.View>
  176. <GridView ColumnHeaderContainerStyle="{StaticResource ListView.ColumnHeader}">
  177. <GridViewColumn Width="70" Header="Id">
  178. <GridViewColumn.CellTemplate>
  179. <DataTemplate>
  180. <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  181. <TextBlock
  182. HorizontalAlignment="Center"
  183. VerticalAlignment="Center"/>
  184. </Border>
  185. </DataTemplate>
  186. </GridViewColumn.CellTemplate>
  187. </GridViewColumn>
  188. <GridViewColumn Width="70" Header="Name">
  189. <GridViewColumn.CellTemplate>
  190. <DataTemplate>
  191. <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  192. <TextBlock
  193. HorizontalAlignment="Center"
  194. VerticalAlignment="Center"/>
  195. </Border>
  196. </DataTemplate>
  197. </GridViewColumn.CellTemplate>
  198. </GridViewColumn>
  199. <GridViewColumn Width="200" Header="Catalog">
  200. <GridViewColumn.CellTemplate>
  201. <DataTemplate>
  202. <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  203. <TextBlock
  204. HorizontalAlignment="Center"
  205. VerticalAlignment="Center"/>
  206. </Border>
  207. </DataTemplate>
  208. </GridViewColumn.CellTemplate>
  209. </GridViewColumn>
  210. <GridViewColumn Width="120" Header="Value">
  211. <GridViewColumn.CellTemplate>
  212. <DataTemplate>
  213. <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  214. <TextBox Foreground="Blue"/>
  215. </Border>
  216. </DataTemplate>
  217. </GridViewColumn.CellTemplate>
  218. </GridViewColumn>
  219. <GridViewColumn Width="120" Header="Commet">
  220. <GridViewColumn.CellTemplate>
  221. <DataTemplate>
  222. <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  223. <TextBlock
  224. HorizontalAlignment="Center"
  225. VerticalAlignment="Center"
  226. Foreground="Green" />
  227. </Border>
  228. </DataTemplate>
  229. </GridViewColumn.CellTemplate>
  230. </GridViewColumn>
  231. </GridView>
  232. </ListView.View>
  233. </ListView>
  234. </StackPanel>
  235. <StackPanel>
  236. <StackPanel Orientation="Horizontal">
  237. <Label Content="LedControl" Foreground="{StaticResource Brush.Text}"/>
  238. <u:LedControl IsBlinking="True" Width="20" Height="20"/>
  239. </StackPanel>
  240. <u:StatusControl IsActive="True" IsBlinking="True"
  241. IsSecondStatusActive="True"
  242. IsSecondStatusBlinking="True"
  243. Label="StatusControl"
  244. Height="25"
  245. Margin="5"
  246. CornerRadius="3"/>
  247. <StackPanel Orientation="Horizontal">
  248. <Label Content="WaitIconControl" Foreground="{StaticResource Brush.Text}"/>
  249. <u:WaitIconControl ShowWait="True" Margin="3"/>
  250. </StackPanel>
  251. <StackPanel Orientation="Horizontal">
  252. <Label Content="IdControl" Foreground="{StaticResource Brush.Text}"/>
  253. <u:IdControl Id="1" Width="15" Height="15" Foreground="AliceBlue"/>
  254. <u:IdControl Id="2" Width="15" Height="15" Foreground="AliceBlue"/>
  255. <u:IdControl Id="3" Width="15" Height="15" Foreground="AliceBlue"/>
  256. <u:IdControl Id="4" Width="15" Height="15" Foreground="AliceBlue"/>
  257. </StackPanel>
  258. <u:ParameterControl ParameterTitle="ParameterControl"
  259. ParameterValue="50.0"
  260. ParameterUnit="mm"
  261. Width="210"
  262. Height="30"/>
  263. </StackPanel>
  264. </StackPanel>
  265. </Border>
  266. </Grid>
  267. </UserControl>