I thought some of you might be interested in a simple mod. to the button
shiped in the 1.1 sdk.

 

Add this  to the updatelayout method to avoid having to set the width for
each button

that has a different length text.

 

                  if (text != null)

                  {

                    this.SetValue(Canvas.WidthProperty, text.ActualWidth +
30);

                  } 

 

You could even add an EnableAutoWidth property to the button to enable this
if you want to keep the

original behaviour in other situations.

 

Cheers,

 

Jonathan Parker (MCTS - Web Applications)

Email: [EMAIL PROTECTED]

Blog: www.jonathanparker.com.au

 




------------------------------------------------------------------- 
OzSilverlight.com - to unsubscribe from this list, send a message back to the 
list with 'unsubscribe' as the subject.
Powered by mailenable.com - List managed by www.readify.net

Reply via email to