如何绑定Width& Ellipse
内Style
内的ResizeThumb
高度为ResizeThumb
背后的代码?
<Style x:Key="ResizeThumbStyle" TargetType="{x:Type me:ResizeThumb}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type me:ResizeThumb}">
<Grid>
<Ellipse Height="???" Width="???"></Ellipse>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
风格:
ResizeThumb
<ControlTemplate x:Key="ResizeDecoratorTemplate" >
<Grid>
<me:ResizeThumb Name="TL" Width="{Binding Path=ResizerWidth}" Height="{Binding Path=ResizerHeight}" Style="{StaticResource ResizeThumbStyle}" />
</Grid>
</ControlTemplate>
ControlTemplate:
ResizeThumb
public readonly int ResizerWidth = 75;
public readonly int ResizerHeight = 75;
代码背后:(绑定目的地)
{{1}}