WPF user control does not resize with main window

前端 未结 2 1456
情歌与酒
情歌与酒 2021-01-05 00:34

I\'m trying to make a WPF user control that includes two group boxes and two ListViews in each group box. Here is the XAML code for the user control:

         


        
2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-05 00:59

    You're specifying the Height and Width properties as fixed values in the UserControl. Remove those properties, and set the HorizontalAlignment and VerticalAlignment properties of the control instance in the main window to Stretch. That should take care of it.

提交回复
热议问题