Select to view content in your preferred language

Changing popup animation

562
2
Jump to solution
05-18-2012 10:39 AM
KarenEllett
Regular Contributor
By default, the onclick popup has a small animation when it appears, where it grows upward.  I would prefer it simply open and appear, no animation.  I'm assuming it's located somewhere within OnClickPopupContainerStyle.xaml, but I can't find the appropriate lines of code.  Does anyone know how to do this?

Thanks!
0 Kudos
1 Solution

Accepted Solutions
KatherineDalton
Esri Regular Contributor
Hi Karen,

Apologies for the delay on this, but I checked with one of our dev team members and here is his recommendation:

In Config\Layouts\ResourceDictionaries\Common\Shared_Resources.xaml, find the style with a TargetType of esri:InfoWindow.  In the ControlTemplate, remove the ScaleTransform from the root Grid by deleting these lines:

        <Grid.RenderTransform>
            <ScaleTransform ScaleY="0" ScaleX="0"/>
        </Grid.RenderTransform>

Then replace the Show and Hide VisualStates with the following:

        <VisualState x:Name="Show">
            <Storyboard>
                <DoubleAnimation
                    Duration="0"
                    To="1"
                    Storyboard.TargetName="Root"
                    Storyboard.TargetProperty="(UIElement.Opacity)" />
            </Storyboard>
        </VisualState>
        <VisualState x:Name="Hide">
            <Storyboard>
                <DoubleAnimation
                    Duration="0"
                    To="0"
                    Storyboard.TargetName="Root"
                    Storyboard.TargetProperty="(UIElement.Opacity)" />
            </Storyboard>
        </VisualState>

To change this behavior for an existing Viewer, edit the Shared_Resources.xaml file within the Viewer???s folder.  To change it for apps deployed by the App Builder in the future, edit this file from the default Viewer directory (Builder\Templates\Default).


Katy
Katy Dalton | Technical Consultant
THE SCIENCE OF WHERE™

View solution in original post

0 Kudos
2 Replies
KatherineDalton
Esri Regular Contributor
Hi Karen,

Apologies for the delay on this, but I checked with one of our dev team members and here is his recommendation:

In Config\Layouts\ResourceDictionaries\Common\Shared_Resources.xaml, find the style with a TargetType of esri:InfoWindow.  In the ControlTemplate, remove the ScaleTransform from the root Grid by deleting these lines:

        <Grid.RenderTransform>
            <ScaleTransform ScaleY="0" ScaleX="0"/>
        </Grid.RenderTransform>

Then replace the Show and Hide VisualStates with the following:

        <VisualState x:Name="Show">
            <Storyboard>
                <DoubleAnimation
                    Duration="0"
                    To="1"
                    Storyboard.TargetName="Root"
                    Storyboard.TargetProperty="(UIElement.Opacity)" />
            </Storyboard>
        </VisualState>
        <VisualState x:Name="Hide">
            <Storyboard>
                <DoubleAnimation
                    Duration="0"
                    To="0"
                    Storyboard.TargetName="Root"
                    Storyboard.TargetProperty="(UIElement.Opacity)" />
            </Storyboard>
        </VisualState>

To change this behavior for an existing Viewer, edit the Shared_Resources.xaml file within the Viewer???s folder.  To change it for apps deployed by the App Builder in the future, edit this file from the default Viewer directory (Builder\Templates\Default).


Katy
Katy Dalton | Technical Consultant
THE SCIENCE OF WHERE™
0 Kudos
KarenEllett
Regular Contributor
Thanks Katy!
0 Kudos