TextFieldProperty.xaml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <UserControl
  2. x:Class="PDF_Office.Views.Form.TextFieldProperty"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:convert="clr-namespace:PDF_Office.DataConvert"
  6. xmlns:cus="clr-namespace:PDF_Office.CustomControl"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:form="clr-namespace:PDF_Office.CustomControl.Form"
  9. xmlns:local="clr-namespace:PDF_Office.Views.Form"
  10. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  11. xmlns:prism="http://prismlibrary.com/"
  12. prism:ViewModelLocator.AutoWireViewModel="True"
  13. d:DesignHeight="750"
  14. d:DesignWidth="260"
  15. Background="{StaticResource color.sys.layout.mg}"
  16. mc:Ignorable="d">
  17. <UserControl.Resources>
  18. <ResourceDictionary>
  19. <convert:InvertBoolConvert x:Key="InvertBoolConvert" />
  20. <Style TargetType="{x:Type TabItem}">
  21. <Setter Property="Width" Value="74.67 " />
  22. <Setter Property="Height" Value="28" />
  23. <Setter Property="BorderThickness" Value="0" />
  24. <Setter Property="Template" Value="{DynamicResource Segmented}" />
  25. </Style>
  26. <Style TargetType="{x:Type Path}">
  27. <Setter Property="Width" Value="16" />
  28. <Setter Property="Height" Value="16" />
  29. <Setter Property="Fill" Value="{StaticResource color.icon.base.neutral.norm.lv1}" />
  30. </Style>
  31. </ResourceDictionary>
  32. </UserControl.Resources>
  33. <Grid ScrollViewer.VerticalScrollBarVisibility="Auto">
  34. <Grid.RowDefinitions>
  35. <RowDefinition Height="auto" />
  36. <RowDefinition Height="*" />
  37. <RowDefinition Height="auto" />
  38. </Grid.RowDefinitions>
  39. <TextBlock
  40. Margin="16,14"
  41. FontFamily="Segoe UI"
  42. FontSize="14"
  43. FontWeight="SemiBold"
  44. Text="Text Field" />
  45. <TabControl
  46. Grid.Row="1"
  47. Margin="16,0"
  48. Padding="0"
  49. Background="Transparent"
  50. BorderThickness="0"
  51. Style="{DynamicResource FormTabControl}">
  52. <TabItem>
  53. <TabItem.Header>
  54. <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}" />
  55. </TabItem.Header>
  56. <StackPanel Background="Transparent" IsEnabled="{Binding ElementName=ChkLock, Path=IsChecked, Converter={StaticResource InvertBoolConvert}}">
  57. <TextBlock
  58. Margin="0,18,0,10"
  59. Style="{StaticResource PropertyHeaderLv2}"
  60. Text="Name" />
  61. <cus:TextBoxEx Height="32" CornerRadius="4" />
  62. <TextBlock
  63. Margin="0,18,0,10"
  64. Style="{StaticResource PropertyHeaderLv2}"
  65. Text="ToolTip" />
  66. <cus:TextBoxEx Height="32" CornerRadius="4" />
  67. <TextBlock
  68. Margin="0,18,0,10"
  69. Style="{StaticResource PropertyHeaderLv2}"
  70. Text="Form Field" />
  71. <form:FormFieldCombox Height="32" Margin="0,8,0,16" />
  72. <CheckBox Content="Read Only" />
  73. <CheckBox Margin="0,8" Content="Required field" />
  74. </StackPanel>
  75. </TabItem>
  76. <TabItem>
  77. <TabItem.Header>
  78. <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}" />
  79. </TabItem.Header>
  80. <Grid IsEnabled="{Binding ElementName=ChkLock, Path=IsChecked, Converter={StaticResource InvertBoolConvert}}" />
  81. </TabItem>
  82. <TabItem>
  83. <TabItem.Header>
  84. <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}" />
  85. </TabItem.Header>
  86. <StackPanel IsEnabled="{Binding ElementName=ChkLock, Path=IsChecked, Converter={StaticResource InvertBoolConvert}}">
  87. <TextBlock
  88. Margin="0,18,0,10"
  89. Style="{StaticResource PropertyHeaderLv2}"
  90. Text="Projects" />
  91. <Grid>
  92. <cus:TextBoxEx
  93. Width="188"
  94. Height="32"
  95. HorizontalAlignment="Left"
  96. CornerRadius="4" />
  97. <Button
  98. Width="32"
  99. HorizontalAlignment="Right"
  100. Style="{StaticResource btn.sec-icon}">
  101. <Path Data="M7.25 8.75V14H8.75V8.75H14V7.25H8.75V2H7.25V7.25H2V8.75H7.25Z" />
  102. </Button>
  103. </Grid>
  104. <TextBlock
  105. Margin="0,18,0,10"
  106. Style="{StaticResource PropertyHeaderLv2}"
  107. Text="Exported Values" />
  108. <cus:TextBoxEx Height="32" CornerRadius="4" />
  109. <ListBox Height="98" Margin="0,8" />
  110. <StackPanel Margin="0,0,0,8" Orientation="Horizontal">
  111. <Button
  112. Width="32"
  113. Height="32"
  114. Style="{StaticResource btn.sec-icon}">
  115. <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" />
  116. </Button>
  117. <Button
  118. Width="32"
  119. Height="32"
  120. Margin="8,0"
  121. Style="{StaticResource btn.sec-icon}">
  122. <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" />
  123. </Button>
  124. <Button
  125. Width="32"
  126. Height="32"
  127. Style="{StaticResource btn.sec-icon}">
  128. <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" />
  129. </Button>
  130. </StackPanel>
  131. <CheckBox Margin="0,8,0,4" Content="Sort Items" />
  132. <CheckBox Margin="0,4" Content="Allow users to enter custom text" />
  133. <CheckBox Margin="0,4">
  134. <TextBlock Text="Submit the selected value immediately" TextWrapping="Wrap" />
  135. </CheckBox>
  136. </StackPanel>
  137. </TabItem>
  138. </TabControl>
  139. <Border
  140. Grid.Row="2"
  141. BorderBrush="{StaticResource color.sys.layout.divider}"
  142. BorderThickness="0,1,0,0">
  143. <CheckBox
  144. Name="ChkLock"
  145. Margin="16"
  146. Content="Locked" />
  147. </Border>
  148. </Grid>
  149. </UserControl>