Xamarin.forms: Platform effects aren't attached to most GTK+ based components.

Created on 19 Jul 2018  路  2Comments  路  Source: xamarin/Xamarin.Forms

Description

Platform effects aren't attached to most GTK+ based components because the effect control provider of the Element base class isn't set.

Steps to Reproduce

  1. Create a fancy GTK+ platform effect.
  2. Attach it to a label.
  3. Wonder why nothing happens.

Expected Behavior

The OnAttached() method of your effect should be called.

Actual Behavior

The OnAttached() method of your effect isn't called.

Basic Information

  • Version with issue: 3.1.0.637273
  • Last known good version: n/a
  • IDE: Visual Studio 2018

    • GTK 3.1.0.637273

Details

Effects aren't attached when the related control provider isn't set:

https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Core/Element.cs#L539

Please create the controller in any GTK+ based control. You can simply use the RegisterEffectControlProvider() method from the EffectUtilities class.

help wanted inactive gtk bug up-for-grabs

Most helpful comment

We have the same thing in our project. Platform effects aren't attached.. Could somebody help?

All 2 comments

I'm experiencing the same issue with effects in GTK, OnAttached() method is not called.

We have the same thing in our project. Platform effects aren't attached.. Could somebody help?

Was this page helpful?
0 / 5 - 0 ratings