Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Can't create Effect on iOS Xamarin.Forms 3.0.0.482510

$
0
0

Hello,

i made a Tutorial from the eShopOnContainers eBook.
The tutorial has a subject on adding an Effect to an Entry (EntryLineColorEffect).
The whole thing worked fine until Xamarin 3.0.0.482510 came out. Since this
Version the App crashes in the Class LineColorBehavior.cs when creating an Instance of the EntryLineColorEffect(see below).
private static void OnApplyLineColorChanged(BindableObject bindable, object oldValue, object newValue)

 ''   {
        logger.Debug("OnApplyLineCOlorChanged");
        var view = bindable as View;

        if (view == null)
        {
            return;
        }

        bool hasLine = (bool)newValue;

        if (hasLine)
        {
            logger.Debug("Add EntryLineColorEffect");
            var entryLineColorEffect = new EntryLineColorEffect();
            view.Effects.Add(entryLineColorEffect);

            logger.Debug("Added EntryLineColorEffect");
        }
        else
        {
            var entryLineColorEffectToRemove = view.Effects.FirstOrDefault(e => e is EntryLineColorEffect);
            if (entryLineColorEffectToRemove != null)
            {
                view.Effects.Remove(entryLineColorEffectToRemove);
            }
        }
 ''   }

The EntryLineColorEffect class looks like that on the main Project:
public class EntryLineColorEffect : RoutingEffect
{
public EntryLineColorEffect() : base("MyProject.EntryLineColorEffect")
{
}
}
And is implemented in the particular plattform projects.
On Android everything works like before but on iOS the App stops without any hints.

The app has been terminated.
Failed to Stop app: An error occured on client IDB4100442 while executing a reply for topic xvs/idb/4.10.0.442/stop-app
The app has been terminated.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>