How to disable Silverlight Button Control ?



XAML CODE OF BUTTON (ENABLED) IN SILVERLIGHT : -
<Button Content="A2z" Height="23" HorizontalAlignment="Left" Margin="170,146,0,0" Name="MY_BUTTON" VerticalAlignment="Top" Width="75" />


XAML CODE OF BUTTON (DISABLED) IN SILVERLIGHT : -
<Button Content="A2z" IsEnabled="False" Height="23" HorizontalAlignment="Left" Margin="170,146,0,0" Name="MY_BUTTON" VerticalAlignment="Top" Width="75" />


BackEnd (XAML.cs) Code to Disable and Enable Silverlight Button at Runtime dynamically :-
 MY_BUTTON.IsEnabled = false; // button gets Disabled
 MY_BUTTON.IsEnabled = true; // button gets Enabled

0 comments:

Post a Comment

top