GeofenceEditor.xaml 7.2 KB

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