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

RadWindow is restricted when IsRestricted false

6 Answers 164 Views
Window
This is a migrated thread and some comments may be shown as answers.
Roman
Top achievements
Rank 1
Roman asked on 12 Mar 2012, 01:54 PM
Hi,
I found strange behavior of RadWindow. Window is restricted to visible area even when IsRestricted is false.
The code is bellow:

xaml file:
<UserControl x:Class="SilverlightApplication1.MainPage"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
 
    <Grid x:Name="LayoutRoot" Background="White">
        <Button Click="ShowWindow" Content="Show window" />
    </Grid>
</UserControl>


cs file:
namespace SilverlightApplication1
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
        }
 
        private void ShowWindow(object sender, RoutedEventArgs e)
        {
            var window = new RadWindow
                             {
                                 IsRestricted = false,
                                 CanMove = false,
                                 Content = "When I looked in the Visual Studio ItemTemplateCache, I could see that the .vstemplate file for the Silverlight UserControl template was missing from the system. Somehow it had been deleted, and I’m 100% sure I didn’t do it. To fix the problem, I had to delete the content of the ItemTemplateCache folder;",
                                 MinWidth = 50,
                                 MinHeight = 50,
                                 IsTopmost = true,
                                 ResizeMode = ResizeMode.CanResize
                             };
 
            window.ShowDialog();
        }
    }
}

Steps to reproduce:
  • create PopupWindow popup window with width goes beyond visible area
  • press button "Show window"
  • change Height of RadWindow by dragging bottom the side

Result:
window width is restricted to visible area

Best regards,
Roman Denysenko


6 Answers, 1 is accepted

Sort by
0
Ivo
Telerik team
answered on 16 Mar 2012, 10:17 AM
Hello,

We designed RadWindow to act like a window into Windows 7. In Windows 7 a window cannot be larger than your screen size. There is a bug into the scenario you described, but the bug is the RadWindow is not restricted to the screen size on startup. We will try to fix this issue for one of the upcoming releases, but the behavior will not be the one you desire.

Regards,
Ivo
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Roman
Top achievements
Rank 1
answered on 16 Mar 2012, 10:28 AM
Hi, Ivo!

As i understood property IsRestricted is responsible for restriction to visible area.
In your scenario this property will be ignored. I sow the bug in you method CoerceBoundingBox. In it you at first cut width to visible area and then check is IsRestricted property set.

Could you give opportunity to select scenario of restriction by switching IsRestricted property?

Regards,
Roman Denysenko
0
Ivo
Telerik team
answered on 16 Mar 2012, 01:09 PM
Hello,

The IsRestricted property is not intended to be used for this scenario so we cannot and don't want to use exactly this property. I have added a feature request into our PITS. You can track its status here. If it gets enough votes we will consider implementing it.

Kind regards
Ivo
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Roman
Top achievements
Rank 1
answered on 16 Mar 2012, 01:37 PM
Hello, Ivo!

Thank you for providing this feature request.
Is it possible to make event for correcting size notification?
SizeChanged is too general and occurs if changes made by user interaction. I need it for apply custom actions on layout when size corrected this way. 


Regards,
Roman Denysenko
0
Ivo
Telerik team
answered on 19 Mar 2012, 12:30 PM
Hi,

There is no such event and I think there is not an easy workaround for this behavior. The only good solution into your case will be the requested feature.

Kind regards,
Ivo
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Roman
Top achievements
Rank 1
answered on 19 Mar 2012, 12:41 PM
Hi,
Ok.

Thank you,
Roman Denysenko
Tags
Window
Asked by
Roman
Top achievements
Rank 1
Answers by
Ivo
Telerik team
Roman
Top achievements
Rank 1
Share this question
or