views:

95

answers:

1

I'm trying make a simple control, with a some path in it. And binding Path's Fill, Stroke and StrokeThickness properties to template's Background, BorderBrush and BorderThickness.Left.

<Path x:Name="CorePart"
   Fill="{TemplateBinding Background}"
   Stroke="{TemplateBinding BorderBrush}"
   StrokeThickness="{TemplateBinding BorderThickness.Left} 
..."

But one problem: StrokeThickness do not want to binding. Silverlight report: "The name BorderThickness does not exist in the namespace http://schemas.microsoft.com/client/2007"

How to solve this problem?

A: 

Does your control have a BorderThickness dependency property? I don't think you can bind to a property of a property. I'd add a LeftBorderThickness dependnecy property to your control and the you could bind to that.

Michael S. Scherotter
If I make UserControl property to up-level-property bindings are OK.If I make Control, I get report, that "The name BorderThickness does not exist..."
FFire