Questions tagged [custom-renderer]

Custom Renderers let developers 'override' the default native rendering behaviour in Xamarin.Forms.

From the docs:

Xamarin.Forms user interfaces are rendered using the native controls of the target platform, allowing Xamarin.Forms applications to retain the appropriate look and feel for each platform. Custom Renderers let developers 'override' this process to customize their Xamarin.Forms code on each platform.

427 questions
0
votes
0 answers

Custom effect for entry. Clear text button

I am creating a custom entry and have everything almost working correctly. On most of my entrys, the x button will show and hide when there is text or no text in the entry. However for some reason when I click on one of my entrys, it clears whatever…
cdub
  • 25
  • 1
  • 11
0
votes
0 answers

How to prevent Xamarin forms, a custom menu and WebView renderer with EvaluateJavascript from freezing?

I have created a custom menu item which appears in the default menu which pops up when selecting text on my custom WebView. On clicking on the menu item it calls EvaluateJavascript to get the selected WebView text, and then passes the text to…
HenryFive
  • 3
  • 3
0
votes
1 answer

Add bottom line in android custom renderer code?

I know the default DatePicker already has a bottom line, but I'm trying to add a bottom line to the DatePicker in the custom renderer code (for some purpose). I can set a full border of my GradientDrawable object by myGradientDrawable.SetStroke(3,…
0
votes
1 answer

Xamarin: change StatusBarColor during navigation

In the MainActivity OnCreate, I set the color of the StatusBar using: Window.SetStatusBarColor(Resources.GetColor(Resource.Color.colorPrimary)); For the specific pages, I need to set the StatusBar color trasparent. Is possible to do that in a…
doxsi
  • 1,002
  • 19
  • 42
0
votes
1 answer

Xamarin: override PushAsync on Android navigation

I my app, I create a custom navigation rendered, OnPushAsync and PopViewController are override and it works on iOS. public class NavRenderer : NavigationRenderer { protected override async Task OnPushAsync(Page…
doxsi
  • 1,002
  • 19
  • 42
0
votes
0 answers

Xamarin IoS 12 update: WKWebView custom renderer issue

I'm facing with a very weird issue with a Xamarin Forms application on IoS after the latest OS update. Basically this application uses a WebView renderer to navigate a company's intranet portal which has NTLM authentication. I implemented the web…
Saverio Guardato
  • 39
  • 1
  • 1
  • 5
0
votes
1 answer

How to execute a platform (Android) specific method within a ButtonOnClick() using a Xamarin.Forms custom renderer.

Introduction: I am starting with code from: https://github.com/xamarin/xamarin-forms-samples/tree/master/CustomRenderers/Entry/Android to study custom renderers. I am doing this because there is code that only executes on the android platform. Lets…
0
votes
1 answer

Xamarin Entry Custom Renderer FAILS to change Text Color! Why?

This test case FAILS to change the text color of a Xamarin Entry. I can change the backcolor to few specific colors??!!! Actually, no matter what I do, I can change the text color of an Entry. How to reproduce Visual Studio 2017 - Open new cross…
0
votes
0 answers

Xamarin.Forms ListView with custom renderer selects more than one row after scroll is triggered

I needed to change the color of the selected item in ListView in my Xamarin.Forms application, so I implemented a custom rendered for ViewCell. This worked as required, untill I filled my list with so many elements, that it had to be scrolled. After…
Denis Vitez
  • 608
  • 11
  • 32
0
votes
1 answer

Xamarin Forms UIBarButtonItem Custom Font

I am attempting to use a FontAwesome font in a UIBarButtonItem in a NavBar in a Xamarin Forms Project. My XAML code
tuckerjt07
  • 902
  • 1
  • 12
  • 31
0
votes
1 answer

Xamarin access property of a custom renderer from xaml

I have an ios custom render for the xamarin editor and im trying to set the Control.ScrollEnabled property to be true on some page and false on other pages. [assembly: ExportRenderer(typeof(ExtendedEditor), typeof(ExtendedEditorRenderer))] namespace…
Vibol
  • 615
  • 1
  • 8
  • 25
0
votes
0 answers

How to render views in compile time in Xamarin.Forms

I'm trying to render some controls myself in the compile time. Meaning that i'm trying to create for instance a Xamarin.Forms.Button and get it's native Windows.UI.Xaml.Control.Buttonimage (or FormsButton to be accurate)all in compile time. I was…
Adham Ali
  • 81
  • 8
0
votes
1 answer

Custom property of a custom control not being set - xamarin forms

I'm trying to create a custom entry control with EntryType property which I then use inside custom renderers to set platform specific values. But the EntryType is never set when used from Xaml. Here's my code: public class ExtendedEntry :…
0
votes
1 answer

Xamarin Custom Map Pin Renderers

Firstly I would like to disclose that I am a new developer and just starting out coding with Xamarin and C sharp. Ok. So I am creating a custom renderer for the map pin in my application. I have been using the following sample code found here:…
mikeTK
  • 11
  • 4
0
votes
0 answers

Side Menu Borders Xamarin.iOS

First I'd like to mention that I'm no professional at Xamarin. The problem I'm currently facing occured after using a custom renderer to achieve a transparent master detail page on my xamarin.ios project, after achieving this, I noticed that I now…