Binding =" {{{0}}}是什么意思?意思是? [英] What does Binding="{Binding (0)}" mean?

查看:305
本文介绍了Binding =" {{{0}}}是什么意思?意思是?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了:

<DataTrigger Value="True" Binding="{Binding (0)}">

模板中的

触发器.这是什么意思?我曾尝试过Google,但一无所获.

triggers in RibbonMenuButton template. What does it mean? I've tried to google, but found nothing.

UPD更多代码:

<ControlTemplate x:Key="RibbonMenuButtonControlTemplate1" TargetType="{x:Type RibbonMenuButton}">
...
    <DataTrigger Binding="{Binding (0)}" Value="True">
        <Setter Property="TextElement.Foreground" TargetName="MainGrid" Value="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}"/>
        <Setter Property="PathFill" TargetName="TwoLineText" Value="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}"/>
        <Setter Property="CornerRadius" TargetName="OuterBorder" Value="0"/>
        <Setter Property="Background" TargetName="OuterBorder" Value="Transparent"/>
        <Setter Property="BorderBrush" TargetName="OuterBorder" Value="Transparent"/>
    </DataTrigger>
...

RibbonMenuButton控件上按下编辑模板"按钮后,此代码在Blend中创建.

This code created in Blend after "edit template" button pressed on RibbonMenuButton control.

推荐答案

它看起来像个错误.据我所知,在WPF中不能是这种类型的Binding.下面是缺陷列表,请注意第一段,引自

It looks like a bug. As far as I know, in WPF can not be Binding of this type. Below is a list of deficiencies, please pay attention to the first paragraph, quoted from connect.microsoft.com (archive):

我正在尝试设置功能区控件的样式 (System.Windows.Controls.Ribbon)和我一直遇到问题.

I'm trying to style the ribbon control (System.Windows.Controls.Ribbon) and I keep running into problems.

  • 如果我使用Blend或其他工具来复制功能区,RibbonGroup,RibbonTab等默认模板,则这些模板具有 错误. 有诸如{Binding (0)}的绑定.

  • If I use Blend or another tool to copy the default template of the Ribbon, the RibbonGroup, the RibbonTab, etc. these templates have errors. There are Bindings like {Binding (0)}.

我无法更改功能区控件的高度.

I cannot change the height of the ribbon control.

无法更改RibbonGroup的模板,更改分隔符的外观以及将标头放置在 该组的左上角.

It's not possible to change the template of the RibbonGroup, to change the appearance of the separator and to place the header in the top left corner of the group.

无法向ApplicationMenuButton添加标签.此外,此按钮的宽度是固定的.

It's not possible to add a label to the ApplicationMenuButton. Furthermore this button has a fixed width.

我无法删除功能区控件底部的边框.

I can't manage to remove the borders at the bottom of the ribbon control.

据我了解,没有修补程序.

As I understand it, there is no hotfix.

这篇关于Binding =" {{{0}}}是什么意思?意思是?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