【发布时间】:2012-03-14 02:54:13
【问题描述】:
WPF 4 包含一个“TaskbarItemInfo”Freezable 类,该类将附加属性添加到允许更改各种 Windows 7 任务栏项目的窗口。
特别是,我正在尝试在窗口的 tasbar 图标上设置进度信息。我想使用 DataTrigger 来执行此操作,但它似乎不起作用。我尝试使用简单的样式设置器,但这也不起作用 - 只有直接属性分配或直接属性绑定才会起作用。
例如:
<Window.Style>
<Style>
<Setter Property="TaskbarItemInfo.ProgressState" Value="Indeterminate" />
</Style>
</Window.Style>
<Window.TaskbarItemInfo>
<TaskbarItemInfo />
</Window.TaskbarItemInfo>
看起来好像没有通过样式设置附加属性。我通过样式设置附加属性的语法不正确,还是我遗漏了其他内容?
【问题讨论】:
标签: wpf windows-7 dependency-properties