MeasureSettingPanel.xaml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <UserControl x:Class="Compdfkit_Tools.Measure.MeasureSettingPanel"
  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:Compdfkit_Tools.Measure"
  7. xmlns:common="clr-namespace:Compdfkit_Tools.Common"
  8. mc:Ignorable="d"
  9. d:DesignHeight="450" d:DesignWidth="800">
  10. <UserControl.Resources>
  11. <common:PropertyPanelResourceConverter x:Key="PropertyPanelResourceConverter" />
  12. </UserControl.Resources>
  13. <Border x:Name="SettingPanel" BorderBrush="LightGray" CornerRadius="4" Background="White" Width="530" Height="350">
  14. <Border.Effect>
  15. <DropShadowEffect BlurRadius="20" ShadowDepth="0" Color="Black" Opacity="0.4"/>
  16. </Border.Effect>
  17. <Grid Margin="20">
  18. <Grid.RowDefinitions>
  19. <RowDefinition Height="auto"></RowDefinition>
  20. <RowDefinition Height="auto"></RowDefinition>
  21. <RowDefinition Height="auto"></RowDefinition>
  22. <RowDefinition Height="auto"></RowDefinition>
  23. <RowDefinition Height="auto"></RowDefinition>
  24. </Grid.RowDefinitions>
  25. <TextBlock FontSize="16" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Title_Settings}"></TextBlock>
  26. <Grid Grid.Row="1" Margin="0,20,0,0">
  27. <Grid.RowDefinitions>
  28. <RowDefinition Height="auto"></RowDefinition>
  29. <RowDefinition Height="auto"></RowDefinition>
  30. <RowDefinition Height="auto"></RowDefinition>
  31. <RowDefinition Height="auto"></RowDefinition>
  32. <RowDefinition Height="auto"></RowDefinition>
  33. </Grid.RowDefinitions>
  34. <TextBlock FontSize="14" FontWeight="Bold" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Title_Scale}"></TextBlock>
  35. <TextBlock FontSize="14" Grid.Row="1" Margin="0,10,0,10" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Text_Dimensions}"></TextBlock>
  36. <StackPanel Grid.Row="2" Orientation="Horizontal">
  37. <TextBox Name="RulerBaseText" Width="110" VerticalContentAlignment="Center" FontSize="14"
  38. Text="1"
  39. InputMethod.IsInputMethodEnabled="False"
  40. PreviewKeyDown="TextBox_PreviewKeyDown"
  41. CommandManager.PreviewCanExecute="TextBox_CanExecute" MaxLength="6">
  42. </TextBox>
  43. <ComboBox Name="RulerBaseUnitCombo" Width="110" FontSize="14" Margin="10,0,0,0" VerticalContentAlignment="Center">
  44. <ComboBoxItem Tag="in" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_IN}"></ComboBoxItem>
  45. <ComboBoxItem Tag="cm" IsSelected="True" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_CM}"></ComboBoxItem>
  46. <ComboBoxItem Tag="mm" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_MM}"></ComboBoxItem>
  47. </ComboBox>
  48. <TextBlock FontSize="14" Margin="10,0,10,0">=</TextBlock>
  49. <TextBox Name="RulerTranslateText" Width="110" FontSize="14" VerticalContentAlignment="Center"
  50. Text="1"
  51. InputMethod.IsInputMethodEnabled="False"
  52. PreviewKeyDown="TextBox_PreviewKeyDown"
  53. CommandManager.PreviewCanExecute="TextBox_CanExecute" MaxLength="6">
  54. </TextBox>
  55. <ComboBox Name="RulerTranslateCombo" Width="110" FontSize="14" Margin="10,0,0,0" VerticalContentAlignment="Center">
  56. <ComboBoxItem Tag="pt" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_PT}"></ComboBoxItem>
  57. <ComboBoxItem Tag="cm" IsSelected="True" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_CM}"></ComboBoxItem>
  58. <ComboBoxItem Tag="in" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_IN}"></ComboBoxItem>
  59. <ComboBoxItem Tag="mm" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_MM}"></ComboBoxItem>
  60. <ComboBoxItem Tag="m" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_M}"></ComboBoxItem>
  61. <ComboBoxItem Tag="km" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_KM}"></ComboBoxItem>
  62. <ComboBoxItem Tag="yd" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_FT}"></ComboBoxItem>
  63. <ComboBoxItem Tag="mi" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_YD}"></ComboBoxItem>
  64. <ComboBoxItem Tag="mi" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_MI}"></ComboBoxItem>
  65. </ComboBox>
  66. </StackPanel>
  67. <TextBlock Grid.Row="3" Margin="0,10,0,10" FontSize="14" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_Precision}">
  68. </TextBlock>
  69. <ComboBox Name="PrecisionBox" Grid.Row="4" Width="110" HorizontalAlignment="Left">
  70. <ComboBoxItem>1</ComboBoxItem>
  71. <ComboBoxItem >0.1</ComboBoxItem>
  72. <ComboBoxItem IsSelected="True">0.01</ComboBoxItem>
  73. <ComboBoxItem>0.001</ComboBoxItem>
  74. <ComboBoxItem>0.0001</ComboBoxItem>
  75. </ComboBox>
  76. </Grid>
  77. <Separator Grid.Row="2" Margin="0,10,0,10"></Separator>
  78. <Grid Grid.Row="3" x:Name="AreaAndLength" Visibility="Collapsed">
  79. <Grid.RowDefinitions>
  80. <RowDefinition Height="auto"></RowDefinition>
  81. <RowDefinition Height="auto"></RowDefinition>
  82. <RowDefinition Height="auto"></RowDefinition>
  83. </Grid.RowDefinitions>
  84. <TextBlock FontSize="14" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Title_Caption}" ></TextBlock>
  85. <CheckBox x:Name="LengthCheckBox" IsChecked="True" Grid.Row="1" Margin="0,10,0,10" FontSize="14" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_Length}"></CheckBox>
  86. <CheckBox x:Name="AreaCheckBox" IsChecked="True" Grid.Row="2" FontSize="14" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_Area}"></CheckBox>
  87. </Grid>
  88. <StackPanel Grid.Row="4" HorizontalAlignment="Right" Orientation="Horizontal">
  89. <Button Width="110" Height="32" Click="ButtonCancel_Click" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Button_Cancel}"></Button>
  90. <Button Width="110" Height="32" Click="ButtonDone_Click" Margin="10,0,0,0" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Button_Done}"></Button>
  91. </StackPanel>
  92. </Grid>
  93. </Border>
  94. </UserControl>