This is a migrated thread and some comments may be shown as answers.

Hiding the maximize/minimize buttons

7 Answers 195 Views
Window
This is a migrated thread and some comments may be shown as answers.
T.Y.
Top achievements
Rank 1
T.Y. asked on 02 Jun 2009, 09:17 AM
I'm using with a RadWindow control
I want to able to resize the window but that without showing the maximize/minimize buttons

Is it possible?

Thanks
Toiby

7 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 05 Jun 2009, 09:19 AM
Hello T.Y.,

You can achieve this by changing the ControlTemplate of the RadWindow control. The attached project demonstrates how to do this. It simply removes the minimize and maximize buttons from the ControlTemplate of the window.

All the best,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
Rohit
Top achievements
Rank 1
answered on 30 Jul 2009, 02:10 PM
I think there is an issue in the drag drop of RadWindow, it should not allow to drop the window at a position which is not visible, I mean when user drag a window in upward direction there is  no limit to it, ideally it should prevent to drag the window at Top =0. Same applies to the bottom also. Left and right are ok as but that should also be stopped at the browser boundaries.

In the above scenario it is near to impossible to recover the radwindow again if user drags it outside the visible area. May be I could not do it someone else could do it.

Thanks
Rohit
0
Miroslav Nedyalkov
Telerik team
answered on 31 Jul 2009, 09:24 AM
Hi Rohit,

This behavior is by design as we were looking at the Windows in the Windows OS - they have no such constraints. But as you mentioned it is really hard to recover the Window if you drop it outside of the screen. Because of this we've add a couple of new properties that will allow you to customize this behavior - IsRestricted and RestrictedAreaMargin. These new properties will be added after SP1 release (next week).

Hope this time frame and approach are good enough for you.

Kind regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
armarocha
Top achievements
Rank 2
answered on 07 Aug 2009, 04:41 PM
You can control and avoid windows visibility on Window LocationChanged event:

 

void w_LocationChanged(object sender, RoutedEventArgs e)   
{  
        RadWindow w = (RadWindow)sender;   
        //Left   
        if (w.Left < 0) w.Left = 0;   
        //Top   
        if (w.Top < 0) w.Top = 0;   
        Grid root = (Grid)base.FindName("LayoutRoot");   
        //Right   
        if (w.Left > (root.ActualWidth - w.ActualWidth)) w.Left =  (root.ActualWidth - w.ActualWidth);   
       //Bottom   
       if (w.Top > (root.ActualHeight - 30)) w.Top = (root.ActualHeight - 30);  
}  

 

 

I think that is important solve this problem on next release.

Best regards,
Armando Rocha

 

0
Miroslav Nedyalkov
Telerik team
answered on 10 Aug 2009, 11:51 AM
Hi armarocha,

This feature is ready and it will be included in the upcoming service pack.

Regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
Brian
Top achievements
Rank 1
answered on 13 May 2011, 03:03 PM
The Close button does not work in the sample provided in the post above.  Anyone know how I can get the close button to actually close the window?
Tks.
0
Miroslav Nedyalkov
Telerik team
answered on 16 May 2011, 07:51 AM
Hi Brian,

 The theme in this example is very old (two years) and we changed some things. What you need to do to make the Close button working is to set the Button's Command property to telerik:WindowCommands.Close. Please note that more problems could occur if you use this outdated theme.

All the best,
Miroslav Nedyalkov
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
Tags
Window
Asked by
T.Y.
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Rohit
Top achievements
Rank 1
armarocha
Top achievements
Rank 2
Brian
Top achievements
Rank 1
Share this question
or