开发者

How do wpf control template triggers work?

I have seen a control template for tab control...in http://www.codeproject.com/KB/WPF/WPFOutlookNavi开发者_JS百科.aspx

  1. Is this property triggers ? (Not data/event triggers)
  2. Is this trigger works this way - if TabStripPlacement is "Bottom"...all Setters will be executed ?
<ControlTemplate.Triggers>
    <Trigger Property="TabStripPlacement" Value="Bottom">
        <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0" />
        <Setter Property="Height" TargetName="RowDefinition0" Value="*" />
        <Setter Property="Height" TargetName="RowDefinition1" Value="Auto" />
    </Trigger>
    <Trigger Property="IsEnabled" Value="false">
        <Setter Property="Foreground" Value="{DynamicResource
            {x:Static SystemColors.GrayTextBrushKey}}" />
    </Trigger>
</ControlTemplate.Triggers>


Yes and yes, except that "executed" may be the wrong word here, more accurate would be: While TabStrinpPlacement is Bottom, the setters are active. (i.e. if the value changes to something else the previous values will be used again, see also: DP Precedence)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