zoukankan      html  css  js  c++  java
  • Binding Relative 示例

    Binding to self :

    <TextBlock Height="23"   Name="textBlock4" Text="{Binding RelativeSource=
    {RelativeSource Mode=Self},Path=Name}" VerticalAlignment="Top" />

    Binding to Templatepartent:

    <TextBlock Height="23" HorizontalAlignment="Left" Margin="12,141,0,0"  
    Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=Name,Converter={...}}"/>

    Or:

    <TextBlock Height="23" HorizontalAlignment="Left" Margin="12,141,0,0"  
    Text="{TemplateBinding Path=Name}"/>

    Binding to Ancestor:

    <TextBlock Height="23" HorizontalAlignment="Left" Margin="12,141,0,0"    Text="{Binding RelativeSource={RelativeSource 
    Mode=FindAncestor,AncestorType=ComboBox,AncestorLevel=2},Path=Name}"     VerticalAlignment="Top" />-->

    <Rectangle   x:Name="recIcon"    Grid.Row="0" FocusVisualStyle="{x:Null}"     Fill="{Binding DefaultImage,RelativeSource={RelativeSource  AncestorType={x:Type 
    local:IconButton}}}"  />-->

    Binding to PreviousData:

    <TextBlock  Text="{Binding   RelativeSource={RelativeSource Mode=PreviousData},Path=Name}"/>

  • 相关阅读:
    erl_0012 timer:tc 测试模块函数调用运行耗时
    erl_0011 erlang 定时器相关
    erl0010
    erl0009
    erl0008
    erl0007
    erl0006
    erl0005
    开开心心过生活、踏踏实实做技术
    Android-理解Intent
  • 原文地址:https://www.cnblogs.com/xiaokang088/p/2026749.html
Copyright © 2011-2022 走看看