C# Class ESRI.ArcGIS.Client.Toolkit.Bookmark

Inheritance: System.Windows.Controls.Control
Mostra file Open project: Esri/arcgis-toolkit-sl-wpf

Public Properties

Property Type Description
MapProperty System.Windows.DependencyProperty
TitleProperty System.Windows.DependencyProperty

Private Properties

Property Type Description
AddBookmarkButton_Click void
Bookmark Microsoft.Windows.Controls
BookmarkList_BeginningEdit void
BookmarkList_CellEditEnding void
BookmarkList_SelectionChanged void
Bookmark_Loaded void
LoadBookmarks void
OnMapPropertyChanged void
SaveBookmarks void
map_ExtentChanged void

Public Methods

Method Description
AddBookmark ( string name, ESRI extent ) : void

Adds a named Map.Extent (aka. a bookmark) into the DataGrid sub-component of the Bookmark Control.

The AddBookmark Method adds a named Map.Extent (aka. a bookmark) into the ObservableCollection(Of Bookmark.MapBookmark) object. The ObservableCollection(Of Bookmark.MapBookmark) object is internally bound to the DataGrid sub-component in the Bookmark Control. Use the Bookmark.Bookmarks Property to obtain the ObservableCollection(Of Bookmark.MapBookmark) object.

There are two input parameters for the AddBookmark Method: name and extent.The name is the human readable string that defines a geographic extent on the Map. The extent is the Map.Extent that corresponds to item name in the ObservableCollection.

The functionality of the AddBookmark Method is comparable to when a user of a client application types a string into the Textbox sub-component of the Bookmark Control and clicks the + button, causing the named Map.Extent (aka. a bookmark) to appear in the DataGrid. It should be noted that the AddBookmark Method IS NOT the Event for the + button of the Bookmark Control. To change the core behavior of any of the sub-components and their appearance of the Bookmark Control (including the + button), developers must modify the Control Template in XAML and the associated code-behind file. The easiest way to modify the UI sub-components is using Microsoft Expression Blend. Then developers can delete/modify existing or add new sub-components in Visual Studio to create a truly customized experience. A general approach to customizing a Control Template is discussed in the ESRI blog entitled: Use control templates to customize the look and feel of ArcGIS controls. An example of modifying the Control Template of the Bookmark control to provide an alternate set of functionality that automatically populates several named Map.Extent (aka. a bookmark) values via the AddBookmark Method is provided in the code example section of this document.

ClearBookmarks ( ) : void

Clears the bookmarks.

DeleteBookmarkAt ( int index ) : void

Deletes a bookmark from the DataGrid sub-component of the Bookmark Control at a specified index.

The DeleteBookmark Method deletes a single Bookmark from the ObservableCollection(Of Bookmark.MapBookmark) object. The ObservableCollection(Of Bookmark.MapBookmark) object is internally bound to the DataGrid sub-component in the Bookmark Control. Use the Bookmark.Bookmarks Property to obtain the ObservableCollection(Of Bookmark.MapBookmark) object.

Unlike the Bookmark.AddBookmark Method which takes a name and a Map.Extent as parameters to add items into the ObservableCollection, the DeleteBookmark Method requires an Integer index value to remove an item from the ObservableCollection. No Method exists in the ArcGIS API for Silverlight ArcGIS Runtime SDK for WPF ArcGIS Runtime SDK for Windows Phone to remove an item from the ObservableCollection by its name.

The top-most Bookmark listed in the DataGrid sub-component of the Bookmark Control is the zero (0) item index value.

There is no Property/Method in the ArcGIS API for Silverlight ArcGIS Runtime SDK for WPF ArcGIS Runtime SDK for Windows Phone for the Bookmark Control to obtain the selected index value(s) of the DataGrid sub-component from client user interaction. However, developers can change the core behavior of any of the sub-components and their appearance of the Bookmark Control (including the obtaining selection index values of the DataGrid sub-component) by modifying the Control Template in XAML and the associated code-behind file. The easiest way to modify the UI sub-components is using Microsoft Expression Blend. Then developers can delete/modify existing or add new sub-components in Visual Studio to create a truly customized experience. A general approach to customizing a Control Template is discussed in the ESRI blog entitled: Use control templates to customize the look and feel of ArcGIS controls. An example of modifying the Control Template of the Bookmark control to obtain the selection index value of the DataGrid sub-component in the Bookmark Control is provided in the code example section of this document.

OnApplyTemplate ( ) : void

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call M:System.Windows.Controls.Control.ApplyTemplate.

Private Methods

Method Description
AddBookmarkButton_Click ( object sender, RoutedEventArgs e ) : void
Bookmark ( ) : Microsoft.Windows.Controls

Static initialization for the Bookmark control.

BookmarkList_BeginningEdit ( object sender, DataGridBeginningEditEventArgs e ) : void
BookmarkList_CellEditEnding ( object sender, DataGridCellEditEndingEventArgs e ) : void
BookmarkList_SelectionChanged ( object sender, System.Windows.Controls.SelectionChangedEventArgs e ) : void
Bookmark_Loaded ( object sender, RoutedEventArgs e ) : void
LoadBookmarks ( ) : void
OnMapPropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
SaveBookmarks ( ) : void
map_ExtentChanged ( object sender, ExtentEventArgs args ) : void

Method Details

AddBookmark() public method

Adds a named Map.Extent (aka. a bookmark) into the DataGrid sub-component of the Bookmark Control.

The AddBookmark Method adds a named Map.Extent (aka. a bookmark) into the ObservableCollection(Of Bookmark.MapBookmark) object. The ObservableCollection(Of Bookmark.MapBookmark) object is internally bound to the DataGrid sub-component in the Bookmark Control. Use the Bookmark.Bookmarks Property to obtain the ObservableCollection(Of Bookmark.MapBookmark) object.

There are two input parameters for the AddBookmark Method: name and extent.The name is the human readable string that defines a geographic extent on the Map. The extent is the Map.Extent that corresponds to item name in the ObservableCollection.

The functionality of the AddBookmark Method is comparable to when a user of a client application types a string into the Textbox sub-component of the Bookmark Control and clicks the + button, causing the named Map.Extent (aka. a bookmark) to appear in the DataGrid. It should be noted that the AddBookmark Method IS NOT the Event for the + button of the Bookmark Control. To change the core behavior of any of the sub-components and their appearance of the Bookmark Control (including the + button), developers must modify the Control Template in XAML and the associated code-behind file. The easiest way to modify the UI sub-components is using Microsoft Expression Blend. Then developers can delete/modify existing or add new sub-components in Visual Studio to create a truly customized experience. A general approach to customizing a Control Template is discussed in the ESRI blog entitled: Use control templates to customize the look and feel of ArcGIS controls. An example of modifying the Control Template of the Bookmark control to provide an alternate set of functionality that automatically populates several named Map.Extent (aka. a bookmark) values via the AddBookmark Method is provided in the code example section of this document.

public AddBookmark ( string name, ESRI extent ) : void
name string Display name (aka. named Map.Extent or bookmark).
extent ESRI The Map.Extent of the bookmark.
return void

ClearBookmarks() public method

Clears the bookmarks.
public ClearBookmarks ( ) : void
return void

DeleteBookmarkAt() public method

Deletes a bookmark from the DataGrid sub-component of the Bookmark Control at a specified index.

The DeleteBookmark Method deletes a single Bookmark from the ObservableCollection(Of Bookmark.MapBookmark) object. The ObservableCollection(Of Bookmark.MapBookmark) object is internally bound to the DataGrid sub-component in the Bookmark Control. Use the Bookmark.Bookmarks Property to obtain the ObservableCollection(Of Bookmark.MapBookmark) object.

Unlike the Bookmark.AddBookmark Method which takes a name and a Map.Extent as parameters to add items into the ObservableCollection, the DeleteBookmark Method requires an Integer index value to remove an item from the ObservableCollection. No Method exists in the ArcGIS API for Silverlight ArcGIS Runtime SDK for WPF ArcGIS Runtime SDK for Windows Phone to remove an item from the ObservableCollection by its name.

The top-most Bookmark listed in the DataGrid sub-component of the Bookmark Control is the zero (0) item index value.

There is no Property/Method in the ArcGIS API for Silverlight ArcGIS Runtime SDK for WPF ArcGIS Runtime SDK for Windows Phone for the Bookmark Control to obtain the selected index value(s) of the DataGrid sub-component from client user interaction. However, developers can change the core behavior of any of the sub-components and their appearance of the Bookmark Control (including the obtaining selection index values of the DataGrid sub-component) by modifying the Control Template in XAML and the associated code-behind file. The easiest way to modify the UI sub-components is using Microsoft Expression Blend. Then developers can delete/modify existing or add new sub-components in Visual Studio to create a truly customized experience. A general approach to customizing a Control Template is discussed in the ESRI blog entitled: Use control templates to customize the look and feel of ArcGIS controls. An example of modifying the Control Template of the Bookmark control to obtain the selection index value of the DataGrid sub-component in the Bookmark Control is provided in the code example section of this document.

public DeleteBookmarkAt ( int index ) : void
index int The index value of the bookmark to remove from the ObservableCollection.
return void

OnApplyTemplate() public method

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call M:System.Windows.Controls.Control.ApplyTemplate.
public OnApplyTemplate ( ) : void
return void

Property Details

MapProperty public_oe static_oe property

Identifies the Map dependency property.
public static DependencyProperty,System.Windows MapProperty
return System.Windows.DependencyProperty

TitleProperty public_oe static_oe property

Identifies the Title dependency property.
public static DependencyProperty,System.Windows TitleProperty
return System.Windows.DependencyProperty