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
_barchartwindow.Show()
End Sub
The Rad Window xaml looks like this:
<telerik:RadWindow
x:Class="SimProjectSilverlightClientSolution.BarChartWindow"
xmlns:local="clr-namespace:SimProjectSilverlightClientSolution"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400"
Header="Project Bar Chart">
<local:BarChart />
</telerik:RadWindow>
The user control xaml is this:
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
x:Class="SimProjectSilverlightClientSolution.BarChart"
d:DesignWidth="1000" d:DesignHeight="480">
<Grid x:Name="LayoutRoot" Background="White">
<Canvas x:Name="CanvasRoot" Background="White" >
</Canvas>
</Grid>
</UserControl>
But it doesn't really matter what the UserControl looks like, I've tried several varieties..all with the same results as follows:
Setting .MinWidth and a Left value appears to function in much the same way.
Bug, or just something that I am misunderstanding?
Thanks
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
_barchartwindow.Show()
End Sub
The Rad Window xaml looks like this:
<telerik:RadWindow
x:Class="SimProjectSilverlightClientSolution.BarChartWindow"
xmlns:local="clr-namespace:SimProjectSilverlightClientSolution"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400"
Header="Project Bar Chart">
<local:BarChart />
</telerik:RadWindow>
The user control xaml is this:
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
x:Class="SimProjectSilverlightClientSolution.BarChart"
d:DesignWidth="1000" d:DesignHeight="480">
<Grid x:Name="LayoutRoot" Background="White">
<Canvas x:Name="CanvasRoot" Background="White" >
</Canvas>
</Grid>
</UserControl>
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?
Thanks