dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.18k stars 1.74k forks source link

Custom handler/behavior doesn't work right inside custom controls. #23417

Open NanthiniMahalingam opened 3 months ago

NanthiniMahalingam commented 3 months ago

Description

Creating a custom button with a custom button handler and then adding this custom button inside a custom control. The custom button handler is expected to provide specific functionality when the button is interacted with. However, the custom button handler does not work as expected when the custom button is placed inside the custom control. The same custom button handler works correctly when the custom button is used directly within a standard control (e.g., a standard container or layout).

Steps to Reproduce

  1. Here we attached the sample.
  2. Download the sample.
  3. Open and Deploy the solution.
  4. Expected result: Custom tint behavior should work for the button inside custom control.
  5. Actual result: Custom tint behavior not works when its under custom control, the custom handlers not trigged.

Link to public reproduction project repository

https://github.com/Saravanan-Madhesh/CustomBehavior_MAUI

Version with bug

Unknown/Other

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows, macOS

Affected platform versions

No response

Did you find any workaround?

No

Relevant log output

No response

github-actions[bot] commented 3 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Zhanglirong-Winnie commented 3 months ago

This issue has been verified using Visual Studio 17.11.0 Preview 2.1(8.0.61 & 8.0.40). Can repro on all platforms.