4

也许有人对此有答案。

我正在设计要添加到其他容器的用户控件,它们要适合其容器的可用空间。

所以这意味着不设置用户控件的高度和宽度。

但是当我设计控件时,我希望看到它的宽度和高度。

所以我当然不必继续设置和删除控件的宽度和高度

这个怎么处理???

马尔科姆

4

1 回答 1

6

用这个

<UserControl x:Class="MyApp.UserControl1"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
         mc:Ignorable="d" 
         d:DesignHeight="500" d:DesignWidth="600">
于 2009-11-09T10:49:39.360 回答