Skip to content

TileView

Namespace: ThinkGeo.Core

This class represents the base class of tile which is the element to form tile overlay.

public class TileView : 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, System.IDisposable

Inheritance Object → DispatcherObject → DependencyObject → Visual → UIElement → FrameworkElement → Control → ContentControl → TileView
Implements IResource, IAnimatable, IInputElement, IFrameworkInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild, IDisposable

Fields

ImageSourceProperty

Dependency property "ImageSource"

public static DependencyProperty ImageSourceProperty;

Properties

IsDrawn

public bool IsDrawn { get; set; }

Property Value

Boolean

Error

User can set the customer excpetion and we can paint that.

public Exception Error { get; protected set; }

Property Value

Exception

Id

A numeric unique id for each tile so we can correctly control the number of requests sending to the server.

public int Id { get; set; }

Property Value

Int32

ImageSource

This property gets the image source for displaying a tile.

public ImageSource ImageSource { get; set; }

Property Value

ImageSource

BoundingBox

Gets or sets an extent that uses for drawing.

public RectangleShape BoundingBox { get; set; }

Property Value

RectangleShape

DrawingExtent

public RectangleShape DrawingExtent { get; set; }

Property Value

RectangleShape

RowIndex

Gets or sets tile's row index in tile overlay.

public long RowIndex { get; set; }

Property Value

Int64

ColumnIndex

Gets or sets tile's column index in tile overlay.

public long ColumnIndex { get; set; }

Property Value

Int64

ZoomLevelIndex

Gets or sets current level index in the ZoomLevelSet.

public int ZoomLevelIndex { get; set; }

Property Value

Int32

Scale

Gets or sets current scale.

public double Scale { get; set; }

Property Value

Double

IsOpened

Gets or sets if this tile image is opened. Set this property to true to raise Opened event.

public bool IsOpened { get; set; }

Property Value

Boolean

DrawingTime

Gets or sets the time cost for drawing tile.

public TimeSpan DrawingTime { get; set; }

Property Value

TimeSpan
The drawing time.

DrawingExceptionMode

Gets or sets how to specify the exception in current drawing process.

public DrawingExceptionMode DrawingExceptionMode { get; set; }

Property Value

DrawingExceptionMode

TileWidth

Gets or sets the width of the tile.

public int TileWidth { get; set; }

Property Value

Int32
The width of the tile.

TileHeight

Gets or sets the height of the tile.

public int TileHeight { get; set; }

Property Value

Int32
The height of the tile.

Content

public object Content { get; set; }

Property Value

Object

HasContent

public bool HasContent { get; }

Property Value

Boolean

ContentTemplate

public DataTemplate ContentTemplate { get; set; }

Property Value

DataTemplate

ContentTemplateSelector

public DataTemplateSelector ContentTemplateSelector { get; set; }

Property Value

DataTemplateSelector

ContentStringFormat

public string ContentStringFormat { get; set; }

Property Value

String

BorderBrush

public Brush BorderBrush { get; set; }

Property Value

Brush

BorderThickness

public Thickness BorderThickness { get; set; }

Property Value

Thickness

Background

public Brush Background { get; set; }

Property Value

Brush

Foreground

public Brush Foreground { get; set; }

Property Value

Brush

FontFamily

public FontFamily FontFamily { get; set; }

Property Value

FontFamily

FontSize

public double FontSize { get; set; }

Property Value

Double

FontStretch

public FontStretch FontStretch { get; set; }

Property Value

FontStretch

FontStyle

public FontStyle FontStyle { get; set; }

Property Value

FontStyle

FontWeight

public FontWeight FontWeight { get; set; }

Property Value

FontWeight

HorizontalContentAlignment

public HorizontalAlignment HorizontalContentAlignment { get; set; }

Property Value

HorizontalAlignment

VerticalContentAlignment

public VerticalAlignment VerticalContentAlignment { get; set; }

Property Value

VerticalAlignment

TabIndex

public int TabIndex { get; set; }

Property Value

Int32

IsTabStop

public bool IsTabStop { get; set; }

Property Value

Boolean

Padding

public Thickness Padding { get; set; }

Property Value

Thickness

Template

public ControlTemplate Template { get; set; }

Property Value

ControlTemplate

Style

public Style Style { get; set; }

Property Value

Style

OverridesDefaultStyle

public bool OverridesDefaultStyle { get; set; }

Property Value

Boolean

UseLayoutRounding

public bool UseLayoutRounding { get; set; }

Property Value

Boolean

Triggers

public TriggerCollection Triggers { get; }

Property Value

TriggerCollection

TemplatedParent

public DependencyObject TemplatedParent { get; }

Property Value

DependencyObject

Resources

public ResourceDictionary Resources { get; set; }

Property Value

ResourceDictionary

DataContext

public object DataContext { get; set; }

Property Value

Object

BindingGroup

