Skip to content

Commit

Permalink
186127 sdk docs updates (#82)
Browse files Browse the repository at this point in the history
* update .gitignore

* update several XF urls to Maui

* update more outdated references, including code updates

* update build instructions

* update several references from geocortex to vertigis
  • Loading branch information
Felicity-R authored Feb 13, 2025
1 parent a514cde commit fc58095
Show file tree
Hide file tree
Showing 36 changed files with 139 additions and 197 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ dist
# Generated files
.docusaurus
.cache-loader
**/.vs/

# Misc
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion docs/mobile/configuration-app-config-getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ The functionality of the `config` attribute is dependent on the fact that IDs ac

The VertiGIS Studio Mobile SDK Samples project has a variety of app configuration samples:

- [App Configuration Samples](https://github.com/vertigis/vertigis-mobile-samples/tree/master/Geocortex.Mobile.Samples/Geocortex.Mobile.Samples/Samples/AppConfiguration)
- [App Configuration Samples](https://github.com/vertigis/vertigis-mobile-samples/tree/master/VSM.Samples/VSM.Samples/Samples/AppConfiguration)

## Next Steps: Commands and Operations

Expand Down
4 changes: 2 additions & 2 deletions docs/mobile/configuration-commands-operations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,9 @@ The second command/operation in this application is a `map.zoom-to-initial-viewp

Check out the relevant VertiGIS Studio Mobile SDK Samples:

- [Commands](https://github.com/vertigis/vertigis-mobile-samples/tree/master/Geocortex.Mobile.Samples/Geocortex.Mobile.Samples/Samples/AppConfiguration/Commands)
- [Commands](https://github.com/vertigis/vertigis-mobile-samples/tree/master/VSM.Samples/VSM.Samples/Samples/AppConfiguration/Commands)

- [Map and Feature Commands](https://github.com/vertigis/vertigis-mobile-samples/tree/master/Geocortex.Mobile.Samples/Geocortex.Mobile.Samples/Samples/AppConfiguration/MapAndFeatureCommands)
- [Map and Feature Commands](https://github.com/vertigis/vertigis-mobile-samples/tree/master/VSM.Samples/VSM.Samples/Samples/AppConfiguration/MapAndFeatureCommands)

## Next Steps

Expand Down
2 changes: 1 addition & 1 deletion docs/mobile/configuration-layout-getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ When adding custom components, you will need to [add their custom namespace](sdk

The VertiGIS Studio Mobile SDK Samples project has a variety of layout configuration samples:

- [Layout Configuration Samples](https://github.com/vertigis/vertigis-mobile-samples/tree/master/Geocortex.Mobile.Samples/Geocortex.Mobile.Samples/Samples/Layout)
- [Layout Configuration Samples](https://github.com/vertigis/vertigis-mobile-samples/tree/master/VSM.Samples/VSM.Samples/Samples/Layout)

## Next Steps: Components and App Config

Expand Down
4 changes: 2 additions & 2 deletions docs/mobile/configuration-theme.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ used in a VertiGIS Studio Mobile Application. Each of these colors can be
[customized](#customizing-theme-colors) and [used in custom components](sdk-components-styling.mdx)

:::note
Theme colors in mobile are added as [dynamic resources](https://docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/resource-dictionaries?WT.mc_id=docs-ch9-jamont#consume-resources-in-xaml).
Theme colors in mobile are added as [dynamic resources](https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/resource-dictionaries?view=net-maui-9.0#consume-resources).
:::

```cs
Expand Down Expand Up @@ -152,4 +152,4 @@ Color tabSecondaryForeground;

## Relevant SDK Sample

The VertiGIS Studio Mobile SDK Samples has an example of [configuring the theme with the branding service](https://github.com/vertigis/vertigis-mobile-samples/tree/master/Geocortex.Mobile.Samples/Geocortex.Mobile.Samples/Samples/AppConfiguration/Theme).
The VertiGIS Studio Mobile SDK Samples has an example of [configuring the theme with the branding service](https://github.com/vertigis/vertigis-mobile-samples/tree/master/VSM.Samples/VSM.Samples/Samples/AppConfiguration/Theme).
2 changes: 1 addition & 1 deletion docs/mobile/sdk-commands-operations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,4 @@ class CustomService : ServiceBase

## Relevant SDK Sample

The VertiGIS Studio Mobile SDK Samples project has a sample of [implementing a command with a custom service](https://github.com/vertigis/vertigis-mobile-samples/tree/master/Geocortex.Mobile.Samples/Geocortex.Mobile.Samples/Samples/Custom/Service).
The VertiGIS Studio Mobile SDK Samples project has a sample of [implementing a command with a custom service](https://github.com/vertigis/vertigis-mobile-samples/tree/master/VSM.Samples/VSM.Samples/Samples/Custom/Service).
6 changes: 3 additions & 3 deletions docs/mobile/sdk-component-service-interactions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Components and services have multiple ways of interacting with other components
- When possible, interaction through [commands and operations](sdk-commands-operations.mdx#running-commands-and-operations) should be preferred, as this introduces the loosest coupling.
- When you need stronger coupling and direct access to a service, then [dependency injection](sdk-dependency-injection.mdx) can be used to reference services.

If a component or service needs access to the [ArcGIS MapView object](https://developers.arcgis.com/net/latest/uwp/api-reference/html/T_Esri_ArcGISRuntime_Xamarin_Forms_MapView.htm) powering the applications map, it can reference it through an `ILayoutModel`.
If a component or service needs access to the [ArcGIS MapView object](https://developers.arcgis.com/net/api-reference/api/net/Maui/Esri.ArcGISRuntime.Maui.MapView.html) powering the applications map, it can reference it through an `ILayoutModel`.

## Interacting with the `MapView`

Expand Down Expand Up @@ -54,6 +54,6 @@ class CustomComponent : ComponentBase

Check out the relevant VertiGIS Studio Mobile SDK Samples:

- [Basemap Toggle that uses Custom Services and Components](https://github.com/vertigis/vertigis-mobile-samples/tree/master/Geocortex.Mobile.Samples/Geocortex.Mobile.Samples/Samples/CustomSamples/BasemapToggle)
- [Basemap Toggle that uses Custom Services and Components](https://github.com/vertigis/vertigis-mobile-samples/tree/master/VSM.Samples/VSM.Samples/Samples/CustomSamples/BasemapToggle)

- [Breadcrumb Tracker that uses Custom Services and Components](https://github.com/vertigis/vertigis-mobile-samples/tree/master/Geocortex.Mobile.Samples/Geocortex.Mobile.Samples/Samples/CustomSamples/BreadCrumbs)
- [Breadcrumb Tracker that uses Custom Services and Components](https://github.com/vertigis/vertigis-mobile-samples/tree/master/VSM.Samples/VSM.Samples/Samples/CustomSamples/BreadCrumbs)
13 changes: 6 additions & 7 deletions docs/mobile/sdk-components-create.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@ If you can't solve your use case by editing the app layout and config using the

## Basic Component

Create a new file `components/CustomComponent.cs` under the platform agnostic project.
Create a new file `components/CustomComponent.cs` in your project.
In the file, add a new component class `CustomComponent` and register it with VertiGIS Studio Mobile using an assembly attribute.

```cs
using App1;
using App1.Components;
using VertiGIS.Mobile.Composition.Layout;
using System.Xml.Linq;
using Xamarin.Forms;
using VertiGIS.Mobile.Composition.Layout;

[assembly: Component(typeof(CustomComponent), "custom-component", XmlNamespace = XmlNamespaces.App1Namespace)]
namespace App1.Components
Expand All @@ -39,7 +38,7 @@ namespace App1.Components
{
protected override VisualElement Create(XNode node)
{
return new Label(){ Text = "My Custom Component" };
return new Label() { Text = "My Custom Component" };
}
}
}
Expand Down Expand Up @@ -111,11 +110,11 @@ You've now accomplished the basics of extending VertiGIS Studio Mobile with a cu

Check out the relevant VertiGIS Studio Mobile SDK Samples:

- [Custom Component](https://github.com/vertigis/vertigis-mobile-samples/tree/master/Geocortex.Mobile.Samples/Geocortex.Mobile.Samples/Samples/Custom/Component)
- [Custom Component](https://github.com/vertigis/vertigis-mobile-samples/tree/master/VSM.Samples/VSM.Samples/Samples/Custom/Component)

- [Component with Configuration](https://github.com/vertigis/vertigis-mobile-samples/tree/master/Geocortex.Mobile.Samples/Geocortex.Mobile.Samples/Samples/Custom/ComponentConfiguration)
- [Component with Configuration](https://github.com/vertigis/vertigis-mobile-samples/tree/master/VSM.Samples/VSM.Samples/Samples/Custom/ComponentConfiguration)

- [Component with XAML UI](https://github.com/vertigis/vertigis-mobile-samples/tree/master/Geocortex.Mobile.Samples/Geocortex.Mobile.Samples/Samples/Custom/XamlComponent)
- [Component with XAML UI](https://github.com/vertigis/vertigis-mobile-samples/tree/master/VSM.Samples/VSM.Samples/Samples/Custom/XamlComponent)

## Next Steps

Expand Down
4 changes: 2 additions & 2 deletions docs/mobile/sdk-components-internationalization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import TranslationCallout from "./snippets/translation-callout.mdx";

## Providing Language Strings for a Component

Strings in custom components are internationalized using references to to language resources. Check out the [Xamarin Guide to localizing text](https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/localization/text?pivots=windows#localize-text-in-xamarinforms).
Strings in custom components are internationalized using references to to language resources. Check out the [.NET MAUI Guide to localizing text](https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/localization?view=net-maui-9.0#localize-text).

## Relevant Samples

The [SDK Samples](sdk-samples.mdx) project includes a [internationalization example](https://github.com/vertigis/vertigis-mobile-samples/tree/master/Geocortex.Mobile.Samples/Geocortex.Mobile.Samples/Samples/Conceptual/Internationalization) which demonstrates how to configure resource files on a component level.
The [SDK Samples](sdk-samples.mdx) project includes a [internationalization example](https://github.com/vertigis/vertigis-mobile-samples/tree/master/VSM.Samples/VSM.Samples/Samples/Conceptual/Internationalization) which demonstrates how to configure resource files on a component level.

You can also check out the use of [language strings in the quick start application](https://github.com/vertigis/vertigis-mobile-quickstart/blob/master/App1/App1/AppResources.resx).
25 changes: 12 additions & 13 deletions docs/mobile/sdk-components-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Once a component has been registered, it can be used in a layout by referring it

## Component Anatomy

VertiGIS Studio Mobile is built on top of the [Xamarin Platform](https://docs.microsoft.com/en-us/xamarin/). In general, [XAML Views](https://docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/) are used to define reactive component UI. Component Views in VertiGIS Studio Mobile are built with the [Model-View-ViewModel (MVVM) pattern](https://docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xaml-basics/data-bindings-to-mvvm). The model for components is usually either [app config](configuration-app-config-getting-started.mdx) or a service hosting shared application data.
VertiGIS Studio Mobile is built on top of the [.NET MAUI Platform](https://learn.microsoft.com/en-us/dotnet/maui/). In general, [XAML Views](https://learn.microsoft.com/en-us/dotnet/maui/xaml/) are used to define reactive component UI. Component Views in VertiGIS Studio Mobile are built with the [Model-View-ViewModel (MVVM) pattern](https://learn.microsoft.com/en-us/dotnet/maui/xaml/fundamentals/mvvm). The model for components is usually either [app config](configuration-app-config-getting-started.mdx) or a service hosting shared application data.

### Component Class

Expand Down Expand Up @@ -101,23 +101,22 @@ The preferred way to provide sub-dependencies to classes associated with compone

### XAML View

XAML views and their respective "code-behind" are responsible for the presentation concerns of a component. Check out a [complete example in the SDK samples](https://github.com/vertigis/vertigis-mobile-samples/tree/master/Geocortex.Mobile.Samples/Geocortex.Mobile.Samples/Samples/Custom/XamlComponent).
XAML views and their respective "code-behind" are responsible for the presentation concerns of a component. Check out a [complete example in the SDK samples](https://github.com/vertigis/vertigis-mobile-samples/tree/master/VSM.Samples/VSM.Samples/Samples/Custom/XamlComponent).

XAML views can use any [XAML Controls](https://docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xaml-controls) along with built-in [VertiGIS Studio Mobile XAML Elements and styling](sdk-components-styling.mdx#using-vertigis-studio-mobile-views).
XAML views can use any [XAML Controls](https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/) along with built-in [VertiGIS Studio Mobile XAML Elements and styling](sdk-components-styling.mdx#using-vertigis-studio-mobile-views).

```xml
<?xml version="1.0" encoding="UTF-8"?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
x:Class="Geocortex.Mobile.Samples.Samples.Custom.XamlComponent.XamlComponentView">
x:Class="VSM.Samples.Custom.XamlComponent.XamlComponentView">
<ContentView.Content>
<StackLayout Margin="5">
<VerticalStackLayout Margin="5">
<Label Text="Hello XAML Component!" />
<Label Text="This component view is created using a XAML view." />
</StackLayout>
</VerticalStackLayout>
</ContentView.Content>
</ContentView>
```
Expand All @@ -126,7 +125,7 @@ XAML views can use any [XAML Controls](https://docs.microsoft.com/en-us/xamarin/

Component view models are responsible for populating properties with data for the view to bind to. The data for the view model is usually provided by the component class, which can consume app config or other data from the application through [dependency injection](sdk-dependency-injection.mdx). View models can use commands and operations to interact with application services and other components.

Check out this example of a [component with a view model](https://github.com/vertigis/vertigis-mobile-samples/tree/master/Geocortex.Mobile.Samples/Geocortex.Mobile.Samples/Samples/CustomSamples/BreadCrumbs).
Check out this example of a [component with a view model](https://github.com/vertigis/vertigis-mobile-samples/tree/master/VSM.Samples/VSM.Samples/Samples/CustomSamples/BreadCrumbs).

## Configuration Models

Expand Down Expand Up @@ -285,7 +284,7 @@ Components have an initialization method, which can be used to perform asynchron
Always call `base.Dispose(disposing)` when overriding the `Dispose` method. `ComponentBase` already implements `IDisposable` and `IDisposableTracker`, so only override the `Dispose` method if you have created new managed resources which need to be cleaned up.
:::

To learn more about memory management in VertiGIS Studio Mobile, check out [this article](sdk-memory-leaks.mdx), and the [relevant SDK sample](https://github.com/vertigis/vertigis-mobile-samples/tree/master/Geocortex.Mobile.Samples/Geocortex.Mobile.Samples/Samples/Conceptual/Disposal).
To learn more about memory management in VertiGIS Studio Mobile, check out [this article](sdk-memory-leaks.mdx), and the [relevant SDK sample](https://github.com/vertigis/vertigis-mobile-samples/tree/master/VSM.Samples/VSM.Samples/Samples/Conceptual/Disposal).

```cs
[assembly: Component(typeof(CustomComponent), "component", XmlNamespace = XmlNamespaces.SamplesNamespace)]
Expand Down Expand Up @@ -369,11 +368,11 @@ class CustomComponent : ComponentBase

Check out the relevant VertiGIS Studio Mobile SDK Samples:

- [Custom Component](https://github.com/vertigis/vertigis-mobile-samples/tree/master/Geocortex.Mobile.Samples/Geocortex.Mobile.Samples/Samples/Custom/Component)
- [Custom Component](https://github.com/vertigis/vertigis-mobile-samples/tree/master/VSM.Samples/VSM.Samples/Samples/Custom/Component)
- [Component with Configuration](https://github.com/vertigis/vertigis-mobile-samples/tree/master/Geocortex.Mobile.Samples/Geocortex.Mobile.Samples/Samples/Custom/ComponentConfiguration)
- [Component with Configuration](https://github.com/vertigis/vertigis-mobile-samples/tree/master/VSM.Samples/VSM.Samples/Samples/Custom/ComponentConfiguration)
- [Component with XAML UI](https://github.com/vertigis/vertigis-mobile-samples/tree/master/Geocortex.Mobile.Samples/Geocortex.Mobile.Samples/Samples/Custom/XamlComponent)
- [Component with XAML UI](https://github.com/vertigis/vertigis-mobile-samples/tree/master/VSM.Samples/VSM.Samples/Samples/Custom/XamlComponent)
## Next Steps

Expand Down
Loading

0 comments on commit fc58095

Please sign in to comment.