|
POST
|
Hi Vidmas, Esri uses default combobox style in ArcGIS Pro. https://github.com/Esri/arcgis-pro-sdk/wiki/proguide-style-guide#combo-boxCombo Box Default Style: Yes ArcGIS Pro provides default styling for text content of a Combo box control, including mouse over behavior and selection highlight. If needed, style the individual properties such as Background/Foreground by using Esri brushes. <ComboBox Background="{DynamicResource Esri_BackgroundPressedBrush}" Foreground="{DynamicResource Esri_TextMenuBrush}"> <ComboBoxItem >Item1</ComboBoxItem> <ComboBoxItem >Item2</ComboBoxItem> <ComboBoxItem >Item3</ComboBoxItem> </ComboBox> So one of the ways is to set comboboxitem template (add additional Setter from my code to your combobox style) : <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ComboBoxItem}"> <TextBlock Text="{Binding Name}" Style="{DynamicResource Esri_TextBlockRegular}" /> </ControlTemplate> </Setter.Value> </Setter> P.s. Your buttons at the bottom of window (Reset, Cancel, Ok) needs Esri style too to look like in others ArcGIS Pro windows (Style="{DynamicResource Esri_SimpleButton}")
... View more
05-24-2020
10:53 PM
|
2
|
4
|
10360
|
|
POST
|
Hi Helen, The answer depends on your ExcelData property. If your ExcelData property is type of List<string>, then string strAllAccount = string.Join("', '", ExcelData.ToArray());
... View more
05-19-2020
10:19 PM
|
0
|
3
|
2318
|
|
POST
|
Hi Rob, CodeBase property is not suitable for your case. To get the absolute path to the loaded manifest-containing file, use the Assembly.Location property instead. var dllPath = System.Reflection.Assembly.GetExecutingAssembly().Location; Then take directory name from Location and do not use Install folder: var layerFile = System.IO.Path.Combine(Path.GetDirectoryName(dllPath), @"LayersFiles\KILOMETERRIBBON.lyrx"); In Visual Studio project remember to mark your lyrx as Copy to local = true
... View more
05-13-2020
10:28 PM
|
1
|
1
|
1643
|
|
POST
|
You need to use ObservableCollection for datagrid binding and object of your collection must implement INotifyPropertyChanged. I implement IEditableObject too. Then you create new item you must to fill StringValues and ComboValue properties too depending on your layer object.
... View more
05-11-2020
03:30 AM
|
0
|
0
|
2090
|
|
POST
|
Hi Mody, You need to use different templates in xaml for each combobox column. The xaml source of my previous picture is very difficult . It uses triggers and etc.. I have tried to simplify xaml but I am not really sure about bindings validity. <DataGrid Style="{DynamicResource Esri_DataGrid}" HeadersVisibility="Column" IsReadOnly="False" ItemsSource="{Binding AvailableParameters, Mode=TwoWay}" SelectedIndex="{Binding SelectedParameterIndex}" SelectionUnit="FullRow" ScrollViewer.CanContentScroll="True" VerticalScrollBarVisibility="Auto"> <DataGrid.Columns> <DataGridTextColumn Header="Name" Binding="{Binding Name, Mode=OneWay}" IsReadOnly="True" Width="1*"/> <DataGridComboBoxColumn Header="Value" ItemsSource="{Binding DataContext.StringValues, RelativeSource={RelativeSource FindAncestor, AncestorType=DataGrid}}" SelectedItemBinding="{Binding DataContext.ComboValue, RelativeSource={RelativeSource FindAncestor, AncestorType=DataGrid}, Mode=TwoWay}" Width="1*"> </DataGridComboBoxColumn> <DataGridComboBoxColumn Header="Value2" ItemsSource="{Binding DataContext.StringValues2, RelativeSource={RelativeSource FindAncestor, AncestorType=DataGrid}}" SelectedItemBinding="{Binding DataContext.ComboValue2, RelativeSource={RelativeSource FindAncestor, AncestorType=DataGrid}, Mode=TwoWay}" Width="1*"> </DataGridComboBoxColumn> </DataGrid.Columns> </DataGrid> Your binding list object class must have properties StringValues and ComboValue which return some data depending on your layer type. If you need two combox columns then you need to add additional properties StringValues2 and ComboValue2 for next column. Another way is binding to window datacontext: https://gallery.technet.microsoft.com/scriptcenter/WPF-DatagridComboBoxColumn-03c5ea2e Both ways are a little bit tricky, but you can find more info on internet.
... View more
05-11-2020
02:22 AM
|
0
|
0
|
2090
|
|
POST
|
Hi Abel, SaveItemDialog is GUI element so you should not use QueuedTask with SaveItemDialog. You need to end QueuedTask before calling SaveItemDialog and start new QueuedTask after SaveItemDialog return (if you need). All methods that needs QueuedTask are marked by Intellisense as "This method must be called on MCT....".
... View more
05-07-2020
11:20 PM
|
1
|
1
|
1607
|
|
POST
|
I have attached bundle of ProjectSettingsView mvvm code of BackStage_PropertyPage sample from Esri ArcGIS Pro samples. It works
... View more
05-07-2020
10:58 PM
|
1
|
2
|
5623
|
|
POST
|
Hi Abel, You need to implement IDataErrorInfo to your viewmodel internal class ProjectSettingsViewModel : Page, IDataErrorInfo. More info here: https://codeblitz.wordpress.com/2009/05/08/wpf-validation-made-easy-with-idataerrorinfo/ You just need to modify content of public string this[string columnName] to store each control state and set base.IsValid value.
... View more
05-06-2020
10:47 PM
|
0
|
4
|
4132
|
|
POST
|
You can disable OK button by setting Page IsValid property, like this: base.IsValid = false;
... View more
05-06-2020
07:32 AM
|
1
|
9
|
4132
|
|
POST
|
Hi Mody, I would use DataGrid in your case. I have similar situation with my workspace properties. Each property has simple value or value you can choose from combobox. Each combobox has different sets of available values. What you need is a list of custom objects with layer and other properties inside. Other things will do bindings. You can use DataGridComboBoxColumn for columns for comboboxes or make your own template for column. My implementation of DataGrid:
... View more
05-06-2020
03:06 AM
|
0
|
2
|
2090
|
|
POST
|
Hi Abel, This is the WPF stuff. Look here: https://docs.microsoft.com/en-us/dotnet/framework/wpf/data/how-to-implement-binding-validation
... View more
05-06-2020
02:41 AM
|
1
|
11
|
4132
|
|
POST
|
Hi Daniel, As I see from your picture you have one line feature selected. Try select or unselect all features. Geoprocessing window checks for selection of inputs.
... View more
05-04-2020
11:15 PM
|
1
|
1
|
3203
|
|
POST
|
Hi Abel, To check feature class path for existing is very simple: Item currentItem = ItemFactory.Instance.Create(featureClassPath, ItemFactory.ItemType.PathItem); if (!LayerFactory.Instance.CanCreateLayerFrom(currentItem)) { // Invalid path } To determine if the feature class is a shapefile or a feature class in a geodb you need to check WorkspaceFactory value from CIMStandardDataConnection class or from layer: https://community.esri.com/message/920599-best-way-to-determine-the-full-path-of-a-featurelayer-if-it-is-a-shapefile To check spatial reference you need to try create it. Which method use to create you must decide yourself. https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-Geometry
... View more
04-27-2020
01:07 AM
|
0
|
2
|
2196
|
|
POST
|
Hi Nobir, I am back to my suggestion. My application needs HillShade geoprocessing tool. Situation the same as with EucDistance tool. out_raster = arcpy.sa.HillShade("dsm", 315, 45, "SHADOWS", 1); Output raster parameter in second place for .Net API. How to find it? I have spent half a day. Empty error messages. After some time I found old good ArcGIS 9.3 page: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Hillshade and one line in the scope of page: # Process: Hillshade gp.Hillshade_sa(InRaster, OutRaster, InAzimuth, InAltitude) Another one note. When I execute from .Net Add-in geoprocessing tool with GPExecuteToolFlags.AddToHistory flag, if tool finishes successfully it adds it to history, otherwise -no. When you execute tool from ArcGIS Pro Geoprocessing pane it adds to history always. It would be useful to have the same functionality and from ArcGIS Pro API.
... View more
04-23-2020
11:29 PM
|
0
|
0
|
4520
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 weeks ago | |
| 1 | 3 weeks 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 |
2 weeks ago
|