custom-renderer

Outlined Textbox in Xamarin.Forms

依然范特西╮ 提交于 2020-07-16 05:47:27
问题 I want to implement material outlined textbox in Xamarin.Forms. I had created custom renderers but not able to apply style to it. I want text box like this image https://i.stack.imgur.com/7pWPr.png By creating custom renderer and inheriting from TextInputLayout displays default material textbox. https://i.stack.imgur.com/Ek9Vb.jpg 回答1: You can use Custom Renderer to custom a View which contained a material designed Entry . Create a EntryView in Forms: public class EntryView : ContentView {

Xamarin Forms content page make background color transparent

半世苍凉 提交于 2020-05-16 02:28:07
问题 I have a requirement where in I need to display a list in a modal popup page.I am able to display a list but I cant make the background color transparent or semi transparent so that the page under it is partially visible. I am pushing the page from my View Model using the folowing: NavigationParameters oNavParams = new NavigationParameters(); oNavParams.Add("Mode", "FeedBack"); oNavParams.Add("selectedItem", txtFeedback); _navigationService.NavigateAsync("PopupBox", oNavParams); Here is my

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

限于喜欢 提交于 2020-02-15 09:06:03
问题 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 saw only iOS examples (and this is not a big thing to handle in iOS custom renderer ), but no hints how to handle it ( easily ) with Android . Just to be clear, it need it for Xamarin.Forms defining similar to this (or codebehind): <ContentPage

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

你离开我真会死。 提交于 2020-02-15 09:05:49
问题 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 saw only iOS examples (and this is not a big thing to handle in iOS custom renderer ), but no hints how to handle it ( easily ) with Android . Just to be clear, it need it for Xamarin.Forms defining similar to this (or codebehind): <ContentPage

Custom renderer for PrimeFaces component works fine in Tomcat, but not in Websphere

爷,独闯天下 提交于 2020-01-14 09:28:28
问题 I'm using MyFaces 2.1.9 and PrimeFaces 3.5. I've implemented a custom renderer for <p:inputText> . This works fine at home with Tomcat. But this does not work at work with Websphere. I've placed breakpoints in the custom renderer class, but they are never hit. I see nothing in my logs as well. However, when I register the very same custom renderer on standard JSF <h:inputText> , then it works fine. I've registered it as follows in faces-config.xml : <render-kit> <renderer> <component-family

Force redraw of Xamarin.Forms View with custom renderer

久未见 提交于 2020-01-12 06:53:06
问题 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 { public static Page GetMainPage() { var button = new MyButton { Text = "Click me!", BoundaryColor = Color.Red }; button.Clicked += (sender, e) => (sender as MyButton).BoundaryColor = Color.Blue; return new ContentPage { Content = button }; } } } iOS: [assembly:ExportRenderer(typeof

Calling Naviation.PushAsync from CustomMapRenderer when clicked on a marker

妖精的绣舞 提交于 2020-01-05 04:13:10
问题 I am working on a xamarin project for ios aswel as android where we are showing custom markers on the Xamarin.Forms maps, we want the user to navigate to another view when he clicks on a custom marker. We are using Navigation.PushAsync to navigate through the views. this is done from the viewmodels from the non platform specific code, and navigation.PushAsync can only be used there and not from the platformspecific code. Wich is where the customMapRenderers are and where the onlclick for the

Xamarin forms Shadow on Frame in Android

那年仲夏 提交于 2019-12-30 08:28:33
问题 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 OnElementChanged(ElementChangedEventArgs<Frame> e) { base.OnElementChanged(e); Layer.BorderColor = UIColor.White.CGColor; Layer.CornerRadius = 10; Layer.MasksToBounds = false; Layer.ShadowOffset = new CGSize(-2, 2); Layer.ShadowRadius = 5; Layer.ShadowOpacity =

Xamarin Forms: Progressbar Height Issue in IOS

旧时模样 提交于 2019-12-25 08:49:26
问题 I have created an app using Xamarin Forms PCL project which will run on android, ios, windows 10 and windows 8.1. In it I have used a progresbar control and for increasing its height I made its custom renderer. In PCL- using Xamarin.Forms; namespace MyProject.ViewModels { public class CustomProgressbar : ProgressBar { } } In IOS- using CoreGraphics; using MyProject.iOS; using Xamarin.Forms; using Xamarin.Forms.Platform.iOS; using FISE.ViewModels; [assembly: ExportRenderer(typeof

How to register a custom renderer in JSF?

元气小坏坏 提交于 2019-12-25 01:46:45
问题 We have numerical values in our database, representing a two-value-state. Of course this would perfectly match a boolean, but oracle has no such datatype. The NUMBER(1,0) type from the database is matched to a java.lang.Short type in Java (sometimes they used a NUMBER(*,0) to represent booleans, which are matched to java.math.BigDecimal). Since it is somehow obvious, I want to offer ice:selectBooleanCheckbox in the view as a value representation and UIComponent to the user. (I use IceFaces as