【发布时间】:2012-01-04 12:22:33
【问题描述】:
我想在设计时让我的用户控件带有黄色背景。设计后它应该保持透明。 我尝试使用“忽略”标志,但无法理解它是如何工作的。
<UserControl x:Class="Abnehmen_Standard.ucRoundButton"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="84" d:DesignWidth="84"
d:Background="Yellow"
最后一行不起作用。
你能给我建议吗?
【问题讨论】:
-
尝试在一个名为 Expression Blend 的工具中设计您的控件。它允许对您的 WPF UI 进行大量快速自定义,还可以使用“d”命名空间,但不要手动编辑...
-
感谢您的回答。这有帮助!
-
这个 Stack Overflow 的答案可能对您有所帮助:stackoverflow.com/questions/4843276/…
-
谢谢,但没有。我知道 isInDesign 属性。但我想知道如何使用这个忽略“d:”标志。而你给了我只有混合才有可能的答案。这就是我需要知道的。 :-)
-
schemas.microsoft.com/expression/blend/2008 命名空间受 VS2010 支持
标签: wpf xaml windows-phone-7