• Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Design
    Unite UX
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class AsyncReaderBase

Base class for the asynchronous map shape readers (KML, ESRI, WKT/WKB).

Inheritance
System.Object
AsyncReaderBase
AsyncFileReaderBase
AsyncSqlGeospatialDataReader
Namespace: Telerik.Windows.Controls.Map
Assembly: Telerik.Windows.Controls.DataVisualization.dll

Syntax

public abstract class AsyncReaderBase : Freezable

Constructors

AsyncReaderBase()

Declaration
protected AsyncReaderBase()

Fields

ClearLayerProperty

Identifies the ClearLayer dependency property.

Declaration
public static readonly DependencyProperty ClearLayerProperty
Field Value
System.Windows.DependencyProperty

CoordinateConverterProperty

Identifies the CoordinateConverter dependency property.

Declaration
public static readonly DependencyProperty CoordinateConverterProperty
Field Value
System.Windows.DependencyProperty

ExtendedPropertySetProperty

Identifies the ExtendedPropertySet dependency property.

Declaration
public static readonly DependencyProperty ExtendedPropertySetProperty
Field Value
System.Windows.DependencyProperty

ToolTipFormatProperty

Identifies the ToolTipFormat dependency property.

Declaration
public static readonly DependencyProperty ToolTipFormatProperty
Field Value
System.Windows.DependencyProperty

ToolTipStyleProperty

Identifies the ToolTipStyle dependency property.

Declaration
public static readonly DependencyProperty ToolTipStyleProperty
Field Value
System.Windows.DependencyProperty

ToolTipTemplateProperty

Identifies the ToolTipTemplate dependency property.

Declaration
public static readonly DependencyProperty ToolTipTemplateProperty
Field Value
System.Windows.DependencyProperty

Properties

ClearLayer

Gets or sets the ClearLayer property. If it is set to true, then the reader clears its information layer after reading.

Declaration
public bool ClearLayer { get; set; }
Property Value
System.Boolean

CoordinateConverter

Gets or sets the CoordinateConverter applied to the reader.

Declaration
public ICoordinateConverter CoordinateConverter { get; set; }
Property Value
ICoordinateConverter

ExtendedPropertySet

Gets or sets extended property set which will be used during shape file (KML or ESRI) reading.

Declaration
public ExtendedPropertySet ExtendedPropertySet { get; set; }
Property Value
ExtendedPropertySet

Remarks

Can be null. In this case extended property set will be created depends on the extended data available in the KML file or in the attributes file (DBF).

Layer

Target visualization layer.

Declaration
public VisualizationLayer Layer { get; set; }
Property Value
VisualizationLayer

ToolTipFormat

Gets or sets tooltip format. Either ToolTipFormat or ToolTipTemplate should be specified. If both properties are set, then ToolTipTemplate will be used.

Declaration
public string ToolTipFormat { get; set; }
Property Value
System.String

Examples

The tooltip format can be specified in a few different ways: as simple name of the extended property, as formatted extended property, or as format string which can use number of the extended properties.

this.visualizationLayer.Reader = new AsyncShapeFileReader();

// Using of the single extended property name.
this.visualizationLayer.Reader.ToolTipFormat = "CNTRY_NAME";

// Using of the formatted extended property.
// The '|' character is used to separate extended property name and its output format.
this.visualizationLayer.Reader.ToolTipFormat = "SUM_SQMI_A|F2";

// Format string with number of the extended properties.
this.visualizationLayer.Reader.ToolTipFormat = "{CNTRY_NAME} Miles: {SUM_SQMI_A|F2}, KM: {SUM_SQKM_A|F1}";
Me.visualizationLayer.Reader = New AsyncShapeFileReader()

' Using of the single extended property name.
Me.visualizationLayer.Reader.ToolTipFormat = "CNTRY_NAME"

' Using of the formatted extended property.
' The '|' character is used to separate extended property name and its output format.
Me.visualizationLayer.Reader.ToolTipFormat = "SUM_SQMI_A|F2"

 Format string with number of the extended properties.
Me.visualizationLayer.Reader.ToolTipFormat = "{CNTRY_NAME} Miles: {SUM_SQMI_A|F2}, KM: {SUM_SQKM_A|F1}"
<telerik:AsyncShapeFileReader Source="/Telerik.RadMap.Silverlight;component/africa"
    ToolTipFormat="CNTRY_NAME">

<telerik:AsyncShapeFileReader Source="/Telerik.RadMap.Silverlight;component/africa"
    ToolTipFormat="SUM_SQMI_A|F2">

