MeasureInfoPanel.xaml 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <UserControl x:Class="Compdfkit_Tools.Measure.MeasureInfoPanel"
  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="350" d:DesignWidth="150">
  10. <UserControl.Resources>
  11. <ResourceDictionary>
  12. <common:PropertyPanelResourceConverter x:Key="PropertyPanelResourceConverter" />
  13. </ResourceDictionary>
  14. </UserControl.Resources>
  15. <Border BorderBrush="LightGray" CornerRadius="4" Background="White">
  16. <Border.Effect>
  17. <DropShadowEffect BlurRadius="20" ShadowDepth="0" Color="Black" Opacity="0.4"/>
  18. </Border.Effect>
  19. <Grid Margin="20,20,0,0" Width="300" >
  20. <Grid.ColumnDefinitions>
  21. <ColumnDefinition Width="auto"></ColumnDefinition>
  22. <ColumnDefinition Width="*"></ColumnDefinition>
  23. </Grid.ColumnDefinitions>
  24. <Grid.RowDefinitions>
  25. <RowDefinition Height="auto"></RowDefinition>
  26. <RowDefinition Height="auto"></RowDefinition>
  27. <RowDefinition Height="auto"></RowDefinition>
  28. </Grid.RowDefinitions>
  29. <Path Name="MeasureIcon" Width="20" Height="20" Fill="#43474D" >
  30. <Path.Data>
  31. M17.7782 5.75646L14.2427 2.22093L13.0052 3.45837L15.4802 5.93333L14.4195 6.99399L11.9446 4.51903L10.1768
  32. 6.28679L12.6518 8.76175L11.5911 9.82241L9.11615 7.34745L7.34838 9.11522L9.82334 11.5902L8.76268 12.6508L6.28772
  33. 10.1759L4.51996 11.9436L6.99492 14.4186L5.93426 15.4793L3.4593 13.0043L2.22186 14.2417L5.75739 17.7773L17.7782
  34. 5.75646ZM15.3033 1.16027L14.2427 0.0996094L13.182 1.16027L1.1612 13.1811L0.100539 14.2417L1.1612 15.3024L4.69673
  35. 18.8379L5.75739 19.8986L6.81805 18.8379L18.8389 6.81712L19.8995 5.75646L18.8389 4.6958L15.3033 1.16027Z
  36. </Path.Data>
  37. </Path>
  38. <TextBlock Name="MeasureTitelText" Grid.Column="1" Margin="10,0,0,0" VerticalAlignment="Center"
  39. FontSize="16">Distance Measurement</TextBlock>
  40. <Grid Name="LinePanel" Grid.Row="1" Grid.Column="1" Margin="0,10,0,0" Visibility="Collapsed">
  41. <Grid.ColumnDefinitions>
  42. <ColumnDefinition Width="80"></ColumnDefinition>
  43. <ColumnDefinition Width="auto"></ColumnDefinition>
  44. </Grid.ColumnDefinitions>
  45. <Grid.RowDefinitions>
  46. <RowDefinition Height="auto"></RowDefinition>
  47. <RowDefinition Height="auto"></RowDefinition>
  48. <RowDefinition Height="auto"></RowDefinition>
  49. <RowDefinition Height="auto"></RowDefinition>
  50. <RowDefinition Height="auto"></RowDefinition>
  51. <RowDefinition Height="auto"></RowDefinition>
  52. </Grid.RowDefinitions>
  53. <TextBlock FontSize="14" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_Scale}"></TextBlock>
  54. <TextBlock Name="ScaleText" Grid.Column="1" FontSize="14"></TextBlock>
  55. <TextBlock Grid.Row="1" Margin="0,10,0,0" FontSize="14" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_Length}"></TextBlock>
  56. <TextBlock Name="DistanceText" Grid.Row="1" Grid.Column="1" Margin="0,10,0,0" FontSize="14"></TextBlock>
  57. <TextBlock Grid.Row="2" Margin="0,10,0,0" FontSize="14" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_Precision}"></TextBlock>
  58. <TextBlock Name="PrecisionText" Grid.Row="2" Grid.Column="1" Margin="0,10,0,0" FontSize="14"></TextBlock>
  59. <TextBlock Grid.Row="3" Margin="0,10,0,0" FontSize="14" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_Angle}"></TextBlock>
  60. <TextBlock Name="AngleText" Grid.Row="3" Grid.Column="1" Margin="0,10,0,0" FontSize="14"></TextBlock>
  61. <TextBlock Grid.Row="4" Margin="0,10,0,0" FontSize="14" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_X}"></TextBlock>
  62. <TextBlock Name="XText" Grid.Row="4" Grid.Column="1" Margin="0,10,0,0" FontSize="14"></TextBlock>
  63. <TextBlock Grid.Row="5" Margin="0,10,0,0" FontSize="14" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_Y}"></TextBlock>
  64. <TextBlock Name="YText" Grid.Row="5" Grid.Column="1" Margin="0,10,0,0" FontSize="14"></TextBlock>
  65. </Grid>
  66. <Grid Name="PolyLinePanel" Grid.Row="1" Grid.Column="1" Margin="0,10,0,0" Visibility="Collapsed">
  67. <Grid.ColumnDefinitions>
  68. <ColumnDefinition Width="80"></ColumnDefinition>
  69. <ColumnDefinition Width="auto"></ColumnDefinition>
  70. </Grid.ColumnDefinitions>
  71. <Grid.RowDefinitions>
  72. <RowDefinition Height="auto"></RowDefinition>
  73. <RowDefinition Height="auto"></RowDefinition>
  74. <RowDefinition Height="auto"></RowDefinition>
  75. <RowDefinition Height="auto"></RowDefinition>
  76. </Grid.RowDefinitions>
  77. <TextBlock FontSize="14" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_Scale}"></TextBlock>
  78. <TextBlock Name="ScalePolyLineText" Grid.Column="1" FontSize="14"></TextBlock>
  79. <TextBlock Grid.Row="1" Margin="0,10,0,0" FontSize="14" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_Length}"></TextBlock>
  80. <TextBlock Name="DistancePolyLineText" Grid.Row="1" Grid.Column="1" Margin="0,10,0,0" FontSize="14"></TextBlock>
  81. <TextBlock Grid.Row="2" Margin="0,10,0,0" FontSize="14" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_Precision}"></TextBlock>
  82. <TextBlock Name="PrecisionPolyLineText" Grid.Row="2" Grid.Column="1" Margin="0,10,0,0" FontSize="14"></TextBlock>
  83. <TextBlock Grid.Row="3" Margin="0,10,0,0" FontSize="14" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_Angle}"></TextBlock>
  84. <TextBlock Name="AnglePolyLineText" Grid.Row="3" Grid.Column="1" Margin="0,10,0,0" FontSize="14"></TextBlock>
  85. </Grid>
  86. <Grid Name="PolygonPanel" Grid.Row="1" Grid.Column="1" Margin="0,10,0,0" Visibility="Collapsed">
  87. <Grid.ColumnDefinitions>
  88. <ColumnDefinition Width="80"></ColumnDefinition>
  89. <ColumnDefinition Width="auto"></ColumnDefinition>
  90. </Grid.ColumnDefinitions>
  91. <Grid.RowDefinitions>
  92. <RowDefinition Height="auto"></RowDefinition>
  93. <RowDefinition Height="auto"></RowDefinition>
  94. <RowDefinition Height="auto"></RowDefinition>
  95. <RowDefinition Height="auto"></RowDefinition>
  96. </Grid.RowDefinitions>
  97. <TextBlock FontSize="14" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_Scale}"></TextBlock>
  98. <TextBlock Name="ScalePolygonText" Grid.Column="1" FontSize="14"></TextBlock>
  99. <TextBlock Grid.Row="1" Margin="0,10,0,0" FontSize="14" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_Area}"></TextBlock>
  100. <TextBlock Name="RoundPolygonText" Grid.Row="1" Grid.Column="1" Margin="0,10,0,0" FontSize="14"></TextBlock>
  101. <TextBlock Grid.Row="2" Margin="0,10,0,0" FontSize="14" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_Precision}"></TextBlock>
  102. <TextBlock Name="PrecisionPolygonText" Grid.Row="2" Grid.Column="1" Margin="0,10,0,0" FontSize="14"></TextBlock>
  103. <TextBlock Grid.Row="3" Margin="0,10,0,0" FontSize="14" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_Angle}"></TextBlock>
  104. <TextBlock Name="AnglePolygonText" Grid.Row="3" Grid.Column="1" Margin="0,10,0,0" FontSize="14"></TextBlock>
  105. </Grid>
  106. <TextBlock Grid.Row="2" Grid.ColumnSpan="2" HorizontalAlignment="Right"
  107. Margin="0,10,40,20" FontSize="14" Foreground="Blue" Cursor="Hand"
  108. MouseLeftButtonDown="TextBlock_MouseLeftButtonDown" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Board_Settings}"></TextBlock>
  109. </Grid>
  110. </Border>
  111. </UserControl>