Remove close button from RadSplitContainer

2 posts, 0 answers
  1. Jimmi
    Jimmi avatar
    1 posts
    Member since:
    Jul 2009

    Posted 16 Oct 2009 Link to this post


    I added a RadSplitContainer to a RadDocking with the InitialPosition set to DockState.FloatingDockable and by default the window have a close button. How can I remove the button from the RadSplitContainer?

    This is my xaml file:

    <Grid x:Name="LayoutRoot" Background="White"
        <telerikDocking:RadDocking x:Name="DockingHost" /> 

    and this is my cs file:

            void ShellLight_Loaded(object sender, RoutedEventArgs e) 
                var splitter = new RadSplitContainer(); 
                splitter.InitialPosition = DockState.FloatingDockable; 
                splitter.SetValue(RadDocking.FloatingSizeProperty, new Size(650, 450)); 
                splitter.SetValue(RadDocking.FloatingLocationProperty, new Point(300, 150)); 

  2. Miroslav Nedyalkov
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 20 Oct 2009 Link to this post

    Hi Jimmi,

    This close button is not part of the SplitContainer, but it is a part of the ToolWindow that hosts the Floating SplitContainer. Currently the only way to entirely remove the close button is to create a custom theme, add style for the ToolWindow control in, remove the close button from the ControlTemplate of the ToolWindow and set the theme to the Docking control you want. This will effect in removing the close buttons of all ToolWindows. Is this OK for you?

    In your sample code I noticed that you are adding an empty SplitContainer and it is FloatingDockable. Please notice that this code shouldn't show an empty ToolWindow (as it probably does by now) and if it is showing an empty ToolWindow at this time, this will be fixed soon.

    Best wishes,
    Miroslav Nedyalkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top