|
POST
|
Hi, The simplest way is to call your async method from property setter like this: private string _selectedContinent;
public string SelectedContinent
{
get => _selectedContinent;
set
{
if (SetProperty(ref _selectedContinent, value))
{
_ = LoadCountriesAsync(value);
}
}
} Continents will be first list, countries will be second list. In the same way you can call async methods from class constructor. You can add more functionality as cancelation token, loading status and etc. internal class WorldViewModel : INotifyPropertyChanged
{
public ObservableCollection<string> Continents { get; } = new ObservableCollection<string>();
public ObservableCollection<string> Countries { get; } = new ObservableCollection<string>();
private string _selectedContinent;
public string SelectedContinent
{
get => _selectedContinent;
set
{
if (SetProperty(ref _selectedContinent, value))
{
// Cancel any in-flight load and start a new one (fire-and-forget)
_loadCts?.Cancel();
_loadCts = new CancellationTokenSource();
var token = _loadCts.Token;
_ = LoadCountriesAsync(value, token);
}
}
}
private string _selectedCountry;
public string SelectedCountry
{
get => _selectedCountry;
set => SetProperty(ref _selectedCountry, value);
}
private bool _isLoading;
public bool IsLoading
{
get => _isLoading;
private set => SetProperty(ref _isLoading, value);
}
private CancellationTokenSource _loadCts;
public WorldViewModel()
{
InitializeContinents();
}
private void InitializeContinents()
{
// Seed continents - replace with real data source if needed
Continents.Add("Africa");
Continents.Add("Asia");
Continents.Add("Europe");
Continents.Add("North America");
Continents.Add("South America");
Continents.Add("Oceania");
Continents.Add("Antarctica");
}
public async Task LoadCountriesAsync(string continent, CancellationToken cancellationToken = default)
{
if (string.IsNullOrWhiteSpace(continent))
{
Application.Current.Dispatcher.Invoke(() => Countries.Clear());
return;
}
try
{
IsLoading = true;
// Simulate async IO. Replace with your real async API call (pass cancellationToken).
await Task.Delay(500, cancellationToken);
// Example data - replace with real result
var result = new[]
{
$"{continent} - Country A",
$"{continent} - Country B",
$"{continent} - Country C"
};
// Update UI collection on UI thread
Application.Current.Dispatcher.Invoke(() =>
{
Countries.Clear();
foreach (var c in result) Countries.Add(c);
});
}
catch (OperationCanceledException)
{
// expected on cancellation - ignore
}
catch (Exception ex)
{
// Adjust logging/error handling to your project's policy
System.Diagnostics.Debug.WriteLine($"LoadCountriesAsync error: {ex}");
}
finally
{
IsLoading = false;
}
}
#region INotifyPropertyChanged
public event PropertyChangedEventHandler PropertyChanged;
protected bool SetProperty<T>(ref T storage, T value, [CallerMemberName] string propertyName = null)
{
if (Equals(storage, value)) return false;
storage = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
return true;
}
#endregion
} Don't forget to update lists on the UI thread to avoid threading issues. P.s. Code was generated by GitHub Copilot
... View more
yesterday
|
0
|
0
|
35
|
|
POST
|
Have you updated _observerPosition and etc. which is related to spatial reference?
... View more
Thursday
|
0
|
1
|
115
|
|
POST
|
Hi, Try to change Map spatial reference to WGS84 // Create a map
MyMapView.Map = new Map(SpatialReferences.Wgs84)
{
// Set initial view point in WGS84
//InitialViewpoint = new Viewpoint(55.610000, -5.200346, 100000)
};
... View more
Thursday
|
0
|
3
|
128
|
|
POST
|
I make search in *.daml files in ArcGIS Pro application bin folder
... View more
2 weeks ago
|
0
|
0
|
126
|
|
POST
|
Hi, There is possibility to add custom page to layer properties. I have used BackStage_PropertyPage sample from ArcGIS Pro SDK Community samples to make test. I have copied existing "updateSheet" piece in config.daml, pasted below, changed refid to "esri_mapping_featureLayerPropertySheet" and deleted "group" setting inside page info: <updateSheet refID="esri_mapping_featureLayerPropertySheet">
<!--Use group=Application for the options to appear under the Application section in the settings-->
<!--assign the viewModel class to the className attribute; assign the view class to the className attribute in the content tag-->
<insertPage id="esri_sdk_PropertyPageAppSettings" caption="Sample App Settings" className="ApplicationSettingsViewModel">
<content className="ApplicationSettingsView" />
</insertPage>
<!--Use group=Project for the options to appear under the Project section in the settings-->
<!--assign the viewModel class to the className attribute; assign the view class to the className attribute in the content tag-->
<insertPage id="esri_sdk_PropertyPageProjectSettings" caption="Sample Project Settings" className="ProjectSettingsViewModel">
<content className="ProjectSettingsView" />
</insertPage>
</updateSheet> I have got result for feature layer properties like in picture:
... View more
2 weeks ago
|
2
|
3
|
186
|
|
POST
|
Hi, TableControl SortAsync method doesn't need QueuedTask.Run. Checking of CanCustomSort has different meaning. It means if the table control can display the custom sort dialog. You need to check IsReady I have attached TableControl in dockpane add-in project. After compilation open ArcGIS Pro. Go to AddIns tab. Select "Show TableControlDockpane" button. Go to catalog pane and select feature class or table. Press Sort button in opened dockpane with TableControl
... View more
03-23-2026
11:44 AM
|
1
|
0
|
355
|
|
POST
|
Hi, The last ArcGIS Maps SDK for .NET API reference suggests for ArcGISFeatureTable: UnknownJson Gets unknown data from the source JSON. Declaration [Obsolete("To get any unrecognized JSON values, parse the result of Map.ToJson()")]
public IReadOnlyDictionary<string, object> UnknownJson { get; } Check the text after "Obsolete" PortalItem has UnsupportedJson / UnknownJson properties.
... View more
03-06-2026
03:20 AM
|
0
|
2
|
445
|
|
POST
|
Hi, Your geoprocessing tool name is invalid. Remove extra '_'. Like "MakeTableView_management"
... View more
02-27-2026
10:33 AM
|
1
|
1
|
394
|
|
POST
|
Hi, Take a look at the ProSnippets code. Call the snippet function to get the value from field.
... View more
02-25-2026
10:43 PM
|
0
|
0
|
268
|
|
POST
|
Hi, It would be nice to see piece of your code. How do you use CreateRow? Are you using editOperation.Callback as in sample here? Are you calling context invalidate for feature: context.Invalidate(feature);
... View more
02-23-2026
12:01 PM
|
0
|
1
|
389
|
|
POST
|
I saw another thread with your comment about one second for animation. I could say that car already passed crossroad, but current location symbol is about 5-10 meters before crossroad on speed 50 km/h. Driver will always miss required crossroad to change direction if look to map. Current location symbol moves like a frog trying to catch real car position: gap, no gap, gap and so on. On asynchronous LocationChanged event we make redrawing of rest route, checking of speed limit, rerouting needs and etc. I would like to see at first moved current location symbol then get LocationChanged event (like WYSIWYG). To see real car position is more important thing than others.
... View more
02-23-2026
11:52 AM
|
0
|
0
|
318
|
|
POST
|
Hi, We are trying to implement navigation in our application (Runtime 200.8.1). We have noticed that current location symbol significantly behind the position from LocationChanged event. Position from LocationChanged event shows real situation where is car at the moment (red dot). The indigo line shows the rest of the route. This prevents the driver from making the right decisions.
... View more
02-23-2026
12:35 AM
|
0
|
2
|
355
|
|
POST
|
Hi, When you trying to publish web tool code, ArcGIS makes revision of your code and makes some changes in it. The mangling happens because ArcGIS is trying to do some kind of validation of "path-like strings" against what data sources are registered on ArcGIS Server. Check for differences with your original code. It is recommended all paths make as parameters for tool. Then you can setup these parameters as constants and don't need to specify each time you run tool.
... View more
02-20-2026
04:58 AM
|
0
|
2
|
669
|
|
POST
|
"An ArcGIS Pro configuration is similar to add-ins but offers additional ways to extend the application. It can help you design a version of ArcGIS Pro that more closely reflects your organization’s brand and workflows." You don't need to do anything extra. Registration of configuration must register all your tools. I have added links regarding configuration to ProConcepts and ProGuide which contains step by step instructions for creating configuration with custom tabs, groups and buttons inside.
... View more
02-15-2026
10:16 AM
|
0
|
0
|
307
|
|
POST
|
Hi, Configurations provide add-in capabilities: https://www.esri.com/arcgis-blog/products/3d-gis/3d-gis/introducing-arcgis-pro-sdk-configurations Configurations provide: Solution branding of the Pro UI – you can create a highly customized UI and start-up user experience for Pro, with a custom splash screen, start up page, application icon, and more Conditional / role-based customization – allows you to build logic into the Pro start-up experience and tailor the Pro UI ribbon based on conditions, logins, etc. Add-in capabilities – configurations provide all of the standard customization capabilities of add-ins Control over add-ins – you can choose how and which add-ins are loaded in Pro
... View more
02-14-2026
12:14 PM
|
0
|
1
|
316
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 2 weeks ago | |
| 1 | 03-23-2026 11:44 AM | |
| 1 | 05-22-2024 11:48 PM | |
| 1 | 02-27-2026 10:33 AM | |
| 1 | 01-07-2026 10:44 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|