Does telerik support ImageButton on MAUI project?

1 Answer 401 Views
Button
Allen
Top achievements
Rank 1
Iron
Iron
Allen asked on 07 Apr 2022, 09:47 AM

Hey Team,

Does telerik support ImageButton on MAUI project? I created a telerik button and set image as content and no text, but I saw it did not show full image.


<telerik:RadButton Grid.Row="2" 
                               ImageSource="restbutton.png"
                               Padding="0"
                               Margin="0"
                               x:Name="PrimaryTelerikCommandButton" 
                               VerticalOptions="Center"
                               WidthRequest="24"
                               HeightRequest="24"
                               HorizontalOptions="Center"
                               BackgroundColor="{DynamicResource TelerikButtonBackgroundColor}"
                               Command="{Binding ClickCommand}">
</telerik:RadButton>

you can see the Image size is 24*24.

and result like below:

 

Thanks

Allen

 

1 Answer, 1 is accepted

Sort by
0
Lance | Senior Manager Technical Support
Telerik team
answered on 07 Apr 2022, 05:11 PM

Hi Allen,

The Telerik property to use for image support is BackgroundImage (not ImageSource, which gets inherited from the platform's base object).

Try this instead and let me know how it goes:

<telerik:RadButton Grid.Row="2"
                    BackgroundImage="restbutton.png"
                    Padding="0"
                    Margin="0"
                    x:Name="PrimaryTelerikCommandButton"
                    VerticalOptions="Center"
                    WidthRequest="24"
                    HeightRequest="24"
                    HorizontalOptions="Center"
                    BackgroundColor="{DynamicResource TelerikButtonBackgroundColor}"
                    Command="{Binding ClickCommand}">
</telerik:RadButton>

Regards,
Lance | Manager Technical Support
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Allen
Top achievements
Rank 1
Iron
Iron
commented on 08 Apr 2022, 01:40 AM

Thanks Lance! It works from my side.
Tags
Button
Asked by
Allen
Top achievements
Rank 1
Iron
Iron
Answers by
Lance | Senior Manager Technical Support
Telerik team
Share this question
or