Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 23803 [details]
Sample solution that reproduces the bug
I created an app with one ContentPage containing a Label. A custom Effect is added to the Label's Effects collection. The Effect is never attached. I then created a Label subclass named MyLabel and replaced the Label with a MyLabel, and attached the same Effect. The Effect correctly attaches to the MyLabel instance.
The Effect should attach to both MyLabel and Label instances.
I checked this on Android. I did not check it on iOS or UWP.
This looks very similar to #58072 (https://bugzilla.xamarin.com/show_bug.cgi?id=58072), so I followed the advice given in that bug's comments. I deleted all /bin and /obj directories, uninstalled the app from my device, restarted Visual Studio, rebuilt the solution, and ran the app again. These steps did not resolve the issue.
# Repro steps
See the attached sample solution. The Effect renderer and MyLabel definitions are in ListItemTap.Android/Renderers.cs. The Effect usage is in MyPage.cs.
1. Run the app with MyPage.cs line 11 commented out.
2. Notice that the Effect is attached, as indicated by the Debug output line "TAG OnAttached".
3. Comment out MyPage.cs line 10 and uncomment line 11.
4. Run the app and notice that the Effect is not attached, as suggested by the "TAG OnAttached" line not being printed to the Debug output.
# Version information
Visual Studio 2017
Xamarin.Android SDK 220.127.116.11 (9dbc4c5)
Tested on a Samsung Galaxy S7 running Android 7.0
This is an issue with the new fast renderer not attaching the effect. We'll fix this.