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
24
votes
3 answers

Xamarin.Forms 2.5.0 and Context

Today I updated to Xamarin.Forms 2.5.0 and saw, that I get the following warnings: From the Android sub-project: Warning CS0618 'Forms.Context' is obsolete: 'Context is obsolete as of version 2.5. Please use a local context instead.' How…
testing
  • 19,681
  • 50
  • 236
  • 417
17
votes
4 answers

How to add a border to your Xamarin Form Label?

Hello fellow Xamarin Forms users, I already found out that borders on a label are not supported out of the box by Xamarin Froms. So after some searching is still have no clue how to make it possible. Is it possible to add a border using the custom…
Diceble
  • 733
  • 1
  • 7
  • 27
16
votes
2 answers

Force redraw of Xamarin.Forms View with custom renderer

I have a visual element MyButton with a custom renderer implemented for iOS. Shared: namespace RendererTest { public class MyButton: Button { public Color BoundaryColor { get; set; } } public static class App { …
Falko
  • 17,076
  • 13
  • 60
  • 105
9
votes
2 answers

ForceUpdateSize ListView issue on iOS

I have a custom ListView using custom ViewCells with radio buttons. On clicking of each of the radio buttons the ListView dynamically resizes its height to hide/show a comment box. On using ForceUpdateSize in iOS platform, the ListView performance…
Apurva19
  • 105
  • 1
  • 6
8
votes
3 answers

Xamarin forms Shadow on Frame in Android

The Frame class in Xamarin Forms is quite limited, and can't allow me to get a shadow behind the Frame. I've made a custom renderer for iOS using this code: public class RatingInfoFrameRenderer : FrameRenderer { protected override void…
Mikkel Larsen
  • 876
  • 2
  • 14
  • 26
7
votes
3 answers

Revalidating JList - custom elements

I'm using a JList to hold chat data for my chat program. It uses a custom list renderer to render a custom JPanel object as the element type. This JPanel contains two JLabels (anchored to the top, for name and time), and a JTextArea (anchored to the…
Bradley Odell
  • 1,248
  • 2
  • 15
  • 28
7
votes
2 answers

How to add ToolbarItem on the left side of NavigationBar in Xamarin.Forms on Android?

I need to have a close button (in this particular case) on the left of Navigation Bar, as below. I need it only for popups, so there is no potential issues with other elements/navigations. There are a few suggestions in Google regarding this, but I…
Agat
  • 4,577
  • 2
  • 34
  • 62
6
votes
1 answer

How to set left and right padding to an entry cell in xamarin.forms

I have used custom rendering for entry cell in xamarin forms for IOS and android. How can I set left and right padding for the entry cell. My custom entry cell in PCl :
Sumeet Manghani
  • 71
  • 1
  • 1
  • 5
6
votes
2 answers

Custom JSF component renderer: how to render HTML around another element

I have 2 elements, banana and an outputText, where banana is a custom JSF component and in banana renderer, I would like to generate HTML enclosing the specified element. xhtml:
Jacobski
  • 741
  • 6
  • 10
5
votes
1 answer

Creating JTable inside node of JTree

I know that this question is being asked before but I did not get proper solution. I read about outline but that was just opposite of what I want i.e. JTable inside JTree I want to display data in a JTable but it is stored as different groups,so…
Nav S
  • 155
  • 2
  • 12
5
votes
1 answer

Xamarin.Forms: the MultiLineLabel doesn't longer work on Android

On my Xamarin.Forms project, I use a MultiLineLabel to display a title on 1 or 2 lines, depending the text length. I'm based on this blog to achieve this. So I have a MultiLineLabel control: public class MultiLineLabel : Label { private static…
Gold.strike
  • 1,269
  • 13
  • 47
5
votes
1 answer

Xamarin Form trigger SearchCommand in SearchBar on empty string

I am using a SearchBar on XamarinForm, the problem is whenever the searchbar is empty and I press the search button, the SearchCommand won't be triggered. I tried using custom renderer on this link from xamarin forum but It does not work. public…
Daprin Wakaliana
  • 175
  • 2
  • 14
5
votes
1 answer

Custom renderer doesn't work in iOS + library

I don't know why my Xamarin.Forms custom renderer doesn't work if I put it into a library and only on iOS, somebody could help me? [assembly: ExportRenderer(typeof(HtmlLabel), typeof(HtmlLabelRenderer))] namespace Plugin.HtmlLabel.iOS { public…
5
votes
0 answers

Xamarin Forms android ToolbarItem on left

There are plenty of options & custom renderers available to move a Xamarin Forms toolbar item with Priority = 0 to left side of the navigation bar in iOS, could someone point me to a an approach for the same on Android. On a high level, I…
5
votes
2 answers

How can we handle the done button click event for a Xamarin Forms Picker?

I want to fire a click event on the Done button on a Picker in Xamarin Forms. I found some people having custom render for entry, but how can we implement the done button in a Picker on Xamarin forms iOS?
shamnad
  • 328
  • 5
  • 21
1
2 3
28 29