custom-renderer

How to set badge counter above the toolbaritem in Xamarin.Forms?

偶尔善良 提交于 2019-12-11 06:17:57
问题 I am creating an application where I need to implement a badge counter above the icon in ToolbarItem . I am creating a dependancy service for IOS and Android. I reference this URL. After implementing this I am getting a perfect result in Android, but when I try to run it on an IOS device I'm not able to use that. In that var rightButtonItems = vc?.ParentViewController?.NavigationItem?.RightBarButtonItems; always returns null so I am not able to use and set badge counter above the application.

Xamarin.Forms: Page with CSS transformations and JS swiping doesn't work in Android WebView custom renderer, when it does in Chrome

☆樱花仙子☆ 提交于 2019-12-11 05:44:47
问题 What could be the cause of a HTML page loaded over HTTPS with CSS transformations and JavaScript that uses “swiping” to not work in a Xamarin.Forms Android WebView custom renderer? The page works fine in: Chrome on Android, Xamarin.Android WebView, Xamarin.Forms WebView. Only when using a WebView custom renderer on Android according to the official tutorial does the page stop working. Specifically, it's pages like these that fail to work for some reason: https://www.irozhlas.cz/fotogalerie

CustomRenderer for UIPickerView

霸气de小男生 提交于 2019-12-11 04:48:44
问题 It is possible to make a UIPickerView always visible in place where it is defined in XAML? Standard behavior of this controls shows the binded list only when we clicked Title property, then from the bottom of the screen (iOS) or in the popup(Android) is showing a widget which contains a list as a content. I would like to make this visible from start and in the place where it is defined (not in the widget). There is no something like Position in picker object. protected override void

Xamarin Forms - How to Make iOS ListView Native Grouped Style With Headers?

我怕爱的太早我们不能终老 提交于 2019-12-10 18:45:55
问题 I have created a listview in Xamarian Forms using MVVM and binding to create a grouped listview.I would like the listview to have the UITableView Style group which is for iOS. I tried creating this via a custom renderer which I found online, but the result looks wrong as everything is gray. First we will start with the images. This is what I want the table to look like whcih I took from the native iOS version: When I add the custom renderer I get the following for the Xamarin forms version: I

How to add custom renderers to only some specific Layouts?

耗尽温柔 提交于 2019-12-08 06:35:51
问题 Let's say, I wanna change the font of the label. That means that I'll have to write something like that: [assembly: ExportRenderer(typeof(Label), typeof(LabelFontRenderer))] namespace MyApp.Droid { public class LabelFontRenderer : LabelRenderer { protected override void OnElementChanged(ElementChangedEventArgs<Label> e) { base.OnElementChanged(e); var label = (TextView)Control; // for example Typeface font = Typeface.CreateFromAsset(Forms.Context.Assets, "Roboto-Regular.ttf"); // font name

Xamarin UWP - How to get rid of border that appears when hovering over button

故事扮演 提交于 2019-12-08 04:57:02
问题 I'm working on a Xamarin.Forms mobile app. In the UWP version, when I hover over a button, a ~2px gray border appears: The problem is: when not hovering, the border goes away, leaving that amount of space now empty (or perhaps the border becomes transparent), causing the button to look slightly out of alignment with elements above it. How do I get rid of that border altogether (when hovering and not hovering)? I'm using a custom renderer ( ButtonExt : Button ), and in the default styles in

Rounded corner for Entry - Xamarin forms UWP

泄露秘密 提交于 2019-12-08 00:13:21
问题 Is there anything possible to customize the radius of Entry to having a slightly rounded corner? 回答1: You can use Custom Renderer in xamarin.forms in iOS //... using App11; using App11.iOS; using Xamarin.Forms; using Xamarin.Forms.Platform.iOS; [assembly: ExportRenderer(typeof(MyEntry), typeof(MyiOSEntry))] namespace App11.iOS { public class MyiOSEntry:EntryRenderer { protected override void OnElementChanged(ElementChangedEventArgs<Entry> e) { base.OnElementChanged(e); if (Control != null) {

Xamarin : Segmented Control for windows uwp

落花浮王杯 提交于 2019-12-07 13:59:36
问题 How can I make a custom renderer for Segmented Control in windows UWP. I followed this link to custom render the segmented control in IOS and android. But I couldn't find anything for windows UWP. Can anyone provide any resource in this or is there any alternate way of doing this similar to segmented control in windows UWP. 回答1: I found the Solution myself. I recently found a nuget package FreshEssentials. It has the implementation of segmented button group. Follow this github link to find

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

半腔热情 提交于 2019-12-06 03:41:41
问题 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 : <local:MyEntryCell Placeholder="Placeholder" PlaceholderColor="Grey" TextColor="Black"/> MyEntryCell is the custom name of my entry cell. In my PCL I have: public class MyEntryCell:Entry { } In IOS: namespace CustomEntry.IOS { public class MyEntryCellRenderer:EntryRenderer { // override onElementChanged } } In Android :

Xamarin : Segmented Control for windows uwp

倾然丶 夕夏残阳落幕 提交于 2019-12-06 03:11:24
How can I make a custom renderer for Segmented Control in windows UWP. I followed this link to custom render the segmented control in IOS and android. But I couldn't find anything for windows UWP. Can anyone provide any resource in this or is there any alternate way of doing this similar to segmented control in windows UWP. Himanshu Dwivedi I found the Solution myself. I recently found a nuget package FreshEssentials . It has the implementation of segmented button group. Follow this github link to find the implementation. It is easy to use. There is a Xamarin Forms cross platform library now