GeofenceEditor.xaml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <Window x:Class="InABox.Wpf.DynamicGrid.GeofenceEditor"
  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:InABox.Wpf.DynamicGrid"
  7. xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
  8. xmlns:wpf="clr-namespace:InABox.Wpf"
  9. mc:Ignorable="d"
  10. Title="AddressEditorMap" WindowStartupLocation="CenterScreen" Height="800" Width="1200">
  11. <Grid>
  12. <Grid.ColumnDefinitions>
  13. <ColumnDefinition Width="*"/>
  14. </Grid.ColumnDefinitions>
  15. <Grid.RowDefinitions>
  16. <RowDefinition Height="*"/>
  17. </Grid.RowDefinitions>
  18. <syncfusion:SfMap
  19. x:Name="Map"
  20. BorderBrush="Gray"
  21. BorderThickness="0.75"
  22. ZoomLevel="18"
  23. MinZoom="18"
  24. MaxZoom="18"
  25. EnableZoom="False"
  26. EnablePan="False"
  27. Grid.Row="0"
  28. Grid.Column="0"
  29. PreviewMouseUp="Map_OnPreviewMouseUp">
  30. <syncfusion:SfMap.Layers>
  31. <local:GoogleImageryLayer
  32. x:Name="ImageryLayer"
  33. Center="-31.95105, 115.85939"
  34. Radius="11"
  35. >
  36. <syncfusion:ImageryLayer.SubShapeFileLayers>
  37. <syncfusion:SubShapeFileLayer x:Name="ShapeLayer">
  38. <syncfusion:SubShapeFileLayer.MapElements>
  39. <syncfusion:MapPolygon
  40. x:Name="Polygon"
  41. Stroke="Firebrick"
  42. StrokeThickness="0.75">
  43. <syncfusion:MapPolygon.Fill>
  44. <SolidColorBrush Color="Salmon" Opacity="0.5"/>
  45. </syncfusion:MapPolygon.Fill>
  46. </syncfusion:MapPolygon>
  47. </syncfusion:SubShapeFileLayer.MapElements>
  48. </syncfusion:SubShapeFileLayer>
  49. </syncfusion:ImageryLayer.SubShapeFileLayers>
  50. </local:GoogleImageryLayer>
  51. </syncfusion:SfMap.Layers>
  52. </syncfusion:SfMap>
  53. <Border
  54. x:Name="SearchBar"
  55. VerticalAlignment="Top"
  56. Grid.Row="0"
  57. Grid.Column="0"
  58. Margin="5"
  59. Padding="5"
  60. Background="WhiteSmoke"
  61. CornerRadius="5"
  62. Height="40">
  63. <DockPanel>
  64. <Button
  65. x:Name="SearchAddress"
  66. DockPanel.Dock="Right"
  67. Margin="5,0,0,0"
  68. Click="SearchAddress_Click"
  69. Padding="2">
  70. <Image Source="../../../Resources/go.png" />
  71. </Button>
  72. <TextBox
  73. x:Name="PostCode"
  74. DockPanel.Dock="Right"
  75. Background="LightYellow"
  76. Margin="5,0,0,0"
  77. MinWidth="80"
  78. VerticalContentAlignment="Center"
  79. wpf:TextBoxUtils.Placeholder="Postcode" />
  80. <TextBox
  81. x:Name="State"
  82. DockPanel.Dock="Right"
  83. Background="LightYellow"
  84. Margin="5,0,0,0"
  85. MinWidth="120"
  86. VerticalContentAlignment="Center"
  87. wpf:TextBoxUtils.Placeholder="State" />
  88. <TextBox
  89. x:Name="City"
  90. DockPanel.Dock="Right"
  91. Background="LightYellow"
  92. Margin="5,0,0,0"
  93. MinWidth="200"
  94. VerticalContentAlignment="Center"
  95. wpf:TextBoxUtils.Placeholder="City" />
  96. <TextBox
  97. x:Name="Street"
  98. DockPanel.Dock="Left"
  99. Background="LightYellow"
  100. VerticalContentAlignment="Center"
  101. wpf:TextBoxUtils.Placeholder="Street" />
  102. </DockPanel>
  103. </Border>
  104. <DockPanel
  105. Margin="5"
  106. VerticalAlignment="Bottom"
  107. Grid.Row="0"
  108. Grid.Column="0">
  109. <Button
  110. x:Name="ZoomOut"
  111. Height="50"
  112. Width="50"
  113. Padding="5"
  114. Margin="5,0,0,0"
  115. DockPanel.Dock="Right"
  116. Click="ZoomOut_OnClick">
  117. <Image Source="../../../Resources/zoomout.png" />
  118. </Button>
  119. <Button
  120. x:Name="ZoomIn"
  121. Height="50"
  122. Width="50"
  123. Padding="5"
  124. Margin="5,0,0,0"
  125. DockPanel.Dock="Right"
  126. Click="ZoomIn_OnClick">
  127. <Image Source="../../../Resources/zoomin.png" />
  128. </Button>
  129. <Button
  130. x:Name="CloseEditor"
  131. Height="50"
  132. Width="50"
  133. Padding="5"
  134. Margin="0,0,5,0"
  135. DockPanel.Dock="Left"
  136. Click="CloseEditor_OnClick"
  137. Visibility="Collapsed">
  138. <Image Source="../../../Resources/tick.png" />
  139. </Button>
  140. <Button
  141. x:Name="SetCoordinates"
  142. Height="50"
  143. Width="50"
  144. Padding="5"
  145. Margin="0,0,5,0"
  146. DockPanel.Dock="Left"
  147. Click="SetCoordinates_OnClick">
  148. <Image Source="../../../Resources/target.png" />
  149. </Button>
  150. <Button
  151. x:Name="SetGeometry"
  152. Height="50"
  153. Width="50"
  154. Padding="5"
  155. Margin="0,0,5,0"
  156. DockPanel.Dock="Left"
  157. Click="SetGeometry_OnClick">
  158. <Image Source="../../../Resources/line.png" />
  159. </Button>
  160. <Button
  161. x:Name="SetRadius"
  162. Height="50"
  163. Width="50"
  164. Padding="5"
  165. Margin="0,0,5,0"
  166. DockPanel.Dock="Left"
  167. Click="SetRadius_OnClick">
  168. <Image Source="../../../Resources/square.png" />
  169. </Button>
  170. <syncfusion:SfRangeSlider
  171. x:Name="RadiusSlider"
  172. VerticalAlignment="Stretch"
  173. Margin="10"
  174. Minimum="0"
  175. Maximum="1000"
  176. TickFrequency="50"
  177. MinorTickFrequency="5"
  178. ThumbToolTipPrecision="0"
  179. Visibility="Collapsed"
  180. DockPanel.Dock="Left"/>
  181. </DockPanel>
  182. </Grid>
  183. </Window>