|
POST
|
Hi, It is long discussion about about MVVM, pure MVVM and etc, You can find more information on web. In pure MVVM xxx..xaml.cs should contain only code for setting a page's data context. Dockpane.xaml and Dockpane.xaml.cs both comprise View in MVVM? To simplify things I could say "Yes" If I need to do any changes on the observable collection, I should do it in DockpaneViewModel.cs, right? Yes. Your observable collection must contain items which implement INotifyPropertyChanged. To get selection you need to bind SelectItem to view model property and etc. As I said in previous reply all what you need to do is edit Dockpane.xaml using designer and code in DockpaneViewModel.cs . Remember about Dockpane.xaml.cs only when you want to rename your classes. More info on youtube ArcGIS Pro SDK for .NET: UI Design and MVVM: https://www.youtube.com/watch?v=5PgaeZycWXc
... View more
12-02-2020
07:24 AM
|
0
|
4
|
7739
|
|
POST
|
Hi, In MVVM you do not need to access xaml controls from View class (.xaml.cs) except some special cases. To do that you need to assign name to control in xaml with "x:Name". I would recommend to open one of Esri samples from github with Dockpane and study with debugger how it works. https://github.com/Esri/arcgis-pro-sdk-community-samples/blob/master/Framework/DockpaneSimple https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/DockPaneBookmarkAdvanced More about dockpanes: https://github.com/esri/arcgis-pro-sdk/wiki/ProGuide-Dockpanes
... View more
12-01-2020
11:06 AM
|
1
|
6
|
7753
|
|
POST
|
Hi Derek, If your lyr/ lyrx file contains path to your file gdb feature class then you need just to add lyr/lyrx file to map, otherwise you need to change your existing code like this: await QueuedTask.Run(() => { // add lyr/lyrx to map var featureLayer = (FeatureLayer)LayerFactory.Instance.CreateLayer(new Uri(lyrFilePath), MapView.Active.Map, 0, "Counties"); CIMDataConnection currentDataConnection = featureLayer.GetDataConnection(); CIMStandardDataConnection updatedDataConnection = null; WorkspaceFactory wf = WorkspaceFactory.FileGDB; var dbGdbConnection = new FileGeodatabaseConnectionPath(new Uri(@"U:\environmental\envgist.gdb"), UriKind.Absolute)); // provide a replace data connection method updatedDataConnection = new CIMStandardDataConnection() { WorkspaceConnectionString = new Geodatabase(dbGdbConnection).GetConnectionString(), WorkspaceFactory = wf, Dataset = "counties", DatasetType = esriDatasetType.esriDTFeatureClass }; featureLayer.SetDataConnection(updatedDataConnection); featureLayer.ClearDisplayCache(); });
... View more
11-17-2020
10:12 PM
|
0
|
1
|
2141
|
|
POST
|
Hi, You can use geoprocessing function ApplySymbologyFromLayer_management. More info about some details and code you can found here: https://community.esri.com/t5/arcgis-pro-sdk-questions/applysymbologyfromlayer-geoprocessing-tool/m-p/778081#M966 https://community.esri.com/t5/arcgis-pro-sdk-questions/building-proper-syntax-for-importing-lyr-symbology-for-feature/m-p/817600#M2662 Another way is to create layer from lyrx file and change data connection (CIMDataConnection) to you featureclass source. You can find in Esri Pro samples.
... View more
11-16-2020
11:47 PM
|
0
|
3
|
2153
|
|
POST
|
Hi, You can create new Dockpane from Visual Studio ArcGIS templates and you will see how Dockpane headers are binded. Main header is specified in config.daml file as 'caption' value: <dockPane id="MyDockpaneID" caption="My Dockpane". Second one header binding property will be created in dockpane mvvm file: /// <summary> /// Text shown near the top of the DockPane. /// </summary> private string _heading = "MyFavoritTab"; public string Heading { get { return _heading; } set { SetProperty(ref _heading, value, () => Heading); } } In xaml: <DockPanel Grid.Row="0" LastChildFill="true" KeyboardNavigation.TabNavigation="Local" Height="30"> <TextBlock Grid.Column="1" Text="{Binding Heading}" Style="{DynamicResource Esri_TextBlockDockPaneHeader}">
... View more
11-13-2020
12:52 AM
|
0
|
9
|
7814
|
|
POST
|
Hi, I have asked similar question here: https://community.esri.com/t5/arcgis-pro-sdk-questions/when-will-net-developers-get-api-reference-for-all-geoprocessing/m-p/860250#M4707 The right name of your call must be 'ZonalStatisticsAsTable_sa', so they just fixed "bug"
... View more
11-13-2020
12:40 AM
|
0
|
0
|
1028
|
|
POST
|
Hi Michael, I use the same Add-ins button to open or close dockpane. To close dockpane just call Hide();
... View more
11-05-2020
10:11 PM
|
0
|
0
|
1667
|
|
POST
|
Hi Than, Have you taken a look at Esri Content\ExcelDropHandler sample? It has method : private static async Task ModifyLayerSymbologyFromLyrFileAsync(FeatureLayer featureLayer, string layerFile) It applies lyrx to featurelayer, but it is possible to create layer from lyrx ant then update CIMDataConnection. If you still interested ask me and I will describe second process more detailed.
... View more
11-03-2020
04:34 AM
|
0
|
0
|
1278
|
|
POST
|
Hi Derek, Intellisense wrotes what elements of splitbutton can be button, gallery, or customcontrol. So your next level item must be customcontrol which acts as splitbutton. It would be nice if Esri would implemented possibility to add splitbutton to splitbutton. Maybe it is enough for Esri to expose existing their solution (you found) to public But you can search internet for free or commercial wpf splitbutton and add it inside your customcontrol.
... View more
10-30-2020
02:50 AM
|
0
|
0
|
6630
|
|
POST
|
Hi Derek, I thought that we can add spiltbutton to another splitbutton. But it impossible now. I have made test. So better solution would be customControl where inside you have wpf tree or bunch of expanders with styled lists of buttons. Then you can manage them on fly depending on your situation. This is more advanced way which requires more WPF knowledge. Custom control sample you can find: arcgis-pro-sdk-community-samples-master\Framework\RibbonControls It is not what you exactly need but you can find how to add custom control to ribbon and how it works with mvvm.
... View more
10-29-2020
12:26 AM
|
1
|
6
|
6630
|
|
POST
|
Hi Derek, If your structure is always the same you can define it in config.daml splitbuttons section. More info here: ProGuide Palettes and Split Buttons · Esri/arcgis-pro-sdk Wiki · GitHub
... View more
10-27-2020
11:53 PM
|
3
|
10
|
6630
|
|
POST
|
Hi Mody, You can disable all dockpane controls by binding root grid IsEnabled to to your view model property. Or you can put all your buttons to grid, stackpanel, toolbar, group or etc. and do the same as with all dockpane
... View more
10-12-2020
05:04 AM
|
0
|
0
|
1879
|
|
POST
|
Hi Alan, "CoreHost applications don't have access to any of the ArcGIS.Desktop libraries. Project belongs to ArcGIS.Desktop.Core." https://community.esri.com/thread/229393-arcgisdesktopcoregeoprocessing-in-standalone-arcgis-pro-sdk-app
... View more
10-08-2020
10:05 AM
|
0
|
1
|
4051
|
|
POST
|
Hi Alan, Have you read this: https://community.esri.com/thread/225771-corehost-licensing-queuedworkerrun-vs-queuedtaskrun "note: ArcGIS.Desktop.Framework.dll is not supported for use in CoreHost so QueuedTask's use in CoreHost is actually moot"
... View more
10-07-2020
10:28 PM
|
0
|
3
|
4051
|
|
POST
|
Hi Douglas, The same situation is with Euclidean distance geoprocessing tool. Look at this how I do in that case: https://community.esri.com/thread/245178-when-will-net-developers-get-api-reference-for-all-geoprocessing-functions
... View more
10-02-2020
12:08 AM
|
0
|
0
|
1326
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 4 weeks ago | |
| 1 | a month ago | |
| 1 | 06-30-2026 10:14 PM | |
| 1 | 06-30-2026 01:43 PM | |
| 2 | 04-24-2026 08:33 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|