I just started to develop an Universal Windows Application in VS2015 Community Edition. I have used the sample called PieCharts for Windows UWP.
My problem is that
I found a solution. I think its not the best, but it works.
XAML:
<Grid Background="#4A9130" SizeChanged="FormName_SizeChanged">
c#
private void FormName_SizeChanged(object sender, SizeChangedEventArgs e)
{
ApplicationView.GetForCurrentView().TryResizeView(new Size(900, 600));
}
Hope it helps
You can use this code for set minimal size of application:
ApplicationView.GetForCurrentView().SetPreferredMinSize(new Size(400, 650))
;
I guess the only choice is use OnSizeChanged Method to control size of window. It's work's for me. Maybe not the best choice but really easy way to solve problem.
private void FormName_SizeChanged(object sender, SizeChangedEventArgs e)
{
if((this.Width != 400) & (this.Height != 650))
{
this.Width = 450;
this.Height = 650;
}
}