public BindingGroup BindingGroup { get; set; }

Property Value

BindingGroup

Language

public XmlLanguage Language { get; set; }

Property Value

XmlLanguage

Name

public string Name { get; set; }

Property Value

String

Tag

public object Tag { get; set; }

Property Value

Object

InputScope

public InputScope InputScope { get; set; }

Property Value

InputScope

ActualWidth

public double ActualWidth { get; }

Property Value

Double

ActualHeight

public double ActualHeight { get; }

Property Value

Double

LayoutTransform

public Transform LayoutTransform { get; set; }

Property Value

Transform

Width

public double Width { get; set; }

Property Value

Double

MinWidth

public double MinWidth { get; set; }

Property Value

Double

MaxWidth

public double MaxWidth { get; set; }

Property Value

Double

Height

public double Height { get; set; }

Property Value

Double

MinHeight

public double MinHeight { get; set; }

Property Value

Double

MaxHeight

public double MaxHeight { get; set; }

Property Value

Double

FlowDirection

public FlowDirection FlowDirection { get; set; }

Property Value

FlowDirection

Margin

public Thickness Margin { get; set; }

Property Value

Thickness

HorizontalAlignment

public HorizontalAlignment HorizontalAlignment { get; set; }

Property Value

HorizontalAlignment

VerticalAlignment

public VerticalAlignment VerticalAlignment { get; set; }

Property Value

VerticalAlignment

FocusVisualStyle

public Style FocusVisualStyle { get; set; }

Property Value

Style

Cursor

public Cursor Cursor { get; set; }

Property Value

Cursor

ForceCursor

public bool ForceCursor { get; set; }

Property Value

Boolean

IsInitialized

public bool IsInitialized { get; }

Property Value

Boolean

IsLoaded

public bool IsLoaded { get; }

Property Value

Boolean

ToolTip

public object ToolTip { get; set; }

Property Value

Object

ContextMenu

public ContextMenu ContextMenu { get; set; }

Property Value

ContextMenu

Parent

public DependencyObject Parent { get; }

Property Value

DependencyObject

HasAnimatedProperties

public bool HasAnimatedProperties { get; }

Property Value

Boolean

InputBindings

public InputBindingCollection InputBindings { get; }

Property Value

InputBindingCollection

CommandBindings

public CommandBindingCollection CommandBindings { get; }

Property Value

CommandBindingCollection

AllowDrop

public bool AllowDrop { get; set; }

Property Value

Boolean

DesiredSize

public Size DesiredSize { get; }

Property Value

Size

IsMeasureValid

public bool IsMeasureValid { get; }

Property Value

Boolean

IsArrangeValid

public bool IsArrangeValid { get; }

Property Value

Boolean

RenderSize

public Size RenderSize { get; set; }

Property Value

Size

RenderTransform

public Transform RenderTransform { get; set; }

Property Value

Transform

RenderTransformOrigin

public Point RenderTransformOrigin { get; set; }

Property Value

Point

IsMouseDirectlyOver

public bool IsMouseDirectlyOver { get; }

Property Value

Boolean

IsMouseOver

public bool IsMouseOver { get; }

Property Value

Boolean

IsStylusOver

public bool IsStylusOver { get; }

Property Value

Boolean

IsKeyboardFocusWithin

public bool IsKeyboardFocusWithin { get; }

Property Value

Boolean

IsMouseCaptured

public bool IsMouseCaptured { get; }

Property Value

Boolean

IsMouseCaptureWithin

public bool IsMouseCaptureWithin { get; }

Property Value

Boolean

IsStylusDirectlyOver

public bool IsStylusDirectlyOver { get; }

Property Value

Boolean

IsStylusCaptured

public bool IsStylusCaptured { get; }

Property Value

Boolean

IsStylusCaptureWithin

public bool IsStylusCaptureWithin { get; }

Property Value

Boolean

IsKeyboardFocused

public bool IsKeyboardFocused { get; }

Property Value

Boolean

IsInputMethodEnabled

public bool IsInputMethodEnabled { get; }

Property Value

Boolean

Opacity

public double Opacity { get; set; }

Property Value

Double

OpacityMask

public Brush OpacityMask { get; set; }

Property Value

Brush

BitmapEffect

public BitmapEffect BitmapEffect { get; set; }

Property Value

BitmapEffect

Effect

public Effect Effect { get; set; }

Property Value

Effect

BitmapEffectInput

public BitmapEffectInput BitmapEffectInput { get; set; }

Property Value

BitmapEffectInput

CacheMode

public CacheMode CacheMode { get; set; }

Property Value

CacheMode

Uid

public string Uid { get; set; }

Property Value

String

Visibility

public Visibility Visibility { get; set; }

Property Value

Visibility

ClipToBounds

public bool ClipToBounds { get; set; }

Property Value

Boolean

Clip

public Geometry Clip { get; set; }

Property Value

Geometry

SnapsToDevicePixels

public bool SnapsToDevicePixels { get; set; }

Property Value

Boolean

IsFocused

public bool IsFocused { get; }

Property Value

Boolean

IsEnabled

public bool IsEnabled { get; set; }

Property Value

Boolean

IsHitTestVisible

public bool IsHitTestVisible { get; set; }

Property Value

Boolean

IsVisible

public bool IsVisible { get; }

Property Value

Boolean

Focusable

public bool Focusable { get; set; }

Property Value

Boolean

PersistId

public int PersistId { get; }

Property Value

Int32

IsManipulationEnabled

public bool IsManipulationEnabled { get; set; }

Property Value

Boolean

AreAnyTouchesOver

public bool AreAnyTouchesOver { get; }

Property Value

Boolean

AreAnyTouchesDirectlyOver

public bool AreAnyTouchesDirectlyOver { get; }

Property Value

Boolean

AreAnyTouchesCapturedWithin

public bool AreAnyTouchesCapturedWithin { get; }

Property Value

Boolean

AreAnyTouchesCaptured

public bool AreAnyTouchesCaptured { get; }

Property Value

Boolean

TouchesCaptured

public IEnumerable<TouchDevice> TouchesCaptured { get; }

Property Value

IEnumerable<TouchDevice>

TouchesCapturedWithin

public IEnumerable<TouchDevice> TouchesCapturedWithin { get; }

Property Value

IEnumerable<TouchDevice>

TouchesOver

public IEnumerable<TouchDevice> TouchesOver { get; }

Property Value

IEnumerable<TouchDevice>

TouchesDirectlyOver

public IEnumerable<TouchDevice> TouchesDirectlyOver { get; }

Property Value

IEnumerable<TouchDevice>

DependencyObjectType

public DependencyObjectType DependencyObjectType { get; }

Property Value

DependencyObjectType

IsSealed

public bool IsSealed { get; }

Property Value

Boolean

Dispatcher

public Dispatcher Dispatcher { get; }

Property Value

Dispatcher

Constructors

TileView()

Constructor of TileView class.

public TileView()

Methods

CommitDrawingAsync(GeoCanvas)

Commits the drawing.

public Task CommitDrawingAsync(GeoCanvas geoCanvas)

Parameters

geoCanvas GeoCanvas
The geo canvas.

Returns

Task

CommitDrawingAsyncCore(GeoCanvas)

Commits the drawing (internal implementation).

protected Task CommitDrawingAsyncCore(GeoCanvas geoCanvas)

Parameters

geoCanvas GeoCanvas
The geo canvas.

Returns

Task

OnApplyTemplate()

Applies tile template.

public void OnApplyTemplate()

DrawAsync(GeoCanvas)

This method draws the image for tile.

public Task DrawAsync(GeoCanvas geoCanvas)

Parameters

geoCanvas GeoCanvas
This parameter is the canvas object to draw on.

Returns

Task

Remarks:

This method is the concrete wrapper for the virtual method DrawCore. This method draws the representation for the overlay based on the extent you provided.

DrawAsyncCore(GeoCanvas)

This method draws the image for the tile.

protected Task DrawAsyncCore(GeoCanvas geoCanvas)

Parameters

geoCanvas GeoCanvas
This parameter is the canvas object to draw on.

Returns

Task

Remarks:

When implementing this abstract method, consider if the IsAsync property. If yes, draw it in background thread; If no, draw it directly with the properties we provid.

OnOpened(EventArgs)

This method executs when the Opened event raised.

protected void OnOpened(EventArgs args)

Parameters

args EventArgs
This parameter maitains the arguments for the Opened event.

OnDrawing(DrawingTileViewEventArgs)

This method raises before the tile is drawing.

protected void OnDrawing(DrawingTileViewEventArgs args)

Parameters

args DrawingTileViewEventArgs
An event argument for the Drawing event in TileView class.

OnDrawn(DrawnTileViewEventArgs)

This method raises after the tile is drawn.

protected void OnDrawn(DrawnTileViewEventArgs args)

Parameters

args DrawnTileViewEventArgs
An event argument for the Drawn event in the TileView class.

Dispose()

This method implements the IDispose method. This method is the concrete wrapper for the abstract method DisposeCore.

public void Dispose()

Dispose(Boolean)

This method disposes all the unmanaged resource in the tile.

protected void Dispose(bool disposing)

Parameters

disposing Boolean

Remarks:

When implementing this method, consider the stop the background threading when drawing asynchronously.

Events

Opened

This is an event raises after this tile is opened.

public event EventHandler Opened;

Drawing

This is an event raises before the tile is drawing.

public event EventHandler<DrawingTileViewEventArgs> Drawing;

Drawn

This is an event raises after the tile is drawn.

public event EventHandler<DrawnTileViewEventArgs> Drawn;

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;