<userControls:DraggableWindow x:Name="DragWondow" Visibility="{Binding ElementName=Map, Path=Layers[SpatialQueryGraphicsLayer].Graphics.Count, Converter={StaticResource NumOfSelectToVisibilityConverter}}" Width="280" Height="180" Foreground="Black" IsOpen="{Binding Visible, Mode=TwoWay}" Grid.Row="2" > <esri:FeatureDataGrid Visibility="{Binding ElementName=Map, Path=Layers[SpatialQueryGraphicsLayer].Graphics.Count, Converter={StaticResource NumOfSelectToVisibilityConverter}}" Grid.Row="2" Grid.Column="1" x:Name="MyDataGrid" Map="{Binding ElementName=Map}" GraphicsLayer="{Binding ElementName=Map, Path=Layers[SpatialQueryGraphicsLayer]}" /> </userControls:DraggableWindow>
Hi Joe,1. I've decided to give up on preserving the last tool meanwhile so, at the moment, I don't need the QueryComplete event at the end. I do need to check, whether the Url of the active layer is equal to X or equal to None and if the answer is yes, do not execute the spatialQueryAction. Is that possible without writing my own spatialQuery?2. Please send me the sample of a FeatureDataGrid and FeatureDataForm integrated into a DraggableWindow.I hope I don't nagg too much...So many thanks,Miri
Hi Joe,1. Now it is finally works. I wasn't aware of all these DataContext issues....I'm studing and programming at the same time so I miss things. I haven't tried the symbol yet but I'm sure it will work. Thanks a lot!
2. So sweet of you to write this code on action completion. The thing is that if there is so much code for it, I don't see the advantage of using it instead of QueryTask. Can you see any advantage?
3. How do you know what is: Toda Raba?
4. Do you have a tip/sample for wrapping DataGrid (or featureDataGrid) in a draggable/floatingWindow with close button? I saw some threads about it in the forum but couldn't find someting that attracted me.
<Button x:Name="QueryButton" Height="30" Width="30" Margin="0,0,2,0" HorizontalContentAlignment="Left" Padding="2" Content="Query"> <i:Interaction.Triggers> <i:EventTrigger EventName="Click"> <Actions:SpatialQueryAction DrawMode="Rectangle" OutFields="FID,STATE_NAME,STATE_ABBR" LayerID="MyQueryResultsGraphicsLayer" Url="{Binding ElementName=QueryButton, Path=DataContext.Url}" Symbol="{StaticResource GraphicsLayerFillSymbol}" QueryComplete="SpatialQueryAction_QueryComplete" TargetName="Map" /> </i:EventTrigger> </i:Interaction.Triggers> </Button>
public MainPage() { InitializeComponent(); ActiveLayer = new ActiveLayer { Url = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/2" }; QueryButton.DataContext = ActiveLayer; } public ActiveLayer ActiveLayer { get; set; } private void SpatialQueryAction_QueryComplete(object sender, EventArgs e) { }
I admire your patience....Thanks,Miri
<actions:SetLayerUrlAction Url="{Binding _ActiveLayer.URL}"/>
public MainPage() { InitializeComponent(); DataContext = this; }
public ActiveLayer ActiveLayer { get; set; }
<actions:SetLayerUrlAction Url="{Binding ActiveLayer.URL}"/>
public MainPage() { InitializeComponent(); ActiveLayer = new ActiveLayer(); DataContext = ActiveLayer ; } public ActiveLayer ActiveLayer { get; set; } <actions:SetLayerUrlAction Url="{Binding URL}"/>
Symbol="{Binding _activeLayer.Symbol}"
Hi,Is there a way to show a DataGrid of the selected features using SpatialQueryAction.There is a sample called: http://resourcesbeta.arcgis.com/en/help/silverlight-api/samples/start.htm#GraphicsActionsI want to extend this sample to show also the dataGrid of the selection's result.Thanks a lot,Miri
<esri:FeatureDataGrid Grid.Row="2" x:Name="MyDataGrid" Map="{Binding ElementName=MyMap}" GraphicsLayer="{Binding ElementName=MyMap, Path=Layers[LayerIDPassedToAction]}" />
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.