Using Template Bindings in WPF

By: Brad Cunningham

54   0   8689

Uploaded on 12/20/2012

This video shows you how to use the TemplateBinding markup extension to give your control templates more flexibility in WPF

Comments (2):

By anonymous    2017-09-20

A picture is worth a 1000 words. In this case it is 7 minutes video: https://www.youtube.com/watch?v=z-0TZR-7xLI

EDIT: Example:

  • A Button has a default ControlTemplate property and Height property
  • You override ControlTemplate property of a Button by writing your own (for example you want to make an Ellipse-looking button instead of Rectangle-looking)
  • After you made an Ellipse in your new ControlTemplate, you want the Ellipse to be the same size as original Button's Height property
  • So you use TemplateBinding in order to reference Button's Height without naming itenter image description here

Original Thread

Recommended Books

    Popular Videos 347

    Mathematics of Computer Graphics and Virtual Environments

    Submit Your Video

    If you have some great dev videos to share, please fill out this form.