Hi Thanh Hai Dang,
We have validated
the reported query at our end and to achieve your requirement in SfButton
control, we recommend utilizing VisualStateManager for the Button's Hovered
state at the sample level, as demonstrated in the provided code snippet, to
attain your desired functionality. When customizing the VSM at the sample
level, ensure to configure the Normal, Disabled, Hovered and Pressed states according
to your requirements. We have also created the sample based on this approach
and attached the sample for your convenience. Please review the attached file
and let us know if you have any concerns. If you need further assistance or
clarification, please don't hesitate to reach out. We are here to help!
For more
information, please refer the UG documentation link: VisualStateManager
for SfButton
Code snippet:
|
<VisualStateGroup
x:Name="CommonStates">
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="Background"
Value="Black"/>
<Setter Property="TextColor"
Value="Blue"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Hovered">
<VisualState.Setters>
<Setter Property="Background" Value="Blue"/>
<Setter Property="TextColor" Value="White"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
|
Regards,
Kamalesh P
Attachment:
ButtonSample_3093ebf5.zip