How to bind a query returns/results to a textblock in XAML? See below. Thanks<TextBlock x:Name="textLabel" Forground="White" Text="Total records/features found: " /><TextBlock x:Name="featuresFound" Foreground="Red" Text="{Binding ... }" />
<ListBox HorizontalAlignment="Stretch" x:Name="RelationshipsListBox" Background="Transparent" BorderBrush="Transparent" Margin="5,2,-5,0" ItemsSource="{Binding RelationshipList}" VerticalAlignment="Stretch" DisplayMemberPath="Name" Width="300" FontFamily="SegoeUI" Grid.Row="2" Grid.ColumnSpan="3"> </ListBox>
relationshipList = new List<Relationship>(); QueryRelatedViewModel vm = new QueryRelatedViewModel(relationshipList, MapApplication.Current.Map); RelationshipSelectionView relationshipView = new RelationshipSelectionView(); relationshipView.DataContext = vm; int relCount = relatesLayer.LayerInfo.Relationships.Count(); if (relCount > 1) // Layer has more than one relationship { foreach (Relationship rel in relatesLayer.LayerInfo.Relationships) { relationshipList.Add(rel); } }
public QueryRelatedViewModel(List<Relationship> relationships, Map Map) { RelationshipList = relationships; map = Map; } private List<Relationship> relationshipList; /// <summary> /// Gets or sets the list of Relationships associated with a layer /// </summary> public List<Relationship> RelationshipList { get { return relationshipList; } private set { if (relationshipList != value) relationshipList = value; } }
Hi Katy, Am also in the same situation, to create a Custom add-in for the query. Even the sample is available, this is not user fiendly. In the sample we need to type the entire query, with the proper attribute names and field values. But that is not possible at all. So, please guide me to read the attribute field names and unique values of attributes from the selected layer. Is therer any build-in function to read those fields and values of the fields?
Hi Laura,This is a situation where you would need to write a custom add-in. You might take a look at the Attribute Query sample in our Samples page for information/ideas.Katy
I made an address locator with General Single Field style and it works perfectly in ArcMap. But in Silverlight it cannot connect to it for some reason. I think their may be a bug with that style address locator.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.