RadWindow is restricted when IsRestricted false

7 posts, 0 answers
  1. Roman
    Roman avatar
    12 posts
    Member since:
    Oct 2011

    Posted 12 Mar 2012 Link to this post

    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


  2. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 16 Mar 2012 Link to this post

    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 >>
  3. DevCraft banner
  4. Roman
    Roman avatar
    12 posts
    Member since:
    Oct 2011

    Posted 16 Mar 2012 Link to this post

    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
  5. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 16 Mar 2012 Link to this post

    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 >>
  6. Roman
    Roman avatar
    12 posts
    Member since:
    Oct 2011

    Posted 16 Mar 2012 Link to this post

    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
  7. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 19 Mar 2012 Link to this post

    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 >>
  8. Roman
    Roman avatar
    12 posts
    Member since:
    Oct 2011

    Posted 19 Mar 2012 Link to this post

    Hi,
    Ok.

    Thank you,
    Roman Denysenko
Back to Top
DevCraft banner