This is a migrated thread and some comments may be shown as answers.

RadComboBox - Expand/Collapse time

4 Answers 95 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Paweł
Top achievements
Rank 1
Paweł asked on 22 Sep 2011, 10:27 AM
Hi!
I wonder if I could change dropdown animation time in RadComboBox easier than edit the template.
Could you help me?

4 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 27 Sep 2011, 08:54 AM
Hello Paweł,

You can set up the expand/collapse animations of RadComboBox like this:

<telerik:RadComboBox x:Name="radComboBox" Width="200">
    <telerik:AnimationManager.AnimationSelector>
        <telerik:AnimationSelector>
            <telerik:AnimationGroup AnimationName="Expand">
                <telerik:SlideAnimation Duration="0:0:2.00" Direction="In" SlideMode="Top" TargetElementName="PopupRoot" />
            </telerik:AnimationGroup>
            <telerik:AnimationGroup AnimationName="Collapse">
                <telerik:SlideAnimation Duration="0:0:2.00" Direction="Out" SlideMode="Top" TargetElementName="PopupRoot" />
            </telerik:AnimationGroup>
        </telerik:AnimationSelector>
    </telerik:AnimationManager.AnimationSelector>
...
</telerik:RadComboBox>


All the best,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Paweł
Top achievements
Rank 1
answered on 27 Sep 2011, 03:12 PM
How can I make it from Setter in default RadComboBox style?

Here is my code:
<Style x:Key="DefaultRadComboBoxStyle"
       TargetType="telerik:RadComboBox">
    <Setter Property="Margin"
            Value="5" />
    <Setter Property="SelectedValuePath"
            Value="Id" />
    <Setter Property="DisplayMemberPath"
            Value="Name" />
    <Setter Property="IsEditable"
            Value="True" />
    <Setter Property="IsReadOnly"
            Value="True" />
    <Setter Property="Background"
            Value="{StaticResource TextBoxBrush}" />
    <Setter Property="ClearSelectionButtonContent"
            Value="Wyczyść" />
    <Setter Property="telerik:AnimationManager.AnimationSelector">
        <Setter.Value>
            <telerik:AnimationSelector>
                <telerik:AnimationGroup AnimationName="Expand">
                    <telerik:SlideAnimation Duration="0:0:0.55"
                                            Direction="In"
                                            SlideMode="Top"
                                            TargetElementName="PopupRoot" />
                </telerik:AnimationGroup>
                <telerik:AnimationGroup AnimationName="Collapse">
                    <telerik:SlideAnimation Duration="0:0:0.55"
                                            Direction="Out"
                                            SlideMode="Top"
                                            TargetElementName="PopupRoot" />
                </telerik:AnimationGroup>
            </telerik:AnimationSelector>
        </Setter.Value>
    </Setter>
</Style>
 
<Style TargetType="telerik:RadComboBox"
       BasedOn="{StaticResource DefaultRadComboBoxStyle}" />

0
Accepted
Yana
Telerik team
answered on 28 Sep 2011, 11:11 AM
Hello Paweł,

I've tested the provided Style and the AnimationManager is set without a problem, I've attached my project for a reference.

Best wishes,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Paweł
Top achievements
Rank 1
answered on 28 Sep 2011, 12:46 PM
I had just something wrong with TextBoxBrush. I don't know why, but after put setter below the animation setter it is working.
Tags
ComboBox
Asked by
Paweł
Top achievements
Rank 1
Answers by
Yana
Telerik team
Paweł
Top achievements
Rank 1
Share this question
or