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

Control property doesn't exist in a xamarin forms custom renderer

I'm creating a Custom renderer on android and uwp. Things go well on uwp. But when it comes to Android. The Control property doesn't get recognized it says: "The name 'Control' is not recognized in the current context". This is the code i have…
Adham Ali
  • 81
  • 8
0
votes
1 answer

How to change Color from Slider on Xamarin Mac Platform?

The default color from a Slider on Xamarin Mac project is blue, I want to change it to green, So I have made a Custom Renderer, but unfortunately, I don't what to do inside the custom renderer, How can I change the color? using…
Led Machine
  • 7,122
  • 3
  • 47
  • 49
0
votes
2 answers

Unchangeable font size in LabelCustomRenderer

I've made a Custom Renderer for a Label to display html formatted text. The problem is that unlike in Android, in IOS the text is to small and i can't find a way to change it. My code IOS [assembly:ExportRenderer(typeof(HtmlFormattedLabel),…
0
votes
1 answer

Xamarin Forms - custom renderer to centre page title in ios

In Xamarin Forms I'm trying to left align the page title, I know I need a custom renderer but I'm not sure where to go after the following code. This might not even be correct, but I think I need to create a page renderer and do the alignment…
DarkW1nter
  • 2,933
  • 11
  • 67
  • 120
0
votes
1 answer

CustomRenderer not applying

The BackgroundColor property on Xamarin.Forms.Buttons started coloring the entire area assigned to the button instead of just the button, so I started delving into the Custom Renderers in Android to see if I could fix it. The following is the class…
0
votes
1 answer

Icon with padding and rounded corners - iOS Custom Renderer for Xamarin Forms

I'm trying to create an image with rounded corners and ass 5pts of padding around the image. I've got the corners working, but the image, an icon, takes up the entire control. Some things that I've tried are: public override void…
Christine
  • 562
  • 3
  • 19
0
votes
1 answer

How to get UIButton from a Xamarin.Froms.Button?

I'm using Xamarin.Forms mixed with some native Xamarin code. Now I'd like to get a UIButton instance from a Xamarin.Forms.Button. How can I do that? In the Clicked event handler, I can see void Share_Clicked(object sender, System.EventArgs e) …
Felix
  • 2,673
  • 3
  • 30
  • 38
0
votes
1 answer

Xamarin.Forms: NavigationController is null in PageRenderer

I am trying to use PageRenderer to customize/reposition elements of ToolbarItem for iOS but here NavigationController throwing null reference exception. Below my code public class MyNavigationRenderer: PageRenderer { public new…
R15
  • 13,982
  • 14
  • 97
  • 173
0
votes
0 answers

"System.Reflection.TargetInvocationException" in Xamarin Android

Hello I am trying to build an app using Xamarin Forms which contain a Frame with an image and entry inside it. Following is my XAML
0
votes
5 answers

How to place an icon before entry in Xamarin Forms

I am working to create a login screen in Xamarin Forms and want to achieve something like this. Desired UI I have tried this using a Frame in XAML (see below)
0
votes
0 answers

How Xamarin.Forms adjusts iOS/Android native elements (auto)height/width?

This is a general question and specific one. For general purpose - to understand how XF works and specifically - for using in my custom controls. So, the thing is that I should put the elements (generated by XF for specific system (iOS or Android))…
Agat
  • 4,577
  • 2
  • 34
  • 62
0
votes
0 answers

Xamarin Forms Custom View Renderer for TextView Height issue

I want to render xamarin forms view control into android textview. Below customrenderer renders Android TextView on Android device with initial default text. Now, If I add more text into it, this control would not grow in height but instead…
Ravi Kanasagra
  • 591
  • 1
  • 8
  • 22
0
votes
1 answer

IsVisible control property handling in Xamarin Forms Custom Renderer

I have a custom control inherited from Frame. (In a nutshell, it's kind of a custom alert box which I show over the whole app content). I am using Custom Renderer to achieve this. In xaml the control is located directly on the page (among other…
Agat
  • 4,577
  • 2
  • 34
  • 62
0
votes
0 answers

zend framework 3 custom form error format

I'm currently doing some experiments with Zend forms and custom rendering and I was wondering how to handle form errors. A concrete example: let's say I want to render a fieldset with a radio element which has 3 options and only one is correct. The…
0
votes
1 answer

How to use custom renderers

I am creating a custom editor, but am not sure how to use it in xml. I tried reading tutorials online but none really explain what to use as the local variable in the xml. I tried using…
Dan
  • 1,100
  • 2
  • 13
  • 36