custom-renderer

How to make a progress bar with rounded corners in Xamarin Forms using Custom Renderer

萝らか妹 提交于 2019-11-27 22:51:33
问题 I want to display progress bar with rounded corners in Xamarin forms. I was able to do it in iOS using a custom renderer: class CustomProgressBarRenderer: ProgressBarRenderer { protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.ProgressBar> e) { base.OnElementChanged(e); Control.ProgressTintColor = Color.FromRgb(255, 201, 74).ToUIColor(); } public override void LayoutSubviews() { base.LayoutSubviews(); var X = 1.0f; var Y = 7.0f; CGAffineTransform transform =