Show / Hide Table of Contents

Method OpenAsync

OpenAsync(String)

Opens a SymbolStyle in the specified path.

Declaration
public static async Task<SymbolStyle> OpenAsync(string styleLocation)
Parameters
Type Name Description
System.String styleLocation

Physical location of the .stylx file. Need to provide the full path (e.g. ../../../mil2525c/mil2525c.stylx).

Returns
Type Description
System.Threading.Tasks.Task<SymbolStyle>

The symbol style at the specified path.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7

OpenAsync(PortalItem)

Opens a new SymbolStyle object from a portal item. The portal item must be a web style.

Declaration
public static async Task<SymbolStyle> OpenAsync(PortalItem portalItem)
Parameters
Type Name Description
PortalItem portalItem

If you have the item id of a style file, you can search the portal to find the item using its uri or item Id.

Returns
Type Description
System.Threading.Tasks.Task<SymbolStyle>

The symbol style.

Remarks

Use this constructor if you have a reference to a web style portal item.

Exceptions
Type Condition
ArcGISRuntimeException

portalItem is thrown if item passed is not a valid symbol web style.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.10 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.10 - 200.7
Xamarin.Android100.10 - 100.15
Xamarin.iOS100.10 - 100.15
UWP100.10 - 200.7

OpenAsync(String, ArcGISPortal)

Opens a new SymbolStyle from a portal item. The portal item must contain a webstyle style.

Declaration
public static async Task<SymbolStyle> OpenAsync(string styleName, ArcGISPortal portal)
Parameters
Type Name Description
System.String styleName

The registered symbol style name on the portal.

ArcGISPortal portal

The portal that contains the web style. If null is passed, ArcGIS online is used as the default portal.

Returns
Type Description
System.Threading.Tasks.Task<SymbolStyle>

The web style.

Remarks

Use this method to create a symbol style using the web style's unique name on the portal.

If null is passed, ArcGIS online is used as the default portal.

Esri provides a set of webstyles "out of the box" for localized use with ArcGIS Online and Enterprise. An overview of styles and symbols currently in production is available for 3D and 2D..

Tip: Click on the symbol icon to find it's associated style name. Registered style name can also be found in the item json of the symbols style. For example refer to item json for EsriThematicShapesStyle web style hosted on ArcGIS Online.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.10 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.10 - 200.7
Xamarin.Android100.10 - 100.15
Xamarin.iOS100.10 - 100.15
UWP100.10 - 200.7

OpenAsync(Uri)

Opens a new SymbolStyle from a web style item Uri.

Declaration
public static async Task<SymbolStyle> OpenAsync(Uri source)
Parameters
Type Name Description
System.Uri source

Webstyle item Uri.

Returns
Type Description
System.Threading.Tasks.Task<SymbolStyle>

The symbol style

Remarks

A symbol style using style item's Uri. For example, https://www.arcgis.com/home/item.html?id=bf27400d167d4c2e8e12c8a46f87afe4 is the Uri of the "Basic Shapes" style on ArcGIS Online."

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.10 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.2 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.10 - 200.7
Xamarin.Android100.10 - 100.14
Xamarin.iOS100.10 - 100.15
UWP100.10 - 200.7
In This Article
Back to top Copyright © 2022 Esri.