<ControlTemplate x:Name="NoButtonTemplate" TargetType="esri:AttachmentEditor"> <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="BusyStates"> <VisualState x:Name="Loaded"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ProgressIndicator"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Collapsed</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Busy"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ProgressIndicator"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <DoubleAnimation Duration="0:0:0.75" RepeatBehavior="Forever" To="360" Storyboard.TargetName="ProgressIndicator" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)" /> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Grid Background="{TemplateBinding Background}"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Grid x:Name="ProgressIndicator" Background="Transparent" Grid.Row="0" Grid.Column="0" Margin="3,0" Visibility="Collapsed" HorizontalAlignment="Left" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5"> <Grid.RenderTransform> <RotateTransform /> </Grid.RenderTransform> <Ellipse Fill="#1E525252" Margin="11,2,11,20" Width="2" Height="2"/> <Ellipse Fill="#3F525252" Height="3" Width="3" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,4,5,0" /> <Ellipse Fill="#7F525252" Width="4" HorizontalAlignment="Right" Height="4" VerticalAlignment="Top" Margin="0,9,1,0" /> <Ellipse Fill="#BF525252" Height="5" Width="5" VerticalAlignment="Bottom" Margin="0,0,3,3" HorizontalAlignment="Right" /> <Ellipse Fill="#FF525252" Height="6" Width="6" VerticalAlignment="Bottom" Margin="9,0" /> </Grid> <!--<Button x:Name="AddNewButton" Content="Add" HorizontalAlignment="Right" Margin="3" Padding="3" MinWidth="50" Grid.Row="0" Grid.Column="1" IsEnabled="False" />--> <ScrollViewer Grid.Row="1" Margin="3,0,3,3" Grid.ColumnSpan="2"> <ItemsControl x:Name="AttachmentList" ItemTemplate="{TemplateBinding ItemTemplate}"/> </ScrollViewer> </Grid> </Border> </ControlTemplate>
InitializeComponent(); ControlTemplate ct = this.Resources["NoButtonTemplate"] as ControlTemplate; if ( ct == null ) return; AttachEditor.Template = 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.