This is a migrated thread and some comments may be shown as answers.
MinWidth disallows minimized Left position
1 Answer 12 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
MobiusStrip asked on 27 Dec 2010, 10:13 PM
This one has me stumped.  
I have a radWindow that I want to  show minimized when the page opens, and have a minimum height and width when the user expands it...the code looks like this...

Private Sub OnPageLoaded()
   ' bar chart window
        _barchartwindow.WindowStartupLocation = WindowStartupLocation.Manual
        _barchartwindow.WindowState = WindowState.Minimized    
        _barchartwindow.CanClose = False
        _barchartwindow.Width = 900
        _barchartwindow.Height = 310
        _barchartwindow.MinHeight = 310 ' comment this out and starting vertical position is where I expect
        _barchartwindow.MinWidth = 900  
        _barchartwindow.IsRestricted = True
        _barchartwindow.Top = 250
        _barchartwindow.Left = 0
End Sub

The Rad Window xaml looks like this:

    mc:Ignorable="d"     d:DesignHeight="300" d:DesignWidth="400"
    Header="Project Bar Chart">
    <local:BarChart />

The user control xaml is this:

d:DesignWidth="1000" d:DesignHeight="480">
    <Grid x:Name="LayoutRoot" Background="White">
    <Canvas x:Name="CanvasRoot" Background="White" >      

But it doesn't really matter what the UserControl looks like, I've tried several varieties..all with the same results as follows:

  • If I comment out the _barchartwindow.MinHeight line, then the minimized Window appears where I want it! 
  • Otherwise, with .MinHeight set, the minimized window positions at what appears to be Top=0, Left=0 (as though Top setting is ignored)
  • Moreover, if I set the .Top value to an unusually large value, say 2200, then the position is somewhere around Top= 100 (2200, 2500, whatever value all position it at same vertical position).

Setting .MinWidth and a Left value appears to function in much the same way.

Bug, or just something that I am misunderstanding?


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 03 Jan 2011, 02:27 PM
Hi MobiusStrip,

When you set MinHeight the control can't be smaller than that (even if minimized) and we are doing a trick by hiding the content so the RadWindow look minimized but it height is in fact the MinHeight. That is why when you move the minimized RadWindow it is restricted strange taking in consideration the MinHeight. This is normal. However this is interacting with the start up position in some way and miscalculates it. For now the workaround is to set just Height without setting MinHeight or remove IsRestricted=true. We will investigate what is happening and will try to provide a fix.

Please, excuse us for the inconvenience. We have added points to your account for your report. Don't hesitate to contact us if you have other questions.

Kind regards,
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question