How to set fixed window size for Universal Windows Application

前端 未结 3 2013
长情又很酷
长情又很酷 2021-01-06 01:21

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

3条回答
  •  萌比男神i
    2021-01-06 02:06

    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;
        }
    }
    

提交回复
热议问题