Marker¶
Namespace: ThinkGeo.UI.Wpf
Represents a marker control on the map.
public class Marker : System.Windows.Controls.ContentControl, System.Windows.Media.Composition.DUCE+IResource, System.Windows.Media.Animation.IAnimatable, System.Windows.IInputElement, System.Windows.IFrameworkInputElement, System.ComponentModel.ISupportInitialize, System.Windows.Markup.IHaveResources, System.Windows.Markup.IQueryAmbient, System.Windows.Markup.IAddChild
Inheritance object → DispatcherObject → DependencyObject → Visual → UIElement → FrameworkElement → Control → ContentControl → Marker
Implements IResource, IAnimatable, IInputElement, IFrameworkInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild
Remarks:
Marker control maintains a content control on the map. Any Wpf control is allowed to set as its content.
Fields¶
RotationAngleProperty¶
public static DependencyProperty RotationAngleProperty;
PositionProperty¶
A dependency property of Position of Marker control.
public static DependencyProperty PositionProperty;
ImageSourceProperty¶
A dependency property of ImageSource of Marker control.
public static DependencyProperty ImageSourceProperty;
Properties¶
RotationAngle¶
The rotation angle, in degrees. 0 represents North (up), with positive values rotating clockwise.
public double RotationAngle { get; set; }
Property Value¶
RotateAngle¶
public double RotateAngle { get; set; }
Property Value¶
Position¶
World Position of marker. It's a wrapper of the PositionProperty.
public Point Position { get; set; }
Property Value¶
ImageSource¶
Image source of marker. It's a wrapper of the ImageSourceProperty.
public ImageSource ImageSource { get; set; }
Property Value¶
XOffset¶
Gets and sets screen offset x of marker image.
public double XOffset { get; set; }
Property Value¶
YOffset¶
Gets and sets screen offset y of marker image.
public double YOffset { get; set; }
Property Value¶
Content¶
public object Content { get; set; }
Property Value¶
HasContent¶
public bool HasContent { get; }
Property Value¶
ContentTemplate¶
public DataTemplate ContentTemplate { get; set; }
Property Value¶
ContentTemplateSelector¶
public DataTemplateSelector ContentTemplateSelector { get; set; }
Property Value¶
ContentStringFormat¶
public string ContentStringFormat { get; set; }
Property Value¶
BorderBrush¶
public Brush BorderBrush { get; set; }
Property Value¶
BorderThickness¶
public Thickness BorderThickness { get; set; }
Property Value¶
Background¶
public Brush Background { get; set; }
Property Value¶
Foreground¶
public Brush Foreground { get; set; }
Property Value¶
FontFamily¶
public FontFamily FontFamily { get; set; }
Property Value¶
FontSize¶
public double FontSize { get; set; }
Property Value¶
FontStretch¶
public FontStretch FontStretch { get; set; }
Property Value¶
FontStyle¶
public FontStyle FontStyle { get; set; }
Property Value¶
FontWeight¶
public FontWeight FontWeight { get; set; }
Property Value¶
HorizontalContentAlignment¶
public HorizontalAlignment HorizontalContentAlignment { get; set; }
Property Value¶
VerticalContentAlignment¶
public VerticalAlignment VerticalContentAlignment { get; set; }
Property Value¶
TabIndex¶
public int TabIndex { get; set; }
Property Value¶
IsTabStop¶
public bool IsTabStop { get; set; }
Property Value¶
Padding¶
public Thickness Padding { get; set; }
Property Value¶
Template¶
public ControlTemplate Template { get; set; }
Property Value¶
Style¶
public Style Style { get; set; }
Property Value¶
OverridesDefaultStyle¶
public bool OverridesDefaultStyle { get; set; }
Property Value¶
UseLayoutRounding¶
public bool UseLayoutRounding { get; set; }
Property Value¶
Triggers¶
public TriggerCollection Triggers { get; }
Property Value¶
TemplatedParent¶
public DependencyObject TemplatedParent { get; }
Property Value¶
Resources¶
public ResourceDictionary Resources { get; set; }
Property Value¶
DataContext¶
public object DataContext { get; set; }
Property Value¶
BindingGroup¶
public BindingGroup BindingGroup { get; set; }
Property Value¶
Language¶
public XmlLanguage Language { get; set; }
Property Value¶
Name¶
public string Name { get; set; }
Property Value¶
Tag¶
public object Tag { get; set; }
Property Value¶
InputScope¶
public InputScope InputScope { get; set; }
Property Value¶
ActualWidth¶
public double ActualWidth { get; }
Property Value¶
ActualHeight¶
public double ActualHeight { get; }
Property Value¶
LayoutTransform¶
public Transform LayoutTransform { get; set; }
Property Value¶
Width¶
public double Width { get; set; }
Property Value¶
MinWidth¶
public double MinWidth { get; set; }
Property Value¶
MaxWidth¶
public double MaxWidth { get; set; }
Property Value¶
Height¶
public double Height { get; set; }
Property Value¶
MinHeight¶
public double MinHeight { get; set; }
Property Value¶
MaxHeight¶
public double MaxHeight { get; set; }
Property Value¶
FlowDirection¶
public FlowDirection FlowDirection { get; set; }
Property Value¶
Margin¶
public Thickness Margin { get; set; }
Property Value¶
HorizontalAlignment¶
public HorizontalAlignment HorizontalAlignment { get; set; }
Property Value¶
VerticalAlignment¶
public VerticalAlignment VerticalAlignment { get; set; }
Property Value¶
FocusVisualStyle¶
public Style FocusVisualStyle { get; set; }
Property Value¶
Cursor¶
public Cursor Cursor { get; set; }
Property Value¶
ForceCursor¶
public bool ForceCursor { get; set; }
Property Value¶
IsInitialized¶
public bool IsInitialized { get; }
Property Value¶
IsLoaded¶
public bool IsLoaded { get; }
Property Value¶
ToolTip¶
public object ToolTip { get; set; }
Property Value¶
ContextMenu¶
public ContextMenu ContextMenu { get; set; }
Property Value¶
Parent¶
public DependencyObject Parent { get; }
Property Value¶
HasAnimatedProperties¶
public bool HasAnimatedProperties { get; }
Property Value¶
InputBindings¶
public InputBindingCollection InputBindings { get; }
Property Value¶
CommandBindings¶
public CommandBindingCollection CommandBindings { get; }
Property Value¶
AllowDrop¶
public bool AllowDrop { get; set; }
Property Value¶
DesiredSize¶
public Size DesiredSize { get; }
Property Value¶
IsMeasureValid¶
public bool IsMeasureValid { get; }
Property Value¶
IsArrangeValid¶
public bool IsArrangeValid { get; }
Property Value¶
RenderSize¶
public Size RenderSize { get; set; }
Property Value¶
RenderTransform¶
public Transform RenderTransform { get; set; }
Property Value¶
RenderTransformOrigin¶
public Point RenderTransformOrigin { get; set; }
Property Value¶
IsMouseDirectlyOver¶
public bool IsMouseDirectlyOver { get; }
Property Value¶
IsMouseOver¶
public bool IsMouseOver { get; }
Property Value¶
IsStylusOver¶
public bool IsStylusOver { get; }
Property Value¶
IsKeyboardFocusWithin¶
public bool IsKeyboardFocusWithin { get; }
Property Value¶
IsMouseCaptured¶
public bool IsMouseCaptured { get; }
Property Value¶
IsMouseCaptureWithin¶
public bool IsMouseCaptureWithin { get; }
Property Value¶
IsStylusDirectlyOver¶
public bool IsStylusDirectlyOver { get; }
Property Value¶
IsStylusCaptured¶
public bool IsStylusCaptured { get; }
Property Value¶
IsStylusCaptureWithin¶
public bool IsStylusCaptureWithin { get; }
Property Value¶
IsKeyboardFocused¶
public bool IsKeyboardFocused { get; }
Property Value¶
IsInputMethodEnabled¶
public bool IsInputMethodEnabled { get; }
Property Value¶
Opacity¶
public double Opacity { get; set; }
Property Value¶
OpacityMask¶
public Brush OpacityMask { get; set; }
Property Value¶
BitmapEffect¶
public BitmapEffect BitmapEffect { get; set; }
Property Value¶
Effect¶
public Effect Effect { get; set; }
Property Value¶
BitmapEffectInput¶
public BitmapEffectInput BitmapEffectInput { get; set; }
Property Value¶
CacheMode¶
public CacheMode CacheMode { get; set; }
Property Value¶
Uid¶
public string Uid { get; set; }
Property Value¶
Visibility¶
public Visibility Visibility { get; set; }
Property Value¶
ClipToBounds¶
public bool ClipToBounds { get; set; }
Property Value¶
Clip¶
public Geometry Clip { get; set; }
Property Value¶
SnapsToDevicePixels¶
public bool SnapsToDevicePixels { get; set; }
Property Value¶
IsFocused¶
public bool IsFocused { get; }
Property Value¶
IsEnabled¶
public bool IsEnabled { get; set; }
Property Value¶
IsHitTestVisible¶
public bool IsHitTestVisible { get; set; }
Property Value¶
IsVisible¶
public bool IsVisible { get; }
Property Value¶
Focusable¶
public bool Focusable { get; set; }
Property Value¶
PersistId¶
public int PersistId { get; }
Property Value¶
IsManipulationEnabled¶
public bool IsManipulationEnabled { get; set; }
Property Value¶
AreAnyTouchesOver¶
public bool AreAnyTouchesOver { get; }
Property Value¶
AreAnyTouchesDirectlyOver¶
public bool AreAnyTouchesDirectlyOver { get; }
Property Value¶
AreAnyTouchesCapturedWithin¶
public bool AreAnyTouchesCapturedWithin { get; }
Property Value¶
AreAnyTouchesCaptured¶
public bool AreAnyTouchesCaptured { get; }
Property Value¶
TouchesCaptured¶
public IEnumerable<TouchDevice> TouchesCaptured { get; }
Property Value¶
TouchesCapturedWithin¶
public IEnumerable<TouchDevice> TouchesCapturedWithin { get; }
Property Value¶
TouchesOver¶
public IEnumerable<TouchDevice> TouchesOver { get; }
Property Value¶
TouchesDirectlyOver¶
public IEnumerable<TouchDevice> TouchesDirectlyOver { get; }
Property Value¶
DependencyObjectType¶
public DependencyObjectType DependencyObjectType { get; }
Property Value¶
IsSealed¶
public bool IsSealed { get; }
Property Value¶
Dispatcher¶
public Dispatcher Dispatcher { get; }
Property Value¶
Constructors¶
Marker()¶
Constructor of Marker class.
public Marker()
Marker(double, double)¶
Constructor of Marker class.
public Marker(double worldX, double worldY)
Parameters¶
worldX double
X world coordinate of marker.
worldY double
Y world coordinate of marker.
Marker(PointShape)¶
Constructor of Marker class.
public Marker(PointShape position)
Parameters¶
position PointShape
Marker position in world coordinate.
Methods¶
CloneDeep(bool)¶
Deeply clones a marker object.
public Marker CloneDeep(bool includeEvents)
Parameters¶
includeEvents bool
Returns¶
Draw(RectangleShape, double, double)¶
Draws the marker by the provided extent, screen width and height.
public void Draw(RectangleShape targetExtent, double drawingScreenWidth, double drawingScreenHeight)
Parameters¶
targetExtent RectangleShape
A world extent that the marker is placed on the map.
drawingScreenWidth double
Current map screen width.
drawingScreenHeight double
Current map screen height.
Returns¶
DrawCore()¶
Draws the marker by the provided extent, screen width and height.
protected void DrawCore()
Returns¶
Remarks:
When implementing this method, change marker's left and top in screen coordinate.
OnApplyTemplate()¶
Apply marker template.
public void OnApplyTemplate()
Returns¶
OnPositionChanged(DependencyPropertyChangedEventArgs)¶
Raises when the position property is changed.
protected void OnPositionChanged(DependencyPropertyChangedEventArgs eventArgs)
Parameters¶
eventArgs DependencyPropertyChangedEventArgs
Maintains arguments for PositionChanged event.
Returns¶
MeasureOverride(Size)¶
Measures current size.
protected Size MeasureOverride(Size constraint)
Parameters¶
constraint Size
Constraint size of marker
Returns¶
Size
New size of marker after measuring.
Refresh()¶
public void Refresh()
Returns¶
RefreshCore()¶
protected void RefreshCore()
Returns¶
SaveState()¶
This method saves current marker state to a byte array.
public Byte[] SaveState()
Returns¶
Byte[]
A byte array that holds current marker state. It can be used for restoring the marker state by creating a new marker and calling marker.LoadState(byte[]) method
SaveStateCore()¶
This method saves current marker state to a byte array.
protected Byte[] SaveStateCore()
Returns¶
Byte[]
A byte array that holds current marker state. It can be used for restoring the marker state by creating a new marker and calling marker.LoadState(byte[]) method
LoadState(Byte[])¶
This method reload current state from the passed binary.
public void LoadState(Byte[] state)
Parameters¶
state Byte[]
A byte array that holds current marker state. It's created by the SaveState method of this class.
Returns¶
LoadStateCore(Byte[])¶
This method reload current state from the passed binary.
protected void LoadStateCore(Byte[] state)
Parameters¶
state Byte[]
A byte array that holds current marker state. It's created by the SaveState method of this class.
Returns¶
OnMarkerMouseDown(MouseButtonEventArgs)¶
protected void OnMarkerMouseDown(MouseButtonEventArgs e)
Parameters¶
Returns¶
OnMarkerMouseUp(MouseButtonEventArgs)¶
protected void OnMarkerMouseUp(MouseButtonEventArgs e)
Parameters¶
Returns¶
OnMarkerMouseClick(MouseButtonEventArgs)¶
protected void OnMarkerMouseClick(MouseButtonEventArgs e)
Parameters¶
Returns¶
OnMouseClick(MouseButtonEventArgs)¶
protected void OnMouseClick(MouseButtonEventArgs e)
Parameters¶
Returns¶
OnMarkerMouseMove(MouseEventArgs)¶
protected void OnMarkerMouseMove(MouseEventArgs e)
Parameters¶
Returns¶
Events¶
PositionChanged¶
public event EventHandler<PositionChangedMarkerEventArgs> PositionChanged;
MarkerMouseDown¶
public event MouseButtonEventHandler MarkerMouseDown;
MarkerMouseUp¶
public event MouseButtonEventHandler MarkerMouseUp;
MarkerMouseClick¶
public event MouseButtonEventHandler MarkerMouseClick;
MouseClick¶
public event MouseButtonEventHandler MouseClick;
MarkerMouseMove¶
public event MouseEventHandler MarkerMouseMove;
PreviewMouseDoubleClick¶
public event MouseButtonEventHandler PreviewMouseDoubleClick;
MouseDoubleClick¶
public event MouseButtonEventHandler MouseDoubleClick;
TargetUpdated¶
public event EventHandler<DataTransferEventArgs> TargetUpdated;
SourceUpdated¶
public event EventHandler<DataTransferEventArgs> SourceUpdated;
DataContextChanged¶
public event DependencyPropertyChangedEventHandler DataContextChanged;
RequestBringIntoView¶
public event RequestBringIntoViewEventHandler RequestBringIntoView;
SizeChanged¶
public event SizeChangedEventHandler SizeChanged;
Initialized¶
public event EventHandler Initialized;
Loaded¶
public event RoutedEventHandler Loaded;
Unloaded¶
public event RoutedEventHandler Unloaded;
ToolTipOpening¶
public event ToolTipEventHandler ToolTipOpening;
ToolTipClosing¶
public event ToolTipEventHandler ToolTipClosing;
ContextMenuOpening¶
public event ContextMenuEventHandler ContextMenuOpening;
ContextMenuClosing¶
public event ContextMenuEventHandler ContextMenuClosing;
PreviewMouseDown¶
public event MouseButtonEventHandler PreviewMouseDown;
MouseDown¶
public event MouseButtonEventHandler MouseDown;
PreviewMouseUp¶
public event MouseButtonEventHandler PreviewMouseUp;
MouseUp¶
public event MouseButtonEventHandler MouseUp;
PreviewMouseLeftButtonDown¶
public event MouseButtonEventHandler PreviewMouseLeftButtonDown;
MouseLeftButtonDown¶
public event MouseButtonEventHandler MouseLeftButtonDown;
PreviewMouseLeftButtonUp¶
public event MouseButtonEventHandler PreviewMouseLeftButtonUp;
MouseLeftButtonUp¶
public event MouseButtonEventHandler MouseLeftButtonUp;
PreviewMouseRightButtonDown¶
public event MouseButtonEventHandler PreviewMouseRightButtonDown;
MouseRightButtonDown¶
public event MouseButtonEventHandler MouseRightButtonDown;
PreviewMouseRightButtonUp¶
public event MouseButtonEventHandler PreviewMouseRightButtonUp;
MouseRightButtonUp¶
public event MouseButtonEventHandler MouseRightButtonUp;
PreviewMouseMove¶
public event MouseEventHandler PreviewMouseMove;
MouseMove¶
public event MouseEventHandler MouseMove;
PreviewMouseWheel¶
public event MouseWheelEventHandler PreviewMouseWheel;
MouseWheel¶
public event MouseWheelEventHandler MouseWheel;
MouseEnter¶
public event MouseEventHandler MouseEnter;
MouseLeave¶
public event MouseEventHandler MouseLeave;
GotMouseCapture¶
public event MouseEventHandler GotMouseCapture;
LostMouseCapture¶
public event MouseEventHandler LostMouseCapture;
QueryCursor¶
public event QueryCursorEventHandler QueryCursor;
PreviewStylusDown¶
public event StylusDownEventHandler PreviewStylusDown;
StylusDown¶
public event StylusDownEventHandler StylusDown;
PreviewStylusUp¶
public event StylusEventHandler PreviewStylusUp;
StylusUp¶
public event StylusEventHandler StylusUp;
PreviewStylusMove¶
public event StylusEventHandler PreviewStylusMove;
StylusMove¶
public event StylusEventHandler StylusMove;
PreviewStylusInAirMove¶
public event StylusEventHandler PreviewStylusInAirMove;
StylusInAirMove¶
public event StylusEventHandler StylusInAirMove;
StylusEnter¶
public event StylusEventHandler StylusEnter;
StylusLeave¶
public event StylusEventHandler StylusLeave;
PreviewStylusInRange¶
public event StylusEventHandler PreviewStylusInRange;
StylusInRange¶
public event StylusEventHandler StylusInRange;
PreviewStylusOutOfRange¶
public event StylusEventHandler PreviewStylusOutOfRange;
StylusOutOfRange¶
public event StylusEventHandler StylusOutOfRange;
PreviewStylusSystemGesture¶
public event StylusSystemGestureEventHandler PreviewStylusSystemGesture;
StylusSystemGesture¶
public event StylusSystemGestureEventHandler StylusSystemGesture;
GotStylusCapture¶
public event StylusEventHandler GotStylusCapture;
LostStylusCapture¶
public event StylusEventHandler LostStylusCapture;
StylusButtonDown¶
public event StylusButtonEventHandler StylusButtonDown;
StylusButtonUp¶
public event StylusButtonEventHandler StylusButtonUp;
PreviewStylusButtonDown¶
public event StylusButtonEventHandler PreviewStylusButtonDown;
PreviewStylusButtonUp¶
public event StylusButtonEventHandler PreviewStylusButtonUp;
PreviewKeyDown¶
public event KeyEventHandler PreviewKeyDown;
KeyDown¶
public event KeyEventHandler KeyDown;
PreviewKeyUp¶
public event KeyEventHandler PreviewKeyUp;
KeyUp¶
public event KeyEventHandler KeyUp;
PreviewGotKeyboardFocus¶
public event KeyboardFocusChangedEventHandler PreviewGotKeyboardFocus;
GotKeyboardFocus¶
public event KeyboardFocusChangedEventHandler GotKeyboardFocus;
PreviewLostKeyboardFocus¶
public event KeyboardFocusChangedEventHandler PreviewLostKeyboardFocus;
LostKeyboardFocus¶
public event KeyboardFocusChangedEventHandler LostKeyboardFocus;
PreviewTextInput¶
public event TextCompositionEventHandler PreviewTextInput;
TextInput¶
public event TextCompositionEventHandler TextInput;
PreviewQueryContinueDrag¶
public event QueryContinueDragEventHandler PreviewQueryContinueDrag;
QueryContinueDrag¶
public event QueryContinueDragEventHandler QueryContinueDrag;
PreviewGiveFeedback¶
public event GiveFeedbackEventHandler PreviewGiveFeedback;
GiveFeedback¶
public event GiveFeedbackEventHandler GiveFeedback;
PreviewDragEnter¶
public event DragEventHandler PreviewDragEnter;
DragEnter¶
public event DragEventHandler DragEnter;
PreviewDragOver¶
public event DragEventHandler PreviewDragOver;
DragOver¶
public event DragEventHandler DragOver;
PreviewDragLeave¶
public event DragEventHandler PreviewDragLeave;
DragLeave¶
public event DragEventHandler DragLeave;
PreviewDrop¶
public event DragEventHandler PreviewDrop;
Drop¶
public event DragEventHandler Drop;
PreviewTouchDown¶
public event EventHandler<TouchEventArgs> PreviewTouchDown;
TouchDown¶
public event EventHandler<TouchEventArgs> TouchDown;
PreviewTouchMove¶
public event EventHandler<TouchEventArgs> PreviewTouchMove;
TouchMove¶
public event EventHandler<TouchEventArgs> TouchMove;
PreviewTouchUp¶
public event EventHandler<TouchEventArgs> PreviewTouchUp;
TouchUp¶
public event EventHandler<TouchEventArgs> TouchUp;
GotTouchCapture¶
public event EventHandler<TouchEventArgs> GotTouchCapture;
LostTouchCapture¶
public event EventHandler<TouchEventArgs> LostTouchCapture;
TouchEnter¶
public event EventHandler<TouchEventArgs> TouchEnter;
TouchLeave¶
public event EventHandler<TouchEventArgs> TouchLeave;
IsMouseDirectlyOverChanged¶
public event DependencyPropertyChangedEventHandler IsMouseDirectlyOverChanged;
IsKeyboardFocusWithinChanged¶
public event DependencyPropertyChangedEventHandler IsKeyboardFocusWithinChanged;
IsMouseCapturedChanged¶
public event DependencyPropertyChangedEventHandler IsMouseCapturedChanged;
IsMouseCaptureWithinChanged¶
public event DependencyPropertyChangedEventHandler IsMouseCaptureWithinChanged;
IsStylusDirectlyOverChanged¶
public event DependencyPropertyChangedEventHandler IsStylusDirectlyOverChanged;
IsStylusCapturedChanged¶
public event DependencyPropertyChangedEventHandler IsStylusCapturedChanged;
IsStylusCaptureWithinChanged¶
public event DependencyPropertyChangedEventHandler IsStylusCaptureWithinChanged;
IsKeyboardFocusedChanged¶
public event DependencyPropertyChangedEventHandler IsKeyboardFocusedChanged;
LayoutUpdated¶
public event EventHandler LayoutUpdated;
GotFocus¶
public event RoutedEventHandler GotFocus;
LostFocus¶
public event RoutedEventHandler LostFocus;
IsEnabledChanged¶
public event DependencyPropertyChangedEventHandler IsEnabledChanged;
IsHitTestVisibleChanged¶
public event DependencyPropertyChangedEventHandler IsHitTestVisibleChanged;
IsVisibleChanged¶
public event DependencyPropertyChangedEventHandler IsVisibleChanged;
FocusableChanged¶
public event DependencyPropertyChangedEventHandler FocusableChanged;
ManipulationStarting¶
public event EventHandler<ManipulationStartingEventArgs> ManipulationStarting;
ManipulationStarted¶
public event EventHandler<ManipulationStartedEventArgs> ManipulationStarted;
ManipulationDelta¶
public event EventHandler<ManipulationDeltaEventArgs> ManipulationDelta;
ManipulationInertiaStarting¶
public event EventHandler<ManipulationInertiaStartingEventArgs> ManipulationInertiaStarting;
ManipulationBoundaryFeedback¶
public event EventHandler<ManipulationBoundaryFeedbackEventArgs> ManipulationBoundaryFeedback;
ManipulationCompleted¶
public event EventHandler<ManipulationCompletedEventArgs> ManipulationCompleted;