c# - Icon color remains blue on IOS toolbar xamarin.forms -
i have used red icon on toolbar
, still remains in color blue it's default. how can change color red. because icon's color red. how can tackle please.
below image :
and xaml code :
<?xml version="1.0" encoding="utf-8"?> <contentpage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" icon ="nav_icon.png" title="ea " x:class="eamobiledirectory.masterpage"> <stacklayout> <image source="featured_newline_1.png" margin="0,1,0,0"/> <listview x:name="listview" margin="0,10,0,0" verticaloptions="fillandexpand" separatorvisibility="none"> <listview.itemtemplate> <datatemplate> <imagecell text="{binding title}" imagesource="{binding iconsource}" /> </datatemplate> </listview.itemtemplate> </listview> </stacklayout> </contentpage>
i have changed appdelegate.cs file according @steven below code changed:
[register("appdelegate")] public partial class appdelegate : global::xamarin.forms.platform.ios.formsapplicationdelegate { public override bool finishedlaunching(uiapplication app, nsdictionary options) { global::xamarin.forms.forms.init(); loadapplication(new app()); uitoolbar.appearance.tintcolor = uicolor.red; uitoolbar.appearance.bartintcolor = uicolor.green; return base.finishedlaunching(app, options); } }
this due tintcolor
property taking on over ios. enables provide images in every color want , using tintcolor
can color them in color. change try adding lines in appdelegate.cs
:
uinavigationbar.appearance.tintcolor = uicolor.red;
this style icons each uinavigationbar in app.
Comments
Post a Comment