<telerik:AsyncShapeFileReader Source="/Telerik.RadMap.Silverlight;component/africa"
    ToolTipFormat="{}{CNTRY_NAME} Miles: {SUM_SQMI_A|F2}, KM: {SUM_SQKM_A|F1}">
.

ToolTipStyle

Gets or sets the style applied to the toolTip.

Declaration
public Style ToolTipStyle { get; set; }
Property Value
System.Windows.Style

ToolTipTemplate

Gets or sets tooltip content template. Either ToolTipFormat or ToolTipTemplate should be specified. If both properties are set, then ToolTipTemplate will be used. You can bind elements in the tooltip template to extended properties using ExtendedDataConverter and Data property of the ExtendedData object.

Declaration
public DataTemplate ToolTipTemplate { get; set; }
Property Value
System.Windows.DataTemplate

Examples

This example demonstrates how the tooltip template can be set.

<telerik:AsyncShapeFileReader Source="/Telerik.RadMap.Silverlight;component/africa">
    <telerik:AsyncShapeFileReader.ToolTipTemplate>
        <DataTemplate>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <TextBlock Grid.Column="0" Grid.Row="0" Text="Name:" />
                <TextBlock Grid.Column="1" Grid.Row="0" 
                    Text="{Binding Path=Data[CNTRY_NAME]}" />

                <TextBlock Grid.Column="0" Grid.Row="1" Text="Population:" />
                <TextBlock Grid.Column="1" Grid.Row="1" 
                    Text="{Binding Path=Data, Converter={StaticResource ExtendedDataConverter}, ConverterParameter='\{SQKM|#,#.0\}'}" />

                <TextBlock Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="2" 
                    Text="{Binding Path=Data[Area (MI) \=\{SQMI|F1\} Population\=\{POP_CNTRY|F0\}]}" />
            </Grid>
        </DataTemplate>
    </telerik:AsyncShapeFileReader.ToolTipTemplate>
</telerik:AsyncShapeFileReader>
.

Methods

CancelAsync()

Cancels loading of shapes.

Declaration
public void CancelAsync()

CancelAsync(Int32)

Cancels loading of shapes by process id.

Declaration
public void CancelAsync(int processId)
Parameters
System.Int32 processId

Id of the process.

CreateInstanceCore()

When implemented in a derived class, creates a new instance of the Freezable derived class.

Declaration
protected override Freezable CreateInstanceCore()
Returns
System.Windows.Freezable

Null.

OnReaderPropertyChanged(DependencyPropertyChangedEventArgs)

Occurs when the properties which are used for loading are changed.

Declaration
protected virtual void OnReaderPropertyChanged(DependencyPropertyChangedEventArgs eventArgs)
Parameters
System.Windows.DependencyPropertyChangedEventArgs eventArgs

Event arguments.

ReadAsync()

Reads geospatial data using asynchronous mode.

Declaration
public abstract int ReadAsync()
Returns
System.Int32

ReadAsync(Object)

Reads geospatial data using asynchronous mode.

Declaration
public abstract int ReadAsync(object userState)
Parameters
System.Object userState

A user-defined object that is passed to the method invoked when the asynchronous operation completes.

Returns
System.Int32

ReaderPropertyChanged(DependencyObject, DependencyPropertyChangedEventArgs)

Starts loading when the properties which are used for loading are changed.

Declaration
protected static void ReaderPropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs eventArgs)
Parameters
System.Windows.DependencyObject source

Source object.

System.Windows.DependencyPropertyChangedEventArgs eventArgs

Event arguments.

Events

PreviewReadShapeData

Occurs when a shape data is read.

Declaration
public event PreviewReadShapeDataCompletedEventHandler PreviewReadShapeData
Event Type
PreviewReadShapeDataCompletedEventHandler

PreviewReadShapeDataCompleted

Occurs when the reader completes to read shapes.

Declaration
public event PreviewReadShapeDataCompletedEventHandler PreviewReadShapeDataCompleted
Event Type
PreviewReadShapeDataCompletedEventHandler

ProgressChanged

Occurs when part of data is read.

Declaration
public event ProgressChangedEventHandler ProgressChanged
Event Type
System.ComponentModel.ProgressChangedEventHandler

ReadShapeDataCompleted

Occurs when the reader completes to read shapes and pass them to target information layer.

Declaration
public event ReadShapeDataCompletedEventHandler ReadShapeDataCompleted
Event Type
ReadShapeDataCompletedEventHandler

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.