Trouble Binding the flow direction on SlideAndZoomTransition

3 posts, 0 answers
  1. Mike
    Mike avatar
    1 posts
    Member since:
    Jun 2009

    Posted 16 Dec 2010 Link to this post

    I am getting 'System.ArgumentException: Object of type 'System.Windows.Data.Binding' cannot be converted to type 'System.Windows.FlowDirection'' when I am trying to bind the SlideDirection of the SlideAndZoomTransition to my viewModel.  The exception is occuring at the InitializeComponent() call in the constructor of the view. 

    <telerik:RadTransitionControl x:Name="ActiveItem" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Duration="0:0:0.5" >
        <telerikTransitions:SlideAndZoomTransition SlideDirection="{Binding Transition}"/>

    In ViewModel:
    private FlowDirection _transition = FlowDirection.LeftToRight;

    public FlowDirection Transition
    return _transition;
    _transition = value;
    NotifyOfPropertyChange(() => Transition);

    Any advice?
  2. Pana
    Pana avatar
    748 posts

    Posted 22 Dec 2010 Link to this post

    Hi Mike,

    The TransitionProvider is not a DependencyObject. The SlideDirection is not a DependencyProperty. Bind the Transition property of the Transition Control instead of the direction property. You can easily create a converter that based on the bound value would return "new SlideAndZoomTransition() { SlideDirection = LeftToRight}" or "new SlideAndZoomTransition() { SlideDirection = RightToLeft}".

    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. Eli
    Eli avatar
    34 posts
    Member since:
    Oct 2011

    Posted 24 Oct 2011 Link to this post

    How would you do it using xaml only?

            <Controls:RadTransitionControl Content="{Binding}">
                    <TransitionEffects:SlideAndZoomTransition x:Name="SlideTransition"

    Made converter as follows but won't let me bind to it, or use triggers to set

    <!--SlideDirection="{Binding SlideRight, Converter={StaticResource BoolToDirectionConverter}}"-->
Back to Top