<ControlTemplate x:Key="FeatureFill"> <Path x:Name="Element" Fill="{Binding Symbol.Fill}" Stroke="{Binding Symbol.BorderBrush}" StrokeThickness="{Binding Symbol.BorderThickness}" Opacity="0.10"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal" > <Storyboard> <DoubleAnimation Storyboard.TargetName="Element" Storyboard.TargetProperty="(Symbol.Opacity)" To="{Binding Symbol.Opacity}" Duration="00:00:00" /> <DoubleAnimation Storyboard.TargetName="Element" Storyboard.TargetProperty="(Path.StrokeThickness)" To="{Binding Symbol.BorderThickness}" Duration="00:00:00.5" /> </Storyboard> </VisualState> <VisualState x:Name="MouseOver"> <Storyboard> <DoubleAnimation Storyboard.TargetName="Element" Storyboard.TargetProperty="(Symbol.Opacity)" To="1" Duration="00:00:00" /> <DoubleAnimation Storyboard.TargetName="Element" Storyboard.TargetProperty="(Path.StrokeThickness)" To="3" Duration="00:00:00.2" /> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> </Path> </ControlTemplate>
resDict = new ResourceDictionary() { Source = new Uri("/IViewer;component/Styles/FeatureLayerStyle.xaml", UriKind.Relative) }; ControlTemplate ct = resDict["FeatureFill"] as ControlTemplate; foreach (Graphic g in fLayer.Graphics) { g.Symbol.ControlTemplate = ct; }
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.