tags:

views:

18

answers:

1

I want to change Button drawing based on button size using XAML. I know it is possible using c# code not sure about XAML Thanks

Update : my code is like

<Grid Width="60" Height="60">
       <Ellipse Width="57" Height="57" StrockThickness="1">
       </Ellipse>
</Grid>

I am applying above style to Button control. but here Width/Height is hard coded. I want it dynamically design time. so when I increase/decrease button size ellipse become accordingly

Thanks again

A: 

You should be able to use Property or Event triggers (in XAML). This is probably the preferred way to do this kind of behaviour as it puts the User Experience completely in the designers hands (via XAML) rather than hooking up event handlers (in C# code) that a developer now needs to maintain in order to modify the user experience.

I don't have quick access to VS to test this out right now, but I can try tomorrow if there is no answer by then.

Dave White