Lost animation in AnimatedExpander

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 8 years ago by Mike Cowing - MAC-Ware Consulting Ltd
Version: 10.1.0523
Avatar
I have purchased a WPF theme, which integrates fine with my app. I've had to override (if that's the right phrase) some of the controls to get it to behave in the way I want. i.e. for the Datagid I have this in the xaml of the page to change the behaviour of this instance of the grid:
<dg:DataGrid.Resources>
    <Style TargetType="{x:Type dg:DataGrid}">
        <Setter Property="Background" Value="Black"/>
        <Setter Property="RowBackground" Value="Black"/>
    </Style>
</dg:DataGrid.Resources>
Now I have the code for the theme and they override the expander themselves to change the way it looks, but unfortunately I've lost the animated effect from the ActiPro expander. I've tried several things in their theme xaml, but I can't seem to get the animation back. I'm guessing I'm losing some kind of inheritance in the override they make.

This is the ControlTemplate section of the theme:
<Style TargetType="{x:Type shared:AnimatedExpander}">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type shared:AnimatedExpander}">
               <!-- Removed <Grid> section from here for brevity -->
                <ControlTemplate.Triggers>
                    <Trigger Property="IsExpanded" Value="True">
                        <Setter TargetName="ContentRow" Property="Height" Value="{Binding ElementName=Content,Path=DesiredHeight}" />
                        <Setter TargetName="Border1" Property="CornerRadius" Value="6,6,0,0" />
                        <Setter TargetName="Border2" Property="CornerRadius" Value="6,6,0,0" />
                        <Setter TargetName="Border2" Property="BorderThickness" Value="0,0,1,0" />
                    </Trigger>
                    <Trigger Property="IsEnabled" Value="False">
                        <Setter TargetName="Border1" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
                        <Setter TargetName="Border1" Property="BorderBrush" Value="{StaticResource DarkEdgeBrush}" />
                        <Setter Property="Foreground" Value="{StaticResource TextBrushDisabled}"/>
                        <Setter Property="Label.BitmapEffect" TargetName="HeaderLabel">
                            <Setter.Value>
                                <OuterGlowBitmapEffect GlowColor="#FF000000" GlowSize="0"/>
                            </Setter.Value>
                        </Setter>
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>
Can anyone suggest any help here?
BTW I'm not what you would call an experienced WPF developer, so please go easy with any replies.

Thanks, Mike...

Comments (2)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Mike,

Chances are the part you removed for brevity contain the issue. The AnimatedExpander itself does not animate the opening and closing. That job is performed by AnimatedExpanderDecorator, which is included in the default Style and ControlTemplate for AnimatedExpander. If you removed that, then you won't see any animations.

If that doesn't help, please put together a small sample project and email it over to our support address. Once we have that, we can take a closer look.


Actipro Software Support

Posted 8 years ago by Mike Cowing - MAC-Ware Consulting Ltd
Avatar
I'm away in London till the weekend, but when I get back on Saturday I'll have a look and see if I can spot anything obvious based on your comment.

If not I'll butcher a sample together and send it over.

Thanks, Mike...
The latest build of this product (v2018.1 build 0675) was released 7 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.