CanvasTileView¶
Namespace: ThinkGeo.UI.Maui
A subclass of TileViewBase. This tile renders the tile through DrawAsyncCore(GeoCanvas);
public abstract class CanvasTileView : TileView, System.ComponentModel.INotifyPropertyChanged, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.IVisualTreeElement, Microsoft.Maui.IElement, Microsoft.Maui.Controls.IEffectControlProvider, Microsoft.Maui.IToolTipElement, Microsoft.Maui.IContextFlyoutElement, Microsoft.Maui.Controls.IAnimatable, Microsoft.Maui.Controls.IVisualElementController, Microsoft.Maui.IView, Microsoft.Maui.ITransform, Microsoft.Maui.Controls.IViewController, Microsoft.Maui.Controls.Internals.IGestureController, Microsoft.Maui.Controls.IGestureRecognizers, Microsoft.Maui.IPropertyMapperView, Microsoft.Maui.HotReload.IHotReloadableView, Microsoft.Maui.IReplaceableView, Microsoft.Maui.Controls.IImageController, Microsoft.Maui.Controls.IElementConfiguration`1[[Microsoft.Maui.Controls.Image, Microsoft.Maui.Controls, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]], Microsoft.Maui.IImage, Microsoft.Maui.IImageSourcePart, System.IDisposable
Inheritance object → BindableObject → Element → StyleableElement → NavigableElement → VisualElement → View → Image → TileView → CanvasTileView
Implements INotifyPropertyChanged, IElementController, IVisualTreeElement, IElement, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IVisualElementController, IView, ITransform, IViewController, IGestureController, IGestureRecognizers, IPropertyMapperView, IHotReloadableView, IReplaceableView, IImageController, IElementConfiguration<Image>, IImage, IImageSourcePart, IDisposable
Fields¶
propertyMapper¶
protected PropertyMapper propertyMapper;
Properties¶
DrawingExceptionMode¶
Gets or sets how to specify the exception in current drawing process.
public DrawingExceptionMode DrawingExceptionMode { get; set; }
Property Value¶
DrawingExceptionMode
Exception¶
User can set the customer exception, and we can paint that.
public Exception Exception { get; protected set; }
Property Value¶
BoundingBox¶
Gets or sets an extent that uses for drawing.
public RectangleShape BoundingBox { get; set; }
Property Value¶
RectangleShape
RowIndex¶
Gets or sets tile's row index in tile overlay.
public long RowIndex { get; set; }
Property Value¶
ColumnIndex¶
Gets or sets tile's column index in tile overlay.
public long ColumnIndex { get; set; }
Property Value¶
ZoomLevelIndex¶
Gets or sets current level index in the ZoomLevelSet.
public int ZoomLevelIndex { get; set; }
Property Value¶
Aspect¶
public Aspect Aspect { get; set; }
Property Value¶
Aspect
IsLoading¶
public bool IsLoading { get; }
Property Value¶
IsOpaque¶
public bool IsOpaque { get; set; }
Property Value¶
IsAnimationPlaying¶
public bool IsAnimationPlaying { get; set; }
Property Value¶
Source¶
public ImageSource Source { get; set; }
Property Value¶
ImageSource
GestureController¶
protected internal IGestureController GestureController { get; }
Property Value¶
IGestureController
GestureRecognizers¶
public IList<IGestureRecognizer> GestureRecognizers { get; }
Property Value¶
HorizontalOptions¶
public LayoutOptions HorizontalOptions { get; set; }
Property Value¶
LayoutOptions
Margin¶
public Thickness Margin { get; set; }
Property Value¶
Thickness
VerticalOptions¶
public LayoutOptions VerticalOptions { get; set; }
Property Value¶
LayoutOptions
Visual¶
public IVisual Visual { get; set; }
Property Value¶
IVisual
FlowDirection¶
public FlowDirection FlowDirection { get; set; }
Property Value¶
FlowDirection
Window¶
public Window Window { get; }
Property Value¶
Window
AnchorX¶
public double AnchorX { get; set; }
Property Value¶
AnchorY¶
public double AnchorY { get; set; }
Property Value¶
BackgroundColor¶
public Color BackgroundColor { get; set; }
Property Value¶
Color
Background¶
public Brush Background { get; set; }
Property Value¶
Brush
Behaviors¶
public IList<Behavior> Behaviors { get; }
Property Value¶
Bounds¶
public Rect Bounds { get; }
Property Value¶
Rect
Height¶
public double Height { get; }
Property Value¶
HeightRequest¶
public double HeightRequest { get; set; }
Property Value¶
InputTransparent¶
public bool InputTransparent { get; set; }
Property Value¶
IsEnabled¶
public bool IsEnabled { get; set; }
Property Value¶
IsEnabledCore¶
protected bool IsEnabledCore { get; }
Property Value¶
IsFocused¶
public bool IsFocused { get; }
Property Value¶
IsVisible¶
public bool IsVisible { get; set; }
Property Value¶
MinimumHeightRequest¶
public double MinimumHeightRequest { get; set; }
Property Value¶
MinimumWidthRequest¶
public double MinimumWidthRequest { get; set; }
Property Value¶
MaximumHeightRequest¶
public double MaximumHeightRequest { get; set; }
Property Value¶
MaximumWidthRequest¶
public double MaximumWidthRequest { get; set; }
Property Value¶
Opacity¶
public double Opacity { get; set; }
Property Value¶
Rotation¶
public double Rotation { get; set; }
Property Value¶
RotationX¶
public double RotationX { get; set; }
Property Value¶
RotationY¶
public double RotationY { get; set; }
Property Value¶
Scale¶
public double Scale { get; set; }
Property Value¶
ScaleX¶
public double ScaleX { get; set; }
Property Value¶
ScaleY¶
public double ScaleY { get; set; }
Property Value¶
TranslationX¶
public double TranslationX { get; set; }
Property Value¶
TranslationY¶
public double TranslationY { get; set; }
Property Value¶
Triggers¶
public IList<TriggerBase> Triggers { get; }
Property Value¶
Width¶
public double Width { get; }
Property Value¶
WidthRequest¶
public double WidthRequest { get; set; }
Property Value¶
X¶
public double X { get; }
Property Value¶
Y¶
public double Y { get; }
Property Value¶
Clip¶
public Geometry Clip { get; set; }
Property Value¶
Geometry
Resources¶
public ResourceDictionary Resources { get; set; }
Property Value¶
ResourceDictionary
Frame¶
public Rect Frame { get; set; }
Property Value¶
Rect
Handler¶
public IViewHandler Handler { get; set; }
Property Value¶
IViewHandler
Shadow¶
public Shadow Shadow { get; set; }
Property Value¶
Shadow
ZIndex¶
public int ZIndex { get; set; }
Property Value¶
DesiredSize¶
public Size DesiredSize { get; protected set; }
Property Value¶
Size
IsLoaded¶
public bool IsLoaded { get; }
Property Value¶
Navigation¶
public INavigation Navigation { get; }
Property Value¶
INavigation
Style¶
public Style Style { get; set; }
Property Value¶
Style
StyleClass¶
public IList<string> StyleClass { get; set; }
Property Value¶
class¶
public IList<string> class { get; set; }
Property Value¶
AutomationId¶
public string AutomationId { get; set; }
Property Value¶
ClassId¶
public string ClassId { get; set; }
Property Value¶
Effects¶
public IList<Effect> Effects { get; }
Property Value¶
Id¶
public Guid Id { get; }
Property Value¶
StyleId¶
public string StyleId { get; set; }
Property Value¶
Parent¶
public Element Parent { get; set; }
Property Value¶
Element
Handler¶
public IElementHandler Handler { get; set; }
Property Value¶
IElementHandler
Dispatcher¶
public IDispatcher Dispatcher { get; }
Property Value¶
IDispatcher
BindingContext¶
public object BindingContext { get; set; }
Property Value¶
Constructors¶
CanvasTileView()¶
Constructor of TileView class.
protected CanvasTileView()
Methods¶
DrawAsyncCore(double, double, double, GeographyUnit, CancellationToken)¶
Renders the tile content into a Skia-backed canvas and stores the resulting bitmap.
protected Task DrawAsyncCore(double tileWidth, double tileHeight, double scaleFactor, GeographyUnit mapUnit, CancellationToken cancellationToken)
Parameters¶
tileWidth double
The tile width in device-independent pixels.
tileHeight double
The tile height in device-independent pixels.
scaleFactor double
The pixel scale factor for high-DPI displays.
mapUnit GeographyUnit
The map unit represented by the tile.
cancellationToken CancellationToken
Token used to cancel the draw operation.
Returns¶
DrawAsyncCore(GeoCanvas)¶
This method draws the image for the tile.
protected abstract Task DrawAsyncCore(GeoCanvas geoCanvas)
Parameters¶
geoCanvas GeoCanvas
This parameter is the canvas object to draw on.
Returns¶
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 provided.
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.
Events¶
Drawing¶
This is an event raises before the tile is drawing.
public event EventHandler<DrawingTileViewEventArgs> Drawing;
Posted¶
This is an event raises after the tile is drawn.
public event EventHandler<PostedTileViewEventArgs> Posted;
ChildrenReordered¶
public event EventHandler ChildrenReordered;
Focused¶
public event EventHandler<FocusEventArgs> Focused;
MeasureInvalidated¶
public event EventHandler MeasureInvalidated;
SizeChanged¶
public event EventHandler SizeChanged;
Unfocused¶
public event EventHandler<FocusEventArgs> Unfocused;
Loaded¶
public event EventHandler Loaded;
Unloaded¶
public event EventHandler Unloaded;
ChildAdded¶
public event EventHandler<ElementEventArgs> ChildAdded;
ChildRemoved¶
public event EventHandler<ElementEventArgs> ChildRemoved;
DescendantAdded¶
public event EventHandler<ElementEventArgs> DescendantAdded;
DescendantRemoved¶
public event EventHandler<ElementEventArgs> DescendantRemoved;
ParentChanging¶
public event EventHandler<ParentChangingEventArgs> ParentChanging;
ParentChanged¶
public event EventHandler ParentChanged;
HandlerChanging¶
public event EventHandler<HandlerChangingEventArgs> HandlerChanging;
HandlerChanged¶
public event EventHandler HandlerChanged;
PropertyChanged¶
public event PropertyChangedEventHandler PropertyChanged;
PropertyChanging¶
public event PropertyChangingEventHandler PropertyChanging;
BindingContextChanged¶
public event EventHandler BindingContextChanged;