RadComboBox - Expand/Collapse time

5 posts, 1 answers
  1. Paweł
    Paweł avatar
    26 posts
    Member since:
    Jun 2011

    Posted 22 Sep 2011 Link to this post

    Hi!
    I wonder if I could change dropdown animation time in RadComboBox easier than edit the template.
    Could you help me?
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 27 Sep 2011 Link to this post

    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 >>

  3. DevCraft banner
  4. Paweł
    Paweł avatar
    26 posts
    Member since:
    Jun 2011

    Posted 27 Sep 2011 Link to this post

    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}" />

  5. Answer
    Yana
    Admin
    Yana avatar
    4554 posts

    Posted 28 Sep 2011 Link to this post

    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 >>

  6. Paweł
    Paweł avatar
    26 posts
    Member since:
    Jun 2011

    Posted 28 Sep 2011 Link to this post

    I had just something wrong with TextBoxBrush. I don't know why, but after put setter below the animation setter it is working.
Back to Top
DevCraft banner