FloatingLocation="250, 50" code behind

2 posts, 0 answers
  1. Ben Vincent
    Ben Vincent avatar
    2 posts
    Member since:
    Aug 2009

    Posted 27 May 2010 Link to this post

    Hi,

    I am creating a floating window - code behind - but I want to set the FloatingLocation + floatingSize

    Whats the code behind equiv of this:

      <radDock:RadSplitContainer InitialPosition="FloatingDockable"
                        radDock:RadDocking.FloatingLocation="250, 50"
                        radDock:RadDocking.FloatingSize="300, 220">

     

     

    RadSplitContainer split = new RadSplitContainer();

     

    split.InitialPosition =

     

    DockState.FloatingDockable;

     


    Thanks for any help

    Ben                
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 31 May 2010 Link to this post

    Hi Ben Vincent,

    Thank you for contacting us.

    If the Pane is already floating you will have to use the following code snippet in your event handler to position it.

    myPane.ParentOfType<ToolWindow>().HorizontalOffset = 250; 
    myPane.ParentOfType<ToolWindow>().VerticalOffset = 50;

    If the Pane is initially docked and chosen from the menu Floating, you can use the following code:

    Telerik.Windows.Controls.RadDocking.SetFloatingLocation(split, new Point(100, 50));

    To set the FloatingSize, which is attached property, it will have to be set before the Pane is floating. That is because, it is meant to be used in XAML.

    If you have further questions please feel free to ask again.

    Regards,

    Konstantina
    the Telerik team

     


    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
Back to Top