MeasureSettingPanel.xaml 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. InputMethod.IsInputMethodEnabled="False"
  39. PreviewKeyDown="TextBox_PreviewKeyDown"
  40. CommandManager.PreviewCanExecute="TextBox_CanExecute" MaxLength="6">
  41. </TextBox>
  42. <ComboBox Name="RulerBaseUnitCombo" Width="110" FontSize="14" Margin="10,0,0,0" VerticalContentAlignment="Center">
  43. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_IN}"></ComboBoxItem>
  44. <ComboBoxItem IsSelected="True" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_CM}"></ComboBoxItem>
  45. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_MM}"></ComboBoxItem>
  46. </ComboBox>
  47. <TextBlock FontSize="14" Margin="10,0,10,0">=</TextBlock>
  48. <TextBox Name="RulerTranslateText" Width="110" FontSize="14" VerticalContentAlignment="Center"
  49. InputMethod.IsInputMethodEnabled="False"
  50. PreviewKeyDown="TextBox_PreviewKeyDown"
  51. CommandManager.PreviewCanExecute="TextBox_CanExecute" MaxLength="6">
  52. </TextBox>
  53. <ComboBox Name="RulerTranslateCombo" Width="110" FontSize="14" Margin="10,0,0,0" VerticalContentAlignment="Center">
  54. <ComboBoxItem Tag="pt" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_PT}"></ComboBoxItem>
  55. <ComboBoxItem Tag="cm" IsSelected="True" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_CM}"></ComboBoxItem>
  56. <ComboBoxItem Tag="in" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_IN}"></ComboBoxItem>
  57. <ComboBoxItem Tag="mm" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_MM}"></ComboBoxItem>
  58. <ComboBoxItem Tag="m" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_M}"></ComboBoxItem>
  59. <ComboBoxItem Tag="km" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_KM}"></ComboBoxItem>
  60. <ComboBoxItem Tag="yd" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_FT}"></ComboBoxItem>
  61. <ComboBoxItem Tag="mi" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_YD}"></ComboBoxItem>
  62. <ComboBoxItem Tag="mi" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Scale_MI}"></ComboBoxItem>
  63. </ComboBox>
  64. </StackPanel>
  65. <TextBlock Grid.Row="3" Margin="0,10,0,10" FontSize="14" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_Precision}">
  66. </TextBlock>
  67. <ComboBox Name="PrecisionBox" Grid.Row="4" Width="110" HorizontalAlignment="Left">
  68. <ComboBoxItem>1</ComboBoxItem>
  69. <ComboBoxItem >0.1</ComboBoxItem>
  70. <ComboBoxItem IsSelected="True">0.01</ComboBoxItem>
  71. <ComboBoxItem>0.001</ComboBoxItem>
  72. <ComboBoxItem>0.0001</ComboBoxItem>
  73. </ComboBox>
  74. </Grid>
  75. <Separator Grid.Row="2" Margin="0,10,0,10"></Separator>
  76. <Grid Grid.Row="3" x:Name="AreaAndLength" Visibility="Collapsed">
  77. <Grid.RowDefinitions>
  78. <RowDefinition Height="auto"></RowDefinition>
  79. <RowDefinition Height="auto"></RowDefinition>
  80. <RowDefinition Height="auto"></RowDefinition>
  81. </Grid.RowDefinitions>
  82. <TextBlock FontSize="14" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Title_Caption}" ></TextBlock>
  83. <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>
  84. <CheckBox x:Name="AreaCheckBox" IsChecked="True" Grid.Row="2" FontSize="14" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_Area}"></CheckBox>
  85. </Grid>
  86. <StackPanel Grid.Row="4" HorizontalAlignment="Right" Orientation="Horizontal">
  87. <Button Width="110" Height="32" Click="ButtonCancel_Click" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Button_Cancel}"></Button>
  88. <Button Width="110" Height="32" Click="ButtonDone_Click" Margin="10,0,0,0" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Button_Done}"></Button>
  89. </StackPanel>
  90. </Grid>
  91. </Border>
  92. </UserControl>