IT Diary

What is the template binding ? 본문

.NetFramework

What is the template binding ?

ETIT 2020. 10. 10. 13:55

Question

<ControlTemplate TargetType="{x:Type wpftoolkit:DataGridCell}">
    <Border Padding="{TemplateBinding Padding}" 
            BorderBrush="{TemplateBinding BorderBrush}" 
            BorderThickness="{TemplateBinding BorderThickness}" 
            Background="{TemplateBinding Background}" 
            SnapsToDevicePixels="True">
        <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
    </Border>
</ControlTemplate>

 

 

 Why do template bindings?

 

Answer..

 

추가적으로 

  • 컴파일 타임에 평가
  • 단방향 바인딩
  • 원본 및 대상 속성이 모두 종속성 속성

'.NetFramework' 카테고리의 다른 글

맨날 봐야할 자료  (0) 2020.10.21
DI(Dependency Injection)  (0) 2020.10.13
Comments