- Home
- Forum
- Xamarin.Forms
- SfButtton Trigger Padding problem
SfButtton Trigger Padding problem
Hello,
I added the trigger to the SfButton with icon. After trigger occured padding on text in button don't work.
My code:
<buttons:SfButton Grid.Row="1" Style="{StaticResource TourPageButton}"
Text="{Binding TourOne.GetName}"
ShowIcon="True"
ImageSource="clock.png"
Command="{Binding FirstTourCommand}"
IsVisible="{Binding TourOne.Enable}"
Padding="32,0,0,0">
<buttons:SfButton.Triggers>
<DataTrigger TargetType="buttons:SfButton" Binding="{Binding TourOne.IsComplete}" Value="True">
<Setter Property="BackgroundColor" Value="{StaticResource TourPageButtonBackgroundIsComplete}"/>
<Setter Property="ImageSource" Value="smile.png"/>
<Setter Property="TextColor" Value="{StaticResource TourPageButtonTextColorIsComplete}"/>
<Setter Property="Padding" Value="32,0,0,0" />
</DataTrigger>
<DataTrigger TargetType="buttons:SfButton" Binding="{Binding TourOne.FailedToComplete}" Value="True">
<Setter Property="BackgroundColor" Value="{StaticResource TourPageButtonBackgroundFailedToComplete}"/>
<Setter Property="ImageSource" Value="frown.png"/>
<Setter Property="TextColor" Value="{StaticResource TourPageButtonTextColorFailedToComplete}"/>
<Setter Property="Padding" Value="32,0,0,0" />
</DataTrigger>
</buttons:SfButton.Triggers>
</buttons:SfButton>
|
Please clear the NuGet cache, before using the latest one.
https://www.syncfusion.com/kb/6987/how-to-clear-nuget-cache |
|
Please clear the NuGet cache, before using the latest one.
https://www.syncfusion.com/kb/6987/how-to-clear-nuget-cache |
NuGet Version: 19.3.0.45
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
- 5 Replies
- 3 Participants
-
PA Pawel
- Aug 24, 2021 03:22 PM UTC
- Oct 14, 2021 11:22 AM UTC