【发布时间】:2011-07-29 03:57:41
【问题描述】:
也许有人对此有答案。
我正在设计要添加到的用户控件 其他容器,它们要适合可用空间 他们的容器。
所以这意味着不设置 用户控制。
但是当我设计控件时我想看到它 有宽度和高度。
所以我当然不必继续设置和删除 控件的宽度和高度
这个怎么处理???
马尔科姆
【问题讨论】:
标签: wpf user-controls autosize
也许有人对此有答案。
我正在设计要添加到的用户控件 其他容器,它们要适合可用空间 他们的容器。
所以这意味着不设置 用户控制。
但是当我设计控件时我想看到它 有宽度和高度。
所以我当然不必继续设置和删除 控件的宽度和高度
这个怎么处理???
马尔科姆
【问题讨论】:
标签: wpf user-controls autosize
使用这个
<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">
【讨论】: