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>
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.