|
POST
|
I added a select/unselect button on the context menu of a table control. I am trying to use TableControlCommands.ToggleRowSelection property but it keeps ignore the active row and select/unselect the first row of the table. Do you have any idea what the reason is for this issue? Reference to TableControlCommands.ToggleRowSelection https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic22318.html <controls:ProWindow.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<extensions:DesignOnlyResourceDictionary Source="pack://application:,,,/ArcGIS.Desktop.Framework;component\Themes\Default.xaml"/>
</ResourceDictionary.MergedDictionaries>
<ContextMenu x:Key="MyRowContextMenu">
<MenuItem Header="Select/Unselect"
Command="editing:TableControlCommands.ToggleRowSelection">
<MenuItem.Icon>
<Image Source="{StaticResource TableSelectUnselect16}" Width="16" Height="16" RenderOptions.BitmapScalingMode="HighQuality"/>
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</ResourceDictionary> <editing:TableControl AutomationProperties.AutomationId="_tableControl" x:Name="tableControl"
Grid.Row="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
TableContent="{Binding Path=TableContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
RowContextMenu="{StaticResource MyRowContextMenu}"
SelectedRowContextMenu="{StaticResource MyRowContextMenu}"
>
</editing:TableControl> Amazingly, it works fine on the Selected Record view mode. Another issue exists when making extended selection with Shift+Click. Shift+Click is supposed to select every rows between two highlighted rows. However, it disregards highlighted rows and make the selection from 1st record to last highlighted row. Lets say you want to select rows between oid number 6-10. If you try to select these with Shift+Click, it selects everything up to oid row 10. I hope it makes sense. I think it is somehow related to ActiveRowIndex as it stays 1 all the time var oid = _tableControl.GetObjectIdAsync(_tableControl.ActiveRowIndex).Result;
MessageBox.Show(oid.ToString()); I don't know this is a bug or my comp got messed up. Please someone try this and let me know. Maybe also good time to show some misspellings I have found before
... View more
07-24-2021
09:31 AM
|
0
|
2
|
1623
|
|
POST
|
This is exactly what I am looking for, kudos to @BarbaraSchneider2
... View more
07-23-2021
02:29 PM
|
1
|
0
|
4196
|
|
POST
|
Hi @KirkKuykendall1 and @GKmieliauskas , I think I will need to use both of the solutions you guys offered. I will come back with results. Thanks for the answers.
... View more
03-02-2021
08:46 AM
|
0
|
1
|
1482
|
|
POST
|
I have developed a set of add-ins. Our organization has different branches and divisions. I would like to share the add-ins with a group of people and some individuals maybe. Is there way to insert some kind of password for each user so they will enter the password to use the add-in
... View more
03-02-2021
06:03 AM
|
0
|
12
|
4012
|
|
POST
|
That is how Windows Explorer shows the files in Details mode. I have updated the picture.
... View more
02-16-2021
02:18 PM
|
0
|
0
|
2808
|
|
POST
|
Hi @DanPatterson , Yes, it is a jpg file. I did not get the screenshot wide enough.
... View more
02-16-2021
01:06 PM
|
0
|
3
|
2827
|
|
POST
|
I am developing a module which pulls aerial images into TOC. I don't have any problem with .tif files but .jpgs. Here is an example of .jpg image file set I am able to get the image on the map and TOC but then AGP begins hanging forever. I tried it manually I had the same result. I can open the same file in ArcMap without a problem.
... View more
02-16-2021
12:35 PM
|
0
|
6
|
2875
|
|
POST
|
@DavidPike mentions . I think something is wrong with your domain. Check what is going on with your domain on that field or remove the domain from the field and try your code again.
... View more
02-14-2021
06:19 AM
|
1
|
1
|
7667
|
|
POST
|
It is an old post but maybe it would help someone. You might need to insert the last line in another QueuedTask await QueuedTask.Run(() =>
{
//1st get the current envelope, so you can go back to it later after calc
Envelope currentExtent = MapView.Active.Extent;
currentExtGeometry = currentExtent.Clone();
// Get your scale for the envelope
view.ZoomTo(envelope);
Debug.WriteLine("Scale: " + view.Camera.Scale);
//Goback to previous extent
MapView.Active.ZoomTo(currentExtGeometry);
});
... View more
02-11-2021
02:07 PM
|
0
|
0
|
1555
|
|
POST
|
@CharlesMacleod Great resources! I use multiple layers some of them pointing to shapefiles some of them pointing to feature classes. I will see what I can do. Thanks for your answer.
... View more
02-10-2021
07:34 PM
|
0
|
0
|
2680
|
|
POST
|
interestingly it works when I create another QueuedTask and move ZoomTo in it QueuedTask.Run(() =>{...});
QueuedTask.Run(() =>
{
MapView.Active.ZoomTo(currentExtGeo);
});
... View more
02-10-2021
07:29 PM
|
0
|
2
|
2428
|
|
POST
|
I generate a geometry from a current view extent and create a layer via LayerFactory. Then, I select features in the that intersects with the created the geometry. AGP zoom out all the way the layer extent and does not zoom back into the geometry extent. It happens only right after creating the layer. Afterwards, it works fine when layer does not need to be created again. Here is the code QueuedTask.Run(() =>
{
Envelope currentExtent = MapView.Active.Extent;
Geometry currentExtGeo = currentExtent.Clone();
var sq = new SpatialQueryFilter() { FilterGeometry = currentExtGeo,
SpatialRelationship = SpatialRelationship.Intersects };
CalledFlayer = LayerFactory.Instance.CreateLayer(CalledUri,
MapView.Active.Map, 0, CalledFLayerName) as FeatureLayer;
CalledFlayer.ClearSelection();
CalledFlayer.SetVisibility(true);
CalledFlayer.Select(sq);
MapView.Active.ZoomTo(currentExtGeo);//Supposed go back into original
//extent here but no
});
... View more
02-10-2021
01:11 PM
|
0
|
4
|
2474
|
|
POST
|
Hi @CharlesMacleod Thanks for your answer! Is there way to select features directly without converting a shapefile/Feature Class into a project item? Would you mind sharing a simple example selecting directly from a shapefile or feature class?
... View more
02-08-2021
11:26 AM
|
0
|
2
|
2708
|
|
POST
|
I would like to select features (image footprints) in the view extent on a FeatureLayer. Then, I will use those selected features to call aerial images. Users do not have anything to do with the FeatureLayer. I would like making selection part behind the scenes. Or, is there another way to show all images when user at 1:20,000 scale or bigger. Is there a possible way to do one if these in AGP SDK?
... View more
02-08-2021
09:43 AM
|
0
|
4
|
2825
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-23-2021 02:29 PM | |
| 1 | 09-25-2024 03:31 PM | |
| 1 | 02-26-2024 06:48 AM | |
| 1 | 02-11-2020 02:18 PM | |
| 1 | 07-20-2022 08:51 AM |
| Online Status |
Offline
|
| Date Last Visited |
3 weeks ago
|