Alternate way to Disable a Button in Silverlight.


So to avoid this blur Effect we can use other Properties of Button in Silverlight to Disable it. 


XAML Code to disable Button :-
<Button Content="A2z" IsHitTestVisible="False" Height="23" HorizontalAlignment="Left" Margin="170,146,0,0" Name="MY_BUTTON" VerticalAlignment="Top" Width="75" />





 BackEnd ( XAML.cs) Code to enable and disable Button at Runtime :-

 //button gets Disabled and Visibility of Button Remains same as in Enabled Mode.
  MY_BUTTON.IsHitTestVisible = false;
//button gets Enabled
  MY_BUTTON.IsHitTestVisible = true;





0 comments:

Post a Comment

top