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

Custom renderer depending on Other controls

$
0
0

Hi Xamarin experts,

I have a question that really made me spend long time trying to figure out. I got a control for Xamarin Android called QuickAction. I am trying to make a generic shared control in PCL that exposes this QuickAction Control so I am using Custom renderer for this. The issue is this API has below method:

public void Show(Android.Views.View anchor, QuickActionAnimationStyle animationStyle = QuickActionAnimationStyle.Auto)

As you see this is tied to the android Views and not Xamarim Forms. So if I have Xamarin.Forms Button and I need on button click show this QuickAction I can not use this method as it does not accept a Xamarin Form control. Is there any way around this? I know I can create a Custom View in android project with an Android.Widget.Button and QuickAction in it and then expose this new control in my Xamarin Forms project but I don't like this as I can not easily re-use the QuickAction for other controls. Please advice. Really appreciate your support.

Regards,
Arash


Viewing all articles
Browse latest Browse all 58056

Trending Articles