How to set fixed window size for Universal Windows Application

前端 未结 3 2025
长情又很酷
长情又很酷 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条回答
  •  青春惊慌失措
    2021-01-06 01:55

    I found a solution. I think its not the best, but it works.
    XAML:

         
    

    c#

        private void FormName_SizeChanged(object sender, SizeChangedEventArgs e)
        {
    
            ApplicationView.GetForCurrentView().TryResizeView(new Size(900, 600));
        }
    

    Hope it helps

提交回复
热议问题