xmlns:esri="http://schemas.esri.com/arcgis/client/2009" xmlns:esriPrimitives="clr-namespace:ESRI.ArcGIS.Client.Toolkit.Primitives;assembly=ESRI.ArcGIS.Client.Toolkit" xmlns:local="clr-namespace:SymbolSelector"> <Grid x:Name="LayoutRoot" Background="White"> <Grid.Resources> <local:ObjectCollection x:Key="SymbolCollection"> <esri:SimpleMarkerSymbol Color="Red" Style="Circle" Size="15" /> <esri:SimpleMarkerSymbol Color="Green" Style="Circle" Size="15" /> <esri:SimpleMarkerSymbol Color="Yellow" Style="Circle" Size="15" /> </local:ObjectCollection> </Grid.Resources> <ComboBox ItemsSource="{StaticResource SymbolCollection}" VerticalAlignment="Top" HorizontalAlignment="Center"> <ComboBox.ItemTemplate> <DataTemplate> <Button> <Button.Content> <esriPrimitives:SymbolDisplay Height="25" Width="30" Symbol="{Binding}" /> </Button.Content> </Button> </DataTemplate> </ComboBox.ItemTemplate> </ComboBox> </Grid> </UserControl>
IEnumerable<MarkerSymbol> symbols = ResourceDictionary.OfType<MarkerSymbol>(); foreach (MarkerSymbol symbol in symbols) ComboBox.Items.Add(???);
<StackPanel VerticalAlignment="Top" HorizontalAlignment="Center" Orientation="Horizontal" DataContext="{StaticResource MyEditor}"> <Button Command="{Binding Add}" CommandParameter="{StaticResource StrobeMarkerSymbol}"> <Button.Content> <esriPrimitives:SymbolDisplay Height="25" Width="30" Symbol="{StaticResource StrobeMarkerSymbol}"/> </Button.Content> </Button> <Button Command="{Binding Add}" CommandParameter="{StaticResource SelectRectangleMarkerSymbol}"> <Button.Content> <esriPrimitives:SymbolDisplay Height="25" Width="30" Symbol="{StaticResource SelectRectangleMarkerSymbol}"/> </Button.Content> </Button> </StackPanel>
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.