ListBoxProperty.xaml 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  1. <UserControl x:Class="PDF_Master.Views.Form.ListBoxProperty"
  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:PDF_Master.Views.Form"
  7. xmlns:prism="http://prismlibrary.com/"
  8. prism:ViewModelLocator.AutoWireViewModel="True"
  9. xmlns:CompositeControl="clr-namespace:PDF_Master.CustomControl.CompositeControl"
  10. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  11. xmlns:cus="clr-namespace:PDF_Master.CustomControl"
  12. xmlns:convert="clr-namespace:PDF_Master.DataConvert"
  13. xmlns:form="clr-namespace:PDF_Master.CustomControl.Form"
  14. mc:Ignorable="d"
  15. d:DesignHeight="450" d:DesignWidth="800">
  16. <UserControl.Resources>
  17. <ResourceDictionary>
  18. <ResourceDictionary.MergedDictionaries>
  19. <ResourceDictionary Source="../../Styles/ListViewStyle.xaml" />
  20. <ResourceDictionary Source="../../Styles/SliderStyle.xaml"/>
  21. </ResourceDictionary.MergedDictionaries>
  22. <convert:InvertBoolConvert x:Key="InvertBoolConvert" />
  23. <Style TargetType="{x:Type TabItem}">
  24. <Setter Property="Width" Value="74.67 " />
  25. <Setter Property="Height" Value="28" />
  26. <Setter Property="BorderThickness" Value="0" />
  27. <Setter Property="Template" Value="{DynamicResource Segmented}" />
  28. </Style>
  29. <Style TargetType="{x:Type Path}">
  30. <Setter Property="Width" Value="16" />
  31. <Setter Property="Height" Value="16" />
  32. <Setter Property="Fill" Value="{StaticResource color.icon.base.neutral.norm.lv1}" />
  33. </Style>
  34. <DataTemplate x:Key="ContentColorTemplate">
  35. <Grid Width="84" Height="24">
  36. <Rectangle Stroke="Red" StrokeThickness="1"/>
  37. <TextBlock Text="Text"/>
  38. </Grid>
  39. </DataTemplate>
  40. <ContextMenu x:Key="ColorBtnFlyoutMenu" FontSize="14">
  41. <ContextMenu.ItemContainerStyle>
  42. <Style TargetType="MenuItem">
  43. <Setter Property="Padding" Value="0,7,0,7" />
  44. <Setter Property="VerticalContentAlignment" Value="Center" />
  45. </Style>
  46. </ContextMenu.ItemContainerStyle>
  47. <MenuItem
  48. Name="EditMenuItem"
  49. Click="EditMenuItem_Click"
  50. Header="Edit"
  51. IsEnabled="True" />
  52. </ContextMenu>
  53. <DataTemplate x:Key="numberData">
  54. <Grid>
  55. <TextBlock Text="{Binding Content}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  56. </Grid>
  57. </DataTemplate>
  58. </ResourceDictionary>
  59. </UserControl.Resources>
  60. <Grid ScrollViewer.VerticalScrollBarVisibility="Auto">
  61. <Grid.RowDefinitions>
  62. <RowDefinition Height="auto" />
  63. <RowDefinition Height="*" />
  64. <RowDefinition Height="auto" />
  65. </Grid.RowDefinitions>
  66. <TextBlock
  67. Margin="16,14"
  68. FontFamily="Segoe UI"
  69. FontSize="14"
  70. FontWeight="SemiBold"
  71. Text="Text Field" />
  72. <TabControl
  73. Grid.Row="1"
  74. Margin="16,0"
  75. Padding="0"
  76. Background="Transparent"
  77. BorderThickness="0"
  78. Style="{DynamicResource FormTabControl}">
  79. <TabItem>
  80. <TabItem.Header>
  81. <Path Data="M8.33337 2.75704L3.19495 4.5L8.33337 6.24296L9.93268 5.70047L10.7558 5.42127L11.2376 6.84178L10.4145 7.12098L8.76831 7.67937C8.49068 7.77354 8.17606 7.77354 7.89843 7.67937L1.31361 5.44579C0.999461 5.33923 0.583374 5.03874 0.583374 4.5C0.583374 3.96126 0.999461 3.66077 1.31361 3.55421L7.89843 1.32063C8.17606 1.22646 8.49068 1.22646 8.76831 1.32063L15.3531 3.55421C15.6673 3.66077 16.0834 3.96126 16.0834 4.5C16.0834 5.03874 15.6673 5.33923 15.3531 5.44579L14.53 5.72499L13.7069 6.00419L13.2251 4.58368L13.4718 4.5L8.33337 2.75704ZM8.33337 9.74993L15.1244 7.7797L15.5423 9.2203L8.7427 11.193C8.48085 11.269 8.1859 11.269 7.92405 11.193L1.1244 9.2203L1.54235 7.7797L8.33337 9.74993ZM15.1244 11.2797L8.33337 13.2499L1.54235 11.2797L1.1244 12.7203L7.92405 14.693C8.1859 14.769 8.48085 14.769 8.7427 14.693L15.5423 12.7203L15.1244 11.2797Z" Fill="{StaticResource color.light.gray.11}" />
  82. </TabItem.Header>
  83. <StackPanel Background="Transparent" IsEnabled="{Binding ElementName=ChkLock, Path=IsChecked, Converter={StaticResource InvertBoolConvert}}">
  84. <TextBlock
  85. Margin="0,18,0,10"
  86. Style="{StaticResource PropertyHeaderLv2}"
  87. Text="Name" />
  88. <cus:TextBoxEx x:Name="TbName" Height="32" CornerRadius="4" Text="{Binding FieldName,Mode=TwoWay}" >
  89. <i:Interaction.Triggers>
  90. <i:EventTrigger EventName="TextChanged">
  91. <i:InvokeCommandAction Command="{Binding FieldNameTextChangedCommand}" CommandParameter="{Binding ElementName=TbName,Path=Text}"/>
  92. </i:EventTrigger>
  93. </i:Interaction.Triggers>
  94. </cus:TextBoxEx>
  95. <TextBlock
  96. Margin="0,18,0,10"
  97. Style="{StaticResource PropertyHeaderLv2}"
  98. Text="ToolTip" />
  99. <cus:TextBoxEx x:Name="TbToolTip" Height="32" CornerRadius="4" Text="{Binding ToolTipStr,Mode=TwoWay}">
  100. <i:Interaction.Triggers>
  101. <i:EventTrigger EventName="TextChanged">
  102. <i:InvokeCommandAction Command="{Binding ToolTipTextChangedCommand}" CommandParameter="{Binding ElementName=TbToolTip,Path=Text}"/>
  103. </i:EventTrigger>
  104. </i:Interaction.Triggers>
  105. </cus:TextBoxEx>
  106. <TextBlock
  107. Margin="0,18,0,10"
  108. Style="{StaticResource PropertyHeaderLv2}"
  109. Text="Form Field" />
  110. <form:FormFieldCombox x:Name="formCombox" Type="{Binding FormField,Mode=TwoWay}" Height="32" Margin="0,8,0,16" />
  111. <CheckBox x:Name="ReadOnlyCheckBox" Content="Read Only" IsChecked="{Binding IsReadOnly,Mode=TwoWay}"/>
  112. <CheckBox x:Name="RequiredFieldCheckBox" Margin="0,8" Content="Required field" IsChecked="{Binding IsRequiredField,Mode=TwoWay}" />
  113. </StackPanel>
  114. </TabItem>
  115. <TabItem>
  116. <TabItem.Header>
  117. <Path Data="M2.5 2.5V4.5H10.5V2.5H2.5ZM2 1C1.44772 1 1 1.44772 1 2V5C1 5.55228 1.44771 6 2 6H11C11.5523 6 12 5.55228 12 5V3.75H13.25V6.58333H8.4C7.76487 6.58333 7.25 7.09821 7.25 7.73333V9H7C6.44772 9 6 9.44772 6 10V14C6 14.5523 6.44772 15 7 15H9C9.55228 15 10 14.5523 10 14V10C10 9.44772 9.55228 9 9 9H8.75V8.08333H13.6C14.2351 8.08333 14.75 7.56846 14.75 6.93333V3.4C14.75 2.76487 14.2351 2.25 13.6 2.25H12V2C12 1.44772 11.5523 1 11 1H2ZM7.50018 13.4998V10.5002H8.49982V13.4998H7.50018Z" Fill="{StaticResource color.light.gray.11}" />
  118. </TabItem.Header>
  119. <Grid IsEnabled="{Binding ElementName=ChkLock, Path=IsChecked, Converter={StaticResource InvertBoolConvert}}" >
  120. <StackPanel>
  121. <StackPanel>
  122. <TextBlock
  123. Margin="0,18,0,10"
  124. Style="{StaticResource PropertyHeaderLv2}"
  125. Text="Set Color" />
  126. <Grid Height="100" >
  127. <Grid.RowDefinitions>
  128. <RowDefinition Height="auto"/>
  129. <RowDefinition Height="auto"/>
  130. </Grid.RowDefinitions>
  131. <Grid.ColumnDefinitions>
  132. <ColumnDefinition Width="*"/>
  133. <ColumnDefinition Width="*"/>
  134. </Grid.ColumnDefinitions>
  135. <RadioButton x:Name="OneBtn" BorderThickness="1" Width="104" Height="48" Grid.Row="0" Grid.Column="0" Tag="One"
  136. Style="{StaticResource BlueBorderRadionButtonWithCorner}" Padding="3"
  137. ContextMenu="{StaticResource ColorBtnFlyoutMenu}"
  138. >
  139. <Grid Width="96" Height="40">
  140. <Grid.RowDefinitions>
  141. <RowDefinition Height="*"/>
  142. <RowDefinition Height="1"/>
  143. <RowDefinition Height="*"/>
  144. </Grid.RowDefinitions>
  145. <Rectangle Grid.Row="0" Grid.RowSpan="3" Fill="{Binding ResetColorOne.FillColor}" Stroke="{Binding ResetColorOne.BorderColor}" StrokeThickness="1" VerticalAlignment="Stretch"/>
  146. <Rectangle Grid.Row="1" Height="1" Fill="{Binding ResetColorOne.BorderColor}" VerticalAlignment="Stretch"/>
  147. <TextBlock Grid.Row="0" Margin="8,0,0,0" Text="Text" FontSize="14" LineHeight="22" FontFamily="Segoe UI" Foreground="{Binding ResetColorOne.FontColor}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
  148. <TextBlock Grid.Row="2" Margin="8,0,0,0" Text="Text" FontSize="14" LineHeight="22" FontFamily="Segoe UI" Foreground="{Binding ResetColorOne.FontColor}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
  149. </Grid>
  150. <i:Interaction.Triggers>
  151. <i:EventTrigger EventName="Checked">
  152. <i:InvokeCommandAction Command="{Binding ResetColorCheckedBtnCommand}" CommandParameter="{Binding ElementName=OneBtn,Path=Tag}"/>
  153. </i:EventTrigger>
  154. </i:Interaction.Triggers>
  155. </RadioButton>
  156. <RadioButton x:Name="TwoBtn" BorderThickness="1" Width="104" Height="50" Grid.Row="0" Grid.Column="1" Tag="Two"
  157. Style="{StaticResource BlueBorderRadionButtonWithCorner}"
  158. ContextMenu="{StaticResource ColorBtnFlyoutMenu}"
  159. >
  160. <Grid Width="96" Height="40">
  161. <Grid.RowDefinitions>
  162. <RowDefinition Height="*"/>
  163. <RowDefinition Height="1"/>
  164. <RowDefinition Height="*"/>
  165. </Grid.RowDefinitions>
  166. <Rectangle Grid.Row="0" Grid.RowSpan="3" Fill="{Binding ResetColorTwo.FillColor}" Stroke="{Binding ResetColorTwo.BorderColor}" StrokeThickness="1" VerticalAlignment="Stretch"/>
  167. <Rectangle Grid.Row="1" Height="1" Fill="{Binding ResetColorTwo.BorderColor}" VerticalAlignment="Stretch"/>
  168. <TextBlock Grid.Row="0" Margin="8,0,0,0" Text="Text" FontSize="14" LineHeight="22" FontFamily="Segoe UI" Foreground="{Binding ResetColorTwo.FontColor}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
  169. <TextBlock Grid.Row="2" Margin="8,0,0,0" Text="Text" FontSize="14" LineHeight="22" FontFamily="Segoe UI" Foreground="{Binding ResetColorTwo.FontColor}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
  170. </Grid>
  171. <i:Interaction.Triggers>
  172. <i:EventTrigger EventName="Checked">
  173. <i:InvokeCommandAction Command="{Binding ResetColorCheckedBtnCommand}" CommandParameter="{Binding ElementName=TwoBtn,Path=Tag}"/>
  174. </i:EventTrigger>
  175. </i:Interaction.Triggers>
  176. </RadioButton>
  177. <RadioButton x:Name="ThreeBtn" BorderThickness="1" Width="104" Height="50" Grid.Row="1" Grid.Column="0" Tag="Three"
  178. Style="{StaticResource BlueBorderRadionButtonWithCorner}"
  179. ContextMenu="{StaticResource ColorBtnFlyoutMenu}"
  180. >
  181. <Grid Width="96" Height="40">
  182. <Grid.RowDefinitions>
  183. <RowDefinition Height="*"/>
  184. <RowDefinition Height="1"/>
  185. <RowDefinition Height="*"/>
  186. </Grid.RowDefinitions>
  187. <Rectangle Grid.Row="0" Grid.RowSpan="3" Fill="{Binding ResetColorThree.FillColor}" Stroke="{Binding ResetColorThree.BorderColor}" StrokeThickness="1" VerticalAlignment="Stretch"/>
  188. <Rectangle Grid.Row="1" Height="1" Fill="{Binding ResetColorThree.BorderColor}" VerticalAlignment="Stretch"/>
  189. <TextBlock Grid.Row="0" Margin="8,0,0,0" Text="Text" FontSize="14" LineHeight="22" FontFamily="Segoe UI" Foreground="{Binding ResetColorThree.FontColor}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
  190. <TextBlock Grid.Row="2" Margin="8,0,0,0" Text="Text" FontSize="14" LineHeight="22" FontFamily="Segoe UI" Foreground="{Binding ResetColorThree.FontColor}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
  191. </Grid>
  192. <i:Interaction.Triggers>
  193. <i:EventTrigger EventName="Checked">
  194. <i:InvokeCommandAction Command="{Binding ResetColorCheckedBtnCommand}" CommandParameter="{Binding ElementName=ThreeBtn,Path=Tag}"/>
  195. </i:EventTrigger>
  196. </i:Interaction.Triggers>
  197. </RadioButton>
  198. <RadioButton x:Name="ForthBtn" BorderThickness="1" Width="104" Height="50" Grid.Row="1" Grid.Column="1" Tag="Forth"
  199. Style="{StaticResource BlueBorderRadionButtonWithCorner}"
  200. ContextMenu="{StaticResource ColorBtnFlyoutMenu}"
  201. >
  202. <Grid Width="96" Height="40">
  203. <Grid.RowDefinitions>
  204. <RowDefinition Height="*"/>
  205. <RowDefinition Height="1"/>
  206. <RowDefinition Height="*"/>
  207. </Grid.RowDefinitions>
  208. <Rectangle Grid.Row="0" Grid.RowSpan="3" Fill="{Binding ResetColorForth.FillColor}" Stroke="{Binding ResetColorForth.BorderColor}" StrokeThickness="1" VerticalAlignment="Stretch"/>
  209. <Rectangle Grid.Row="1" Height="1" Fill="{Binding ResetColorForth.BorderColor}" VerticalAlignment="Stretch"/>
  210. <TextBlock Grid.Row="0" Margin="8,0,0,0" Text="Text" FontSize="14" LineHeight="22" FontFamily="Segoe UI" Foreground="{Binding ResetColorForth.FontColor}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
  211. <TextBlock Grid.Row="2" Margin="8,0,0,0" Text="Text" FontSize="14" LineHeight="22" FontFamily="Segoe UI" Foreground="{Binding ResetColorForth.FontColor}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
  212. </Grid>
  213. <i:Interaction.Triggers>
  214. <i:EventTrigger EventName="Checked">
  215. <i:InvokeCommandAction Command="{Binding ResetColorCheckedBtnCommand}" CommandParameter="{Binding ElementName=ForthBtn,Path=Tag}"/>
  216. </i:EventTrigger>
  217. </i:Interaction.Triggers>
  218. </RadioButton>
  219. </Grid>
  220. </StackPanel>
  221. <StackPanel>
  222. <TextBlock
  223. Margin="0,18,0,10"
  224. Style="{StaticResource PropertyHeaderLv2}"
  225. Text="Line" />
  226. <CompositeControl:SlidComboControl x:Name="thickness" Value="{Binding BorderThiness,Mode=TwoWay}"/>
  227. <StackPanel
  228. x:Name="PnlLineStyle"
  229. Margin="0,20,0,0"
  230. Orientation="Horizontal">
  231. <cus:CustomIconToggleBtn
  232. x:Name="BtnSolidLine"
  233. Width="110"
  234. Height="32"
  235. Click="BtnLineStyle_Click"
  236. Command="{Binding LineStyleCommand}"
  237. CommandParameter="{Binding ElementName=BtnSolidLine, Path=Tag}"
  238. Style="{StaticResource ToggleBtnViewModeStyle}" IsChecked="{Binding IsSolid}"
  239. Tag="Solid">
  240. <Border
  241. Width="108"
  242. Height="30"
  243. Padding="8,0,8,0"
  244. BorderBrush="Black"
  245. BorderThickness="1">
  246. <Line
  247. Stroke="Black"
  248. StrokeThickness="2"
  249. X1="10"
  250. X2="260"
  251. Y1="15"
  252. Y2="15" />
  253. </Border>
  254. </cus:CustomIconToggleBtn>
  255. <cus:CustomIconToggleBtn
  256. x:Name="BtnDottedLine"
  257. Width="110"
  258. Height="32"
  259. Click="BtnLineStyle_Click"
  260. Command="{Binding LineStyleCommand}"
  261. CommandParameter="{Binding ElementName=BtnDottedLine, Path=Tag}"
  262. Style="{StaticResource ToggleBtnViewModeStyle}" IsChecked="{Binding IsSolid,Converter={StaticResource InvertBoolConvert}}"
  263. Tag="Dotted">
  264. <Border
  265. Width="108"
  266. Height="30"
  267. Padding="8,0,8,0"
  268. BorderBrush="Black"
  269. BorderThickness="1">
  270. <Line
  271. Stroke="Black"
  272. StrokeDashArray="2"
  273. StrokeThickness="2"
  274. X1="10"
  275. X2="260"
  276. Y1="15"
  277. Y2="15" />
  278. </Border>
  279. </cus:CustomIconToggleBtn>
  280. </StackPanel>
  281. </StackPanel>
  282. <StackPanel>
  283. <TextBlock
  284. Margin="0,18,0,10"
  285. Style="{StaticResource PropertyHeaderLv2}"
  286. Text="文本" />
  287. <Grid Margin="0,6,0,0">
  288. <Grid.ColumnDefinitions>
  289. <ColumnDefinition Width="auto"></ColumnDefinition>
  290. <ColumnDefinition Width="auto"></ColumnDefinition>
  291. </Grid.ColumnDefinitions>
  292. <Grid.RowDefinitions>
  293. <RowDefinition Height="auto"></RowDefinition>
  294. <RowDefinition Height="auto"></RowDefinition>
  295. <RowDefinition Height="auto"></RowDefinition>
  296. </Grid.RowDefinitions>
  297. <CompositeControl:CustomComboControl x:Name="FontFamilyBox"
  298. ItemSource="{Binding FontFamilyItems}" SelectedItems="{Binding FontFamilyData,Mode=TwoWay}"
  299. IsValueContent="True" Grid.ColumnSpan="2" Width="228" Height="32">
  300. </CompositeControl:CustomComboControl>
  301. <CompositeControl:CustomComboControl x:Name="FontStyleBox" Grid.Row="1"
  302. Width="148" Height="32" Margin="12,8,4,0"
  303. ItemSource="{Binding FontStyleItems}" SelectedItems="{Binding FontWeightStyleItem,Mode=TwoWay}"
  304. IsValueContent="True" Grid.Column="0">
  305. </CompositeControl:CustomComboControl>
  306. <CompositeControl:CustomComboControl x:Name="FontSizeBox" Grid.Row="1" Grid.Column="1" SelectedItems="{Binding FontSizeData,Mode=TwoWay}"
  307. Width="80" Height="32" Margin="-1,8,0,0"
  308. >
  309. </CompositeControl:CustomComboControl>
  310. </Grid>
  311. </StackPanel>
  312. <StackPanel>
  313. <TextBlock
  314. Margin="0,18,0,10"
  315. Style="{StaticResource PropertyHeaderLv2}"
  316. Text="大小" />
  317. <StackPanel Orientation="Horizontal">
  318. <Path Data="M12.9999 8.75012V10.8285L15.8284 8.00006L12.9999 5.17163V7.25012H2.82843V5.17175L0 8.00017L2.82843 10.8286V8.75012H12.9999Z" Fill="#616469"/>
  319. <cus:NumericUpDown Height="32" Width="90" Value="{Binding WidthSize,Mode=TwoWay}"/>
  320. <Path Data="M10.8284 2.82843H8.74999L8.74999 12.9999H10.8285L8.00005 15.8284L5.17163 12.9999H7.24999L7.24999 2.82843H5.17151L7.99994 0L10.8284 2.82843Z" Fill="#616469"/>
  321. <cus:NumericUpDown Height="32" Width="90" Value="{Binding HeightSize,Mode=TwoWay}"/>
  322. </StackPanel>
  323. </StackPanel>
  324. </StackPanel>
  325. </Grid>
  326. </TabItem>
  327. <TabItem>
  328. <TabItem.Header>
  329. <Path Data="M4.91675 3.75V5H6.41675V1H4.91675V2.25H1.66675V3.75H4.91675ZM15.6667 3.75L7.66675 3.75V2.25L15.6667 2.25V3.75ZM1.66675 7.25V8.75H8.91675V10H10.4167V6H8.91675V7.25H1.66675ZM15.6667 8.75L11.6667 8.75V7.25L15.6667 7.25V8.75ZM7.66675 12.25V13.75L15.6667 13.75V12.25L7.66675 12.25ZM4.91675 13.75H1.66675V12.25H4.91675V11H6.41675V15H4.91675V13.75Z" Fill="{StaticResource color.light.gray.11}" />
  330. </TabItem.Header>
  331. <Grid>
  332. <StackPanel IsEnabled="{Binding ElementName=ChkLock, Path=IsChecked, Converter={StaticResource InvertBoolConvert}}">
  333. <TextBlock
  334. Margin="0,18,0,10"
  335. Style="{StaticResource PropertyHeaderLv2}"
  336. Text="Projects" />
  337. <Grid>
  338. <cus:TextBoxEx x:Name="TbOptionKey"
  339. Width="188"
  340. Height="32"
  341. HorizontalAlignment="Left"
  342. CornerRadius="4" Text="{Binding OptionKey,Mode=TwoWay}">
  343. <i:Interaction.Triggers>
  344. <i:EventTrigger EventName="TextChanged">
  345. <i:InvokeCommandAction Command="{Binding OptionKeyTextChangedCommand}" CommandParameter="{Binding ElementName=TbOptionKey,Path=Text}"/>
  346. </i:EventTrigger>
  347. </i:Interaction.Triggers>
  348. </cus:TextBoxEx>
  349. <Button
  350. Width="32"
  351. HorizontalAlignment="Right" Command="{Binding AddOptionCommand}" IsEnabled="{Binding IsInputOption}"
  352. Style="{StaticResource btn.sec-icon}">
  353. <Path Data="M7.25 8.75V14H8.75V8.75H14V7.25H8.75V2H7.25V7.25H2V8.75H7.25Z" />
  354. </Button>
  355. </Grid>
  356. <TextBlock
  357. Margin="0,18,0,10"
  358. Style="{StaticResource PropertyHeaderLv2}"
  359. Text="Exported Values" />
  360. <cus:TextBoxEx x:Name="TbOptionKeyValue" Height="32" CornerRadius="4" Text="{Binding OptionKeyValue,Mode=TwoWay}">
  361. <i:Interaction.Triggers>
  362. <i:EventTrigger EventName="TextChanged">
  363. <i:InvokeCommandAction Command="{Binding OptionKeyValueTextChangedCommand}" CommandParameter="{Binding ElementName=TbOptionKeyValue,Path=Text}"/>
  364. </i:EventTrigger>
  365. </i:Interaction.Triggers>
  366. </cus:TextBoxEx>
  367. <ListBox x:Name="optionList" Height="98" Margin="0,8" ItemsSource="{Binding OptionItems}" ItemTemplate="{StaticResource numberData}">
  368. <i:Interaction.Triggers>
  369. <i:EventTrigger EventName="SelectionChanged">
  370. <i:InvokeCommandAction Command="{Binding OptionSelectionChangedCommand}" CommandParameter="{Binding ElementName=optionList,Path=SelectedIndex}"/>
  371. </i:EventTrigger>
  372. </i:Interaction.Triggers>
  373. </ListBox>
  374. <StackPanel Margin="0,0,0,8" Orientation="Horizontal">
  375. <Button
  376. Width="32"
  377. Height="32"
  378. IsEnabled="{Binding IsRemoveOption}"
  379. Command="{Binding RemoveOptionCommand}" CommandParameter="{Binding ElementName=optionList,Path=SelectedItem}"
  380. Style="{StaticResource btn.sec-icon}">
  381. <Path Data="M6 1.75H10V0.25H6V1.75ZM1 4.25H2.25V15C2.25 15.4142 2.58579 15.75 3 15.75H13C13.4142 15.75 13.75 15.4142 13.75 15V4.25H15V2.75H1V4.25ZM3.75 14.25V4.25H12.25V14.25H3.75ZM7.25 6.5V11.5H8.75V6.5H7.25Z" />
  382. </Button>
  383. <Button
  384. Width="32"
  385. Height="32"
  386. Margin="8,0"
  387. IsEnabled="{Binding IsDownOption}"
  388. Command="{Binding DownItemOptionCommand}" CommandParameter="{Binding ElementName=optionList,Path=SelectedItem}"
  389. Style="{StaticResource btn.sec-icon}">
  390. <Path Data="M8.72505 12.4147L8.72505 1.02539L7.22505 1.02539L7.22505 12.4147L4.9054 10.0951L3.84474 11.1557L7.44471 14.7557C7.7376 15.0486 8.21248 15.0486 8.50537 14.7557L12.1053 11.1557L11.0447 10.0951L8.72505 12.4147Z" />
  391. </Button>
  392. <Button
  393. Width="32"
  394. Height="32"
  395. IsEnabled="{Binding IsUpOption}"
  396. Command="{Binding UpItemOptionCommand}" CommandParameter="{Binding ElementName=optionList,Path=SelectedItem}"
  397. Style="{StaticResource btn.sec-icon}">
  398. <Path Data="M8.77509 3.58605L11.0947 5.9057L12.1554 4.84504L8.55542 1.24506C8.26253 0.952167 7.78765 0.952167 7.49476 1.24506L3.89478 4.84504L4.95544 5.9057L7.27509 3.58605L7.27509 14.9754L8.77509 14.9754L8.77509 3.58605Z" />
  399. </Button>
  400. </StackPanel>
  401. <CheckBox Margin="0,8,0,4" Content="Sort Items" />
  402. <CheckBox Margin="0,4" Content="Allow users to enter custom text" />
  403. <CheckBox Margin="0,4">
  404. <TextBlock Text="Submit the selected value immediately" TextWrapping="Wrap" />
  405. </CheckBox>
  406. </StackPanel>
  407. </Grid>
  408. </TabItem>
  409. </TabControl>
  410. <Border
  411. Grid.Row="2"
  412. BorderBrush="{StaticResource color.sys.layout.divider}"
  413. BorderThickness="0,1,0,0">
  414. <CheckBox
  415. Name="ChkLock"
  416. Margin="16"
  417. Content="Locked" IsChecked="{Binding IsLocked,Mode=TwoWay}">
  418. </CheckBox>
  419. </Border>
  420. </Grid>
  421. </UserControl>