BasemapGallery control cannot start with Visibility.Collapsed

352
5
01-12-2023 12:59 PM
noodle
by
New Contributor III

Attached is the smallest WPF application using BasemapGallery to change the Basemap.   Currently MainWindow.xaml.cs has "bool show=true;" which causes Visibility.Visible for BasemapGallery in ctor.   Everything works.  When you change show=false, then BasemapGallery.Visibility = Visibility.Collapsed.   If you run the app and Click BasemapGallery Button, then it goes into ProgressBar and never shows the small Basemap list, even though Debug.WriteLine says that AvailableBaseMaps count is 27.   Because the basemaps have been loaded, the progress bar should stop and show the list.   Is there any way to do this?   Thank you.

0 Kudos
5 Replies
PreetiMaske
Esri Contributor

Thanks for reporting the issue. We have identified this as a bug only with WPF .NET Framework apps built with ArcGIS Maps SDK for .NET. We have logged this bug in our system and it will be fixed in next release cycle.

In the meantime we suggest creating  ArcGIS Maps SDK for .NET - WPF .NET6 app.

0 Kudos
noodle
by
New Contributor III

I was able to find a fix (four line mod) (worked for both NetFramework and Net6) using GitSource.   Am I allowed to send in the fix on GitSource?  

If you have a fix for Framework, please let me know.   Our app is currently NetFramework and we need the fix.   I can build GitResource so that we can use the compiled dll from GitResource until the formal release.

0 Kudos
PreetiMaske
Esri Contributor

Sorry I didn't catch that :-), are you saying you have a fix for BasemapGallery control for .NetFramework and want to send the fix for a review? If you like your fix to be reviewed you are more than welcome to raise a PR in toolkit repo and we can assess the fix at that time.

0 Kudos
noodle
by
New Contributor III

I just did a pull request for BasemapGallery.Appearance.cs

https://github.com/soba-noodle/arcgis-maps-sdk-dotnet-toolkit/pull/1

Thanks.

0 Kudos
noodle
by
New Contributor III

I made a mistake.  It is now created correctly.

https://github.com/Esri/arcgis-maps-sdk-dotnet-toolkit/pull/486