|
POST
|
Wow - just as simple as that! Good to know about the stackpanel limitations though. Thanks for helping!
... View more
10-28-2024
09:36 AM
|
0
|
0
|
874
|
|
POST
|
Hi, Sorry for the delay - I was just finishing off some work and I have created a visual studio project with an add-in only showing 2 tabcontrols on a dockpane which shows the issue I originally raised. This should help you troubleshoot much more easily the problem I was having. I look forward to hearing your findings.
... View more
10-28-2024
05:14 AM
|
0
|
1
|
879
|
|
POST
|
Hi. I have followed some ESRI sample code for putting tabs on a dockpane. See this: https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#tabindicator It works well - however if I want to make a button stick to the bottom (with a margin round it) and kind of have it separate itself away from all other controls on the dockpane - I find it almost impossible to figure out because you have to use a ContentPresenter - a kind of template dockpane and I think all the height sizing parameters go haywire! Whats doubly annoying is that at design time - it looks fine but when you look at the actual control at run time it does not behave - can anyone suggest the correct XAML as I have lost hours on this and I can't waste anymore development time on this - see the screen shots: Design Time: Runtime:
... View more
10-23-2024
09:40 AM
|
0
|
4
|
957
|
|
POST
|
This appears to be the issue - so I have installed version 8.0. Nuget packages of what it thought was missing - however it needed version 6.0 - as the Module window (can only be seen when debugging) shows that version 6.0.x seems to be the versions of dlls Pro is using under the hood. Uma, do you think its worth ESRI updating the migration docs with this in mind - as I'm sure I won't be the only one who is loading up the wrong version Nuget packages here?
... View more
08-16-2024
08:51 AM
|
0
|
0
|
2259
|
|
POST
|
Hi Uma, Yes I have used the Nuget Package Manager to install System.Drawing.Common. Indeed I made a brand new add-in project and included this package into it. Still the same issue - I'm starting to believe there is some incompatibility going on here. At the moment, as of writing this - I am trying to achieve everything I can with core. Small update - I think I was missing the Windows Compatibility Pack - I have installed this as directed from the ESRI help you provided a link for. Sadly this has introduced new errors into my add-in that is causing similar error messages, but this time for: System.Configuration.ConfigurationManager 8.0.0. So I installed the version it wanted from Nuget and it STILL says it can't find it. Further update - it seems you cannot use the old fashioned Properties file in .net6 projects - so this code is obsolete now as far as I can tell: Properties.Settings.Default.CurrentGroupId = null; Properties.Settings.Default.Save(); I'm getting so frustrated with this - it's almost impossible to fix my add-in and I need to get this fixed in the next week as it's due for delivery to clients. So stressful - if you can help that would be great.
... View more
08-08-2024
01:28 AM
|
0
|
2
|
2350
|
|
POST
|
Hi, From my add-in I have always had this code that could save a graph (Bitmap) from a WPF form to a png file. Now I have moved my codebase to a 3.0.36057, now any code that has anything to with System.Drawing throws an exception, saying that the dll for System.Drawing is missing. It's not its there - it compiles and everything is fine - just like it was for earlier versions of my add-in. So, I believe this dll is not thread-safe so I tried to implement the code: FrameworkApplication.Current.Dispatcher.Invoke(() =>
{
Bitmap myBitmap = null;
}); I can't get it to work at all. Can any help me out to understand how I can get this to run. I've spent 2 days on this now and I'm getting pretty frustrated. and the exception is thrown: "Could not load file or assembly 'System.Drawing.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.":"System.Drawing.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"
... View more
08-07-2024
09:39 AM
|
0
|
4
|
2397
|
|
POST
|
Hi, What event should I subscribe to if I want to catch when someone is renaming a Map title in the TOC? I've tried listening to ActivePaneChangedEvent and ActiveMapViewChangedEvent, but it doesnt trigger on renaming a Map. If anyone can help, it would be much appreciated.
... View more
06-19-2024
05:50 AM
|
0
|
1
|
705
|
|
POST
|
It would be good if folks at ESRI could detail and document this control. It is also a bit clunky and has issues with visibility when closes the label down.
... View more
03-05-2024
02:18 AM
|
0
|
0
|
469
|
|
POST
|
Hi I have a recursive function that goes through a nested hierarchy of layers and loads them into a map. When the code hits line 3 - it can take a long time for the layer to be actually created in the map (bearing in mind this is coming over the wire from ArcGIS Online storage). Is there a quicker way to load layers? I was thinking of trying to do something with a Task.WaitAll() kind of approach but I'm not sure that's going to work if its recursive and also I think it will mess up index order for layers that need to go in a certain order in a group node. l if (LayerFactory.Instance.CanCreateLayerFrom(currentItem))
{
FeatureLayer featureLayer = LayerFactory.Instance.CreateLayer<FeatureLayer>
(layerParam, groupLayer);
} asdf
... View more
01-24-2024
12:56 PM
|
0
|
0
|
620
|
|
POST
|
Hi, I want to put an autocomplete combobox in a dock pane that will be sensitive to dark and light themes in Pro. Does anyone know of a good third party control or how to do it by hand using standard windows WPF controls? Thanks in advance.
... View more
12-21-2023
04:02 AM
|
1
|
0
|
705
|
|
POST
|
So ESRI's implementation does not follow standard Windows behaviour? I really don't like it. The fact that you have to remember to type in the file extension. However, there is nothing I can do about it. I wish ESRI would change this to be more standard behaviour that we are used to.
... View more
12-19-2023
01:36 AM
|
2
|
0
|
809
|
|
POST
|
I have used the SaveItemDialog with 2 filters. Whenever I type a name for the file I want to save it never puts the appropriate suffix for the file type I want to save as. I cannot seem to find anything in the instance of the SaveItemDialog to see what the current filter selected is as there is nothing showing a property to this effect. Can someone help me understand how I can get the right file suffix on save? var jsonFilter = BrowseProjectFilter.GetFilter("esri_browseDialogFilters_json_file");
var csvFilter = BrowseProjectFilter.GetFilter("esri_browseDialogFilters_browseFiles");
csvFilter.FileExtension = "csv";
csvFilter.Name = "CSV files (*.csv)|*.csv";
csvFilter.BrowsingFilesMode = true;
BrowseProjectFilter compositeFilter = new BrowseProjectFilter();
compositeFilter.AddFilter(jsonFilter);
compositeFilter.AddFilter(csvFilter);
SaveItemDialog saveDialog = new SaveItemDialog()
{
Title = "Save",
BrowseFilter = compositeFilter,
OverwritePrompt = true
};
bool? result = saveDialog.ShowDialog();
if (result == true)
{
//Get the selected file path
string filePath = saveDialog.FilePath;
//File path is always missing file suffix which is specified in the filter
}
... View more
12-18-2023
10:11 AM
|
1
|
2
|
923
|
|
POST
|
A bit disappointing that this question hasn't been addressed. There are a few things unclear about the SaveItemDialog() in the documentation - too much emphasis on the OpenItemDialog(). At the moment I am finding that I can't use a file filter of more than one type and have it honoured. The dialog just removes any suffix. So any help in regards to this would be useful (similar problem to the one initially outlined): var dlg = new SaveItemDialog();
dlg.Title = "Save File";
dlg.OverwritePrompt = true;
// Create file filters for JSON and CSV
var jsonFilter = BrowseProjectFilter.GetFilter("esri_browseDialogFilters_browseFiles");
jsonFilter.FileExtension = "json";
jsonFilter.Name = "(*.json)";
var csvFilter = BrowseProjectFilter.GetFilter("esri_browseDialogFilters_browseFiles");
csvFilter.FileExtension = "csv";
csvFilter.Name = "(*.csv)";
BrowseProjectFilter compositeFilter = new BrowseProjectFilter();
compositeFilter.AddFilter(jsonFilter);
compositeFilter.AddFilter(csvFilter);
dlg.BrowseFilter = compositeFilter;
bool? result = dlg.ShowDialog();
if (result == true)
{
//!!!!! filePath has its file suffix missing!
string filePath = dlg.FilePath;
}
... View more
12-18-2023
08:07 AM
|
0
|
0
|
790
|
|
POST
|
Hi, I have a pro window that is modal - it lists the maps in the project. You select a map and press ok. Meanwhile there is QueuedTask that opens up the map, this can take some time so I use a progress dialog just so the user knows Pro is doing things. However if I don't put a message box after it has opened the map, code execution continues and won't allow the user to select a file to save the json and just says "JSON file not saved". I want to get rid of this! This is really strange because the save file dialog is modal but its almost like the computer has automatically cancelled the dialog and continued execution on it's own accord. I though execution had to halt on a modal dialog. If anyone can help me get rid of the unnecessary message box that would be great. Also an explanation to what stupid thing I'm doing wrong would be great. I have tried many things but I can't seem to solve it. The code below should be able to be copy pasted behind a ribbon button in pro. However you may need some rudimentary XAML for the pro window. Just an ok button would do I guess. protected async override void OnClick()
{
var proWindowModal = new MapPaneChooserWindow
{
DataContext = new MapPaneChooserWindowVM(),
Owner = FrameworkApplication.Current.MainWindow
};
var dialogResult = proWindowModal.ShowDialog();
if (dialogResult == true)
{
ProgressorSource ps = new ProgressorSource("Opening map...");
//This can take some time - so we use a progress dialog.
chosenMap = await QueuedTask.Run(() =>
{
return Module1.MapPaneChooserWindowVM.SelectedMap.GetMap();
}, ps.Progressor);
//!!!! Forced to put a message box here or it will run automatically to "Layer collection not saved" section below !!!!
//If you take this message box out of hte code - you will see the effect
MessageBox.Show("Finished opening map.", "Map", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Information);
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = "JSON files (*.json)|*.json";
saveFileDialog.Title = "Save JSON File";
var result = saveFileDialog.ShowDialog();
if (result == true)
{
//do stuff about saving a json file here...
}
else
{
MessageBox.Show("JSON file not saved", "Save JSON file", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Information);
}
}
}
... View more
12-12-2023
03:32 AM
|
0
|
1
|
1107
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 12-18-2023 10:11 AM | |
| 1 | 08-22-2025 02:27 AM | |
| 2 | 12-19-2023 01:36 AM | |
| 1 | 12-21-2023 04:02 AM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|