Image Button does not work when use click event to update BackgroundImage property

1 Answer 576 Views
Button
Allen
Top achievements
Rank 1
Iron
Iron
Allen asked on 12 Apr 2022, 01:14 PM

Hey Team, 

I did a test on Telerik Image button on windows platform used below code.


<ImageButton Grid.Row="5" Source="restbutton.png" Clicked="ImageButton_Clicked" VerticalOptions="Center" HorizontalOptions="Center" WidthRequest="100" HeightRequest="100" BorderColor="Red" />
<telerik:RadButton Grid.Row="6" BackgroundImage="restbutton.png" VerticalOptions="Center" HorizontalOptions="Center" WidthRequest="100" HeightRequest="100" Clicked="RadButton_Clicked"/>
        


        private void RadButton_Clicked(object sender, EventArgs e)
	{
		(sender as Telerik.Maui.Controls.RadButton).BackgroundImage = "focusbutton.png";
	}

	private void ImageButton_Clicked(object sender, EventArgs e)
	{
		(sender as ImageButton).Source = "focusbutton.png";
	}

I found MAUI Image button worked well but Telerik button did not work when clicked each button. you can see my zip file.

 

sdk: 6.0.200

Telerik: 0.6.0

1 Answer, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 14 Apr 2022, 06:52 AM

Hi Allen,

Thank you for the provided code. I have tested the scenario and reproduced the issue. I have logged it on your behalf in our feedback portal. Here is the link for following the item: https://feedback.telerik.com/maui/1561589-button-windows-background-image-does-not-changed-on-a-button-click 

I cannot suggest a workaround for this behavior on windows.

Regards,
Didi
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/.

Tags
Button
Asked by
Allen
Top achievements
Rank 1
Iron
Iron
Answers by
Didi
Telerik team
Share this question
or