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
2
votes
2 answers

Xamarin Forms - Custom Renderer Can't Get Native Control (UWP)

I have a class called RecordProvider2. It inherits from ContentView. I want to grab an instance of the native control behind the scenes. I'm not sure what that control is on UWP, but according to this article, it should be FrameworkElement…
Christian Findlay
  • 6,770
  • 5
  • 51
  • 103
2
votes
0 answers

How to use, convert, or create 3rd party android/iOS custom controls in Xamarin Forms?

Lately I have been interested in creating custom controls for android and iOS, but also want them to be usable in Xamarin Forms. How possible is this? Does forms do some really weird stuff behind the scenes? How does it work for sizing such as in a…
Benji
  • 489
  • 2
  • 4
  • 14
2
votes
1 answer

Xamarin Forms - passing value from Xaml.cs to custom renderer

I have a page called MapPage.Xaml.cs and on that page's constructor I have an argument called bool isFireHazard. In my Custom Renderer CustomMapRenderer.cs in my Android project, I want to check that boolean to see whether it is true. How do I…
Barney Chambers
  • 2,720
  • 6
  • 42
  • 78
2
votes
0 answers

How to set Back Button Title?

I have Xamarin Forms Solution and in Xamarin Android project I would like to set back button title. However when I set it, it is not shown. On Help page I am setting back button title: [assembly: ExportRenderer(typeof(HelpPage),…
Uros
  • 2,099
  • 7
  • 23
  • 50
2
votes
1 answer

Cytoscape js create custom renderer (renderer extension)

Please can anyone help me with creation of a renderer extension for cytoscape js lib. Here is how it is working now: let CanvasRenderer = cytoscape('renderer', 'canvas'); CanvasRenderer.prototype.drawPolygonPath = function(context, x, y, width,…
2
votes
2 answers

How to enable local storage on Android WebView in Xamarin.Forms

I would like to enable HTML5 localstorage in my Xamarin.Forms app. When I deploy to an Android device I can see that the web page is erroring because localstorage is not enabled. Natively, localstorage can be enabled as follows: webview =…
Dan Cook
  • 1,935
  • 7
  • 26
  • 50
2
votes
2 answers

Xamarin Toasts plugin for WindowsPhone 8.1

I need to use toasts on Xamarin.Forms. I found Toasts.Forms.Plugin but its not for WP8.1 I was facing a lot of performance issues on WinPhone8 so I created WP8.1 project. What do I need to do to make it work on WP8.1? Can someone help me figure out…
Dushyant Bangal
  • 6,048
  • 8
  • 48
  • 80
2
votes
1 answer

Xamarin.Forms Timepicker IsVisible property vs. Custom Renderer

Within Xamarin.Forms, I use a TimePicker control to let the user pick a time for scheduling purposes. I use a custom renderer for this purpose, because I need to set the Minute Interval to e.g. 30 minutes and the 24-hour clock. This all works…
Hutjepower
  • 1,241
  • 12
  • 17
2
votes
1 answer

Override rendering with a custom renderer

I would like to override the output of the default rendering. Is there a possibility to override the handling of the tag respectively the renderer of this tag?
sofarsoghood
  • 243
  • 2
  • 16
2
votes
1 answer

Android custom component using AXML and code

I'm working on a Xamarin.Forms apps, and am finished with the Windows Phone part. However I'm having issues with the Android part of it. I use a custom element to display the home page - it is a slidable two-tab view. On Windows Phone I've solved…
fonix232
  • 2,132
  • 6
  • 39
  • 69
2
votes
3 answers

Alternating Row Colors in Xamarin Forms ListView IOS

I am trying to write a CustomRenderer that can allow a ListView to have alternating row colors. I have run into an issues and am not sure if it might be a bug or am I just not implementing the renderer correctly: My expectations for the following…
Jared Reeves
  • 1,390
  • 2
  • 15
  • 29
1
vote
1 answer

Unable to change the background color(Accent) of DatePicker widget in Xamarin Project for Android

Unable to change the background color(Accent) of DatePicker widget in Xamarin Forms Project for Android. TimePicker is working fine. Pink DatePicker Issue Correct TimePicker Color Here are the files I know to change. I've practically tried every…
1
vote
1 answer

Xamarin Custom View OnElementChanged never runs

I got a very simple application showing a VideoView, whenever I change tabs in my application it crashes because it says "View is Null", now I found a solution online making a custom renderer…
1
vote
2 answers

How to disable Predictive Back gesture while swipping left or right in Xamarin Forms Android?

In my Xamarin Forms Android application I'm trying to disable this Predictive back gesture while we swipe left or right from edge of the screen, the app will go back or forward and it messes with the swipe in my tabbed page. sometimes when we swipe…
1
vote
2 answers

How does one find information regarding the use of Handlers in Maui

Maybe I am looking at this in the wrong way but I cannot find information about what how and when to use what, to convert a (Label)renderer to (Label)handler. Let's take this example, this is what worked in Xamarin.Forms: public class…
Ramttid
  • 33
  • 5