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

How can I make sure my Xamarin.Forms iOS custom renderer of my entry uses the element's width?

In my Xamarin.Forms application I use a custom renderer for entries, since I want them to be made of a single, bottom border. The problem is that I can't find out the right code to make the custom renderer use the element's width. Currently, the…
Pine Code
  • 2,466
  • 3
  • 18
  • 43
0
votes
1 answer

Xamarin.iOS - Error processing Custom Renderer method

I've been trying to get a build archived for IOS by using Visual studio and the "Pair to mac" functionality. However, when I try and do a release build, I get this error: Error processing the method 'System.Void…
0
votes
1 answer

Element not displaying in Xamarin Forms Android custom renderer

Using Xamarin Forms custom renderers, I need to superimpose a crosshairs image on a live camera view (video). I got the iOS renderer working, it is for a BoxView. Android however is fairly new to me. So in the Android BoxView renderer I'm starting…
BillF
  • 1,034
  • 3
  • 13
  • 28
0
votes
1 answer

How to create a JTable's DefaultRenderer for the String class?

By default null values are rendered as empty strings in JTable. I'd like to have a default renderer displaying "NULL" when rendering a null value, but only for the String class. The following code works nice for the Object class and also if the…
Jörg
  • 214
  • 1
  • 9
0
votes
0 answers

Xamarin custom renderer take photo

I want to take photo using Xamarin form custom renderer. I use Custom Renderer Sample and I add a Button named 'btnTakePicture' in Xaml , but I don't have any idea how to take photo on Button click event. I want to show camera in part of…
Hossein
  • 17
  • 3
0
votes
1 answer

How to set Xamarin.Forms Elements BindableProperties from a Custom Renderer?

I have been trying to set a bindable property value in my Element from my native control through a custom renderer. My native control is a view (painview) where you can draw and I am trying to get the drawing and set it, as a base64 string, to a…
0
votes
1 answer

Android custom renderer being disposed but i don't want it to be

I'm having difficulties understanding how renderers work on Android side. I'm trying to implement a MasterDetail page in my app. It should work on old devices, so I'm creating my pages during the application start, store them and switch Detail to…
0
votes
1 answer

How to activate darkmode for the text changed in WkWebViewRenderer?

I was trying to resize the text in a webView in Xamarin.iOS with a webView-renderer. It works, but my problem is that the dark mode does not work anymore. I have already changed the background of the web view, so it is shown right, but I don't know…
M_B
  • 49
  • 7
0
votes
1 answer

How to customize and display the round icon on click of bottom tab

I am working on bottom tabs in xamarin forms. I am looking for a sample application in xamarin forms for bottom tabs same as the in the video provided for android. https://www.youtube.com/watch?v=Tz_il-BMaD0 Could anybody please help me with this…
user1448108
  • 467
  • 2
  • 10
  • 28
0
votes
1 answer

How to get the image width of the button image in a custom renderer?

I need to get the actual size of the image in my button renderer class. I need to get it in the OnElementChanged method from the variable e.NewElement. I have tried to get it from e.NewElement.ImageSource, but it does not have a property width or…
0
votes
1 answer

How to run async methods inside OnElementChanged method in a custom renderer

I need to run an async method in a custom renderer inside the OnElementChanged method; however, this method does not have an async signature. What's the recommended way to do async here? Is this method simply an event handler and can we modify the…
user246392
  • 2,661
  • 11
  • 54
  • 96
0
votes
2 answers

Coners of Custom Frame are getting trimmed in Xamarin forms iOS

I have created a custom renderer for a frame to have rounded corners only on 2 sides. The code works fine in Android but in iOS the rounded corners are getting trimmed if the background color of frame is white and border color is blue like below…
Mars
  • 269
  • 1
  • 3
  • 22
0
votes
2 answers

Xamarin Custom Progressbar renderer problem

I created a new custom renderer that seems to work, but when I am scrolling up or down something strange happens with the settings. As you can see in the photos, the size of the ProgressBar changes. It happens only on iOS. On Android everything is…
0
votes
1 answer

Do A on tabbedpage children button click, do B when the same button is pressed for x seconds

I have spent my recent hours on researching on how to make this possible I have a bottom tabbed page with a home button. What I want to achieve is, when button is pressed for x seconds, a new page shall be opened. How should the custom renderer for…
Gullit
  • 139
  • 8
0
votes
1 answer

ScrollView bar Custom Renderer Color

Trying to change the color of the ScrollView bar. I found this link here but I would prefer to write a custom renderer as I have with all my other controls: Color of ScrollBar in ScrollView The problem is, I can't find any property/method that has…
David Andrew Thorpe
  • 838
  • 1
  • 9
  • 23