Opening Window Its own Minheight and MinWidth
I want to open a window with its own MinHeight and MinWidth, without setting SizeToContent property and without specifying any Height and Width of w开发者_如何转开发indow in WPF. Kindly let me know how can I achieve the same in WPF. Thanks
If you want your window should open based on the size specified in MinHeight and MaxHeight without specifying SizeToContent property then you need to set MaxHeight and MaxWidth also. You need to set the same value to Maxheight and Maxwidth properties. Try below XAML snippet
<Window x:Class="WPFTestApplication.Test1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Test1" MinHeight="100" MinWidth="100"
MaxHeight="100" MaxWidth="100"
SizeToContent="Manual">
精彩评论