Any idea why?
11 Answers, 1 is accepted
We are not aware of such problem with RadTransitionControl. Could you please give us more information about your scenario? If you send us a sample project that reproduces the problem it would be very helpful.
I am glad to assist you further.
George
the Telerik team
I am still having this problem and awaiting some kind of resolution in this forum post:
http://www.telerik.com/community/forums/silverlight/transition-control/events-with-transition-control.aspx
I would suggest you to load the image, before settings it to the TransitionControl. If this image comes from a RIA service, you could set the image to the RadTransitionControl when loading the data (from the service) is completed.
I hope this helps.
George
the Telerik team
I would suggest you to:
- handle the Completed event handler of the LoadOperation.
- In the handler, when you have the loaded image, you could set it for Content of the RadTransitionControl.
George
the Telerik team
As the transition is between a screenshot of the old state and the new state itself, they should be of the same size. In other case the image is either stretched or shrunk. The TransitionControl is designed to work this way.
In order to overcome this limitation you may use the FluidResizePresenter control located in the Telerik.Windows.Controls.TransitionControl namespace of the Telerik.Windows.Controls assembly - it makes a fluid change of the size which will make the transition between different sizes to look better. What you need to do is to just wrap the RadTransitionControl with it like in the following example:
<
UserControl
x:Class
=
"SL_RadWindow.MainPage"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:telerikControls
=
"clr-namespace:Telerik.Windows.Controls.TransitionControl;assembly=Telerik.Windows.Controls"
mc:Ignorable
=
"d"
d:DesignHeight
=
"300"
d:DesignWidth
=
"400"
>
<
Grid
x:Name
=
"LayoutRoot"
Background
=
"White"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Center"
>
<
telerikControls:FluidResizePresenter
Duration
=
"00:00:00.500"
>
<
telerikControls:FluidResizePresenter.Easing
>
<
CircleEase
/>
</
telerikControls:FluidResizePresenter.Easing
>
<
telerik:RadTransitionControl
Content
=
"{Binding}"
Duration
=
"00:00:00.500"
>
<
telerik:RadTransitionControl.Easing
>
<
CircleEase
/>
</
telerik:RadTransitionControl.Easing
>
<
telerik:RadTransitionControl.Transition
>
<
telerik:FadeTransition
/>
</
telerik:RadTransitionControl.Transition
>
<
telerik:RadTransitionControl.ContentTemplate
>
<
DataTemplate
>
<
Grid
Background
=
"{Binding Color}"
>
<
TextBlock
Text
=
"{Binding Text}"
Foreground
=
"White"
FontWeight
=
"Bold"
FontSize
=
"15"
Margin
=
"10"
/>
</
Grid
>
</
DataTemplate
>
</
telerik:RadTransitionControl.ContentTemplate
>
</
telerik:RadTransitionControl
>
</
telerikControls:FluidResizePresenter
>
</
Grid
>
</
UserControl
>
If you have further questions don't hesitate to ask! Greetings,
Miroslav Nedyalkov
the Telerik team
im using version v.2010.1.218.1030
I uploaded a youtube video showing this issue. please let me know how to fix it. or workaround it,
http://www.youtube.com/watch?v=VwjEDxLmXoI
*the same resize issue is shown in any other animation(expand/collapse in treeview, menus etc) at random times.
*video is unclassified (no tags, not shared).
regards.
Thank you for reporting this problem. This happens when there is no set size of the content. We will fix our examples in our further releases. I am glad to update your telerik points.
George
the Telerik team
I have discovered the same problem when using TransitionControl inside a viewbox. I attached xaml of the main page of a test project where this can be reproduced (there's nothing more than a Viewbox and a TransitionControl inside it bound to text property of a textbox, so when you type any text, it should draw transition effects). Note that sizes of all controls are given as fixed values, so that any autosize other than viewbox zoom is impossible. The red rectangle should remain the same, but it seems that the old view of the content template is dropped away from the viewbox and rendered in absolute measures.
<
UserControl
x:Class
=
"TransitionControlInsideViewbox.MainPage"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
d:DesignHeight
=
"300"
d:DesignWidth
=
"400"
mc:Ignorable
=
"d"
>
<
Viewbox
x:Name
=
"LayoutRoot"
Width
=
"400"
Height
=
"250"
Stretch
=
"Uniform"
StretchDirection
=
"Both"
>
<
Grid
Width
=
"200"
Height
=
"125"
Background
=
"White"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"25"
/>
<
RowDefinition
Height
=
"100"
/>
</
Grid.RowDefinitions
>
<
TextBox
x:Name
=
"TextBox"
Width
=
"200"
Height
=
"25"
/>
<
telerik:RadTransitionControl
Grid.Row
=
"1"
Width
=
"200"
Height
=
"100"
Content
=
"{Binding Text, ElementName=TextBox}"
>
<
telerik:RadTransitionControl.Transition
>
<
telerik:FadeTransition
/>
</
telerik:RadTransitionControl.Transition
>
<
telerik:RadTransitionControl.ContentTemplate
>
<
DataTemplate
>
<
Rectangle
Width
=
"200"
Height
=
"100"
Fill
=
"Red"
/>
</
DataTemplate
>
</
telerik:RadTransitionControl.ContentTemplate
>
</
telerik:RadTransitionControl
>
</
Grid
>
</
Viewbox
>
</
UserControl
>
Thank you for reporting us this problem with the TransitionControl. The issue is logged in our PITS and you can track its progress here - http://www.telerik.com/support/pits.aspx#/public/silverlight/14159. We will look into this issue in our further releases.
I am glad to update your telerik points as well.
George
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.