Almost: label slide animation with easing and fade on completion

3 posts, 1 answers
  1. Edward
    Edward avatar
    45 posts
    Member since:
    Aug 2005

    Posted 17 Jul 2012 Link to this post


    I have a nice simple working example of a label wrapped with a RadTransistion control. It is for use in a notification area - I try to mimick the WebOS notification system :-) . The slide animation is working and I get a nice fast slide in.

    The only things I have problems with and where I hope you can help is:

    - setting a foreground color of the label (sometime it's red, sometimes it's green)

    - easing out the last 40-50 pixels

    - after 3 seconds of completion, the content of the label should fade away (in 0.5 sec)

    <telerik:RadTransitionControl x:Name="lblNotificationRight" Content="" HorizontalAlignment="Center" Duration="00:00:01"  >
                          <telerik:Label Content="{Binding}" HorizontalAlignment="Right" VerticalAlignment="Center" Foreground="WhiteSmoke" FontSize="14"/>
                      <BackEase />
                      <telerik:SlideAndZoomTransition MinZoom="1.0" SlideDirection="RightToLeft" />

    In the code behind:

    private void DoStandardNotification(StandardNotificationItem pStandardNotificationItem)
    lblNotificationRight.Background = pStandardNotificationItem.BackgroundColor;
    lblNotificationRight.Foreground = pStandardNotificationItem.ForegroundColor;
    lblNotificationRight.Content = pStandardNotificationItem.Message;


  2. Answer
    Rosen Vladimirov
    Rosen Vladimirov avatar
    640 posts

    Posted 19 Jul 2012 Link to this post


    You can use the TransitionStatusChanged event to check if the TransitionStatus is completed or not. Refer to our online help for more details: 
    To implement the fade away effect of the content of the label you can set the TransitionControl.Content to null to clear the TranistionControl area. To be more clear we have created a sample project for you, please find it attached. In it we have set the foreground of the content to be red or green as you described.
    Hopefully this will help you to resolve the issues.

    Best regards,
    Rosen Vladimirov
    the Telerik team
  3. DevCraft banner
  4. Edward
    Edward avatar
    45 posts
    Member since:
    Aug 2005

    Posted 27 Jul 2012 Link to this post

Back to Top