Skip to content

Commit

Permalink
Toolkit concept docs XAML: batch 3 (#559)
Browse files Browse the repository at this point in the history
Co-authored-by: Thad Tilton <[email protected]>
  • Loading branch information
williambohrmann3 and ThadT authored May 6, 2024
1 parent 4bd6d21 commit 5925a61
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 32 deletions.
4 changes: 2 additions & 2 deletions docs/legend.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Display a legend for a map or scene view.
<Grid xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"
ColumnDefinitions="*,300">
<esri:MapView x:Name="MyMapView"/>
<esri:Legend GeoView="{x:Bind MyMapView}"
<esri:Legend GeoView="{x:Reference MyMapView}"
Grid.Column="1" />
</Grid>
```
Expand All @@ -34,7 +34,7 @@ Display a legend for a map or scene view.
<ColumnDefinition Width="300"/>
</Grid.ColumnDefinitions>
<esri:MapView x:Name="MyMapView"/>
<toolkit:Legend GeoView="{Binding ElementName=MyMapView}"
<toolkit:Legend GeoView="{x:Bind MyMapView}"
Grid.Column="1" />
</Grid>
```
Expand Down
4 changes: 2 additions & 2 deletions docs/overview-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ OverviewMap has the following bindable properties:
<Grid xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013">
<esri:MapView x:Name="MyMapView" />
<esri:OverviewMap Margin="4"
GeoView="{x:Bind MyMapView}" />
GeoView="{x:Reference MyMapView}" />
</Grid>
```

Expand All @@ -45,7 +45,7 @@ OverviewMap has the following bindable properties:
xmlns:toolkit="using:Esri.ArcGISRuntime.Toolkit.UI.Controls">
<esri:MapView x:Name="MyMapView" />
<toolkit:OverviewMap Margin="4"
GeoView="{Binding ElementName=MyMapView}" />
GeoView="{x:Bind MyMapView}" />
</Grid>
```

Expand Down
33 changes: 31 additions & 2 deletions docs/scale-line.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,35 @@ Display the current scale reference for a map.

## Usage

Ensure that your `GeoModel` is not null before selecting a basemap with the `BasemapGallery`.

### .NET MAUI:

```xml
<Grid xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013">
<esri:MapView x:Name="MyMapView" />
<esri:ScaleLine Margin="20"
MapView="{x:Reference MyMapView}" />
</Grid>
```

### UWP/WinUI:

```xml
<Grid xmlns:esri="using:Esri.ArcGISRuntime.UI.Controls"
xmlns:toolkit="using:Esri.ArcGISRuntime.Toolkit.UI.Controls">
<esri:MapView x:Name="MyMapView" />
<toolkit:ScaleLine Margin="20"
MapView="{x:Bind MyMapView}" />
</Grid>
```

### WPF:

```xml
<esri:ScaleLine MapView="{Binding ElementName=mapView}" />
```
<Grid xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013">
<esri:MapView x:Name="MyMapView" />
<esri:ScaleLine Margin="20"
MapView="{Binding ElementName=MyMapView}" />
</Grid>
```
49 changes: 27 additions & 22 deletions docs/search-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,41 @@ The following properties enable customization of the view:
- `EnableIndividualResultDisplay` - Controls whether the result list is shown when there is only one result.
- `MutlipleResultZoomBuffer` - Controls the buffer distance around collection results when a GeoView is attached and a search has multiple results.

## Usage - WPF
## Usage

```xaml
<Grid>
<esri:MapView x:Name="MyMapView" />
<esri:SearchView GeoView="{Binding ElementName=MyMapView}" />
### .NET MAUI:

`SearchView` shows results in a list on top of underlying content, so it is best to position the view near the top of the page, on top of the `MapView` or `SceneView`.

```xml
<Grid xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"
RowDefinitions="32,Auto,*"
RowSpacing="0">
<esri:SearchView Grid.RowSpan="2"
GeoView="{Binding Source={Reference MyMapView}}" />
<esri:MapView x:Name="MyMapView"
Grid.Row="1"
Grid.RowSpan="2" />
</Grid>
```

## Usage - UWP and WinUI
### UWP/WinUI:

```xaml
<Grid>
```xml
<Grid xmlns:esri="using:Esri.ArcGISRuntime.UI.Controls"
xmlns:toolkit="using:Esri.ArcGISRuntime.Toolkit.UI.Controls">
<esri:MapView x:Name="MyMapView" />
<toolkit:SearchView GeoView="{Binding ElementName=MyMapView}" />
<toolkit:SearchView Margin="4"
GeoView="{x:Bind MyMapView}" />
</Grid>
```

## Usage - MAUI
### WPF:

SearchView shows results in a list on top of underlying content, so it is best to position the view near the top of the page, on top of the MapView or SceneView.

```xaml
<Grid RowSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="32" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<esri:MapView x:Name="MyMapView" Grid.Row="1" Grid.RowSpan="2" />
<toolkit:SearchView GeoView="{Binding Source={Reference MyMapView}}" Grid.Row="0" Grid.RowSpan="2" />
```xml
<Grid xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013">
<esri:MapView x:Name="MyMapView" />
<esri:SearchView Margin="4"
GeoView="{Binding ElementName=MyMapView}" />
</Grid>
```
```
21 changes: 20 additions & 1 deletion docs/symbol-display.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,25 @@ Displays a symbol outside of a `GeoView`.

## Usage



### .NET MAUI:

```xml
<esri:SymbolDisplay xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"
Symbol="{x:Reference Symbol}" />
```

## UWP/WinUI:

```xml
<esri:SymbolDisplay xmlns:toolkit="using:Esri.ArcGISRuntime.Toolkit.UI.Controls"
Symbol="{x:Bind Symbol}" />
```

### WPF:

```xml
<esri:SymbolDisplay Symbol="{Binding Symbol}" />
<esri:SymbolDisplay xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"
Symbol="{Binding ElementName=Symbol}" />
```
35 changes: 32 additions & 3 deletions docs/un-trace.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,44 @@ The following properties enable customizing symbology:

## Usage

The default template for this control is optimized for a panel or side-by-side presentation with a width of around 300 dip.

### .NET MAUI:

```xml
<Grid>
<Grid xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"
ColumnDefinitions="*,300">
<esri:MapView x:Name="MyMapView" />
<esri:UtilityNetworkTraceTool GeoView="{x:Reference MyMapView}"
Grid.Column="1" />
</Grid>
```

### UWP/WinUI:

```xml
<Grid xmlns:esri="using:Esri.ArcGISRuntime.UI.Controls"
xmlns:toolkit="using:Esri.ArcGISRuntime.Toolkit.UI.Controls">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="300" />
</Grid.ColumnDefinitions>
<esri:MapView x:Name="MyMapView" />
<esri:UtilityNetworkTraceTool GeoView="{Binding ElementName=MyMapView}" Grid.Column="1" />
<toolkit:UtilityNetworkTraceTool GeoView="{x:Bind MyMapView}"
Grid.Column="1" />
</Grid>
```

The default template for this control is optimized for a panel or side-by-side presentation with a width of around 300 dip.
### WPF:

```xml
<Grid xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="300" />
</Grid.ColumnDefinitions>
<esri:MapView x:Name="MyMapView" />
<esri:UtilityNetworkTraceTool GeoView="{Binding ElementName=MyMapView}"
Grid.Column="1" />
</Grid>
```

0 comments on commit 5925a61

Please sign in to comment.