theme IOS xamarin form ALL IS grey black

xardalodinxardalodin Member ✭✭

In android I can set styles and customize ALOT
how do I do this in IOS.
everything is dull and gray.
tried adding to app in xaml but did nothing..

Tagged:

Best Answer

Answers

  • ColeXColeX Member, Xamarin Team Xamurai
    edited June 18

    Are you developing Xamarin.Forms or Xamarin.iOS ?

    If XF : create your own resource dictionary themes in App.xaml
    refer https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/themes/custom

    If Xi : use UIAppearance class
    check https://forums.xamarin.com/discussion/comment/191948/#Comment_191948

  • xardalodinxardalodin Member ✭✭
    edited June 18

    Severity Code Description Project Path File Line Suppression State
    Error Can't resolve the reference 'System.Void Xamarin.Forms.Log::Warning(System.String,System.String)', referenced from the method 'System.Void Xamarin.Forms.Pages.BaseDataSource/d__22::MoveNext()' in 'Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Template.iOS

    nuget packages
    Xamarin.Forms.Theme.Base
    Xamarin.Forms.Theme.Dark

    in app.xaml added
    xmlns:dark="clr-namespace:Xamarin.Forms.Themes;assembly=Xamarin.Forms.Theme.Dark"`

    <Application.Resources>
            <ResourceDictionary MergedWith="dark:DarkThemeResources" />  this line 
     </Application.Resources>
    

    this line generates the error above.. crashing the core of xamarin

    and I'am using Xamarin forms..

    and

    "<ResourceDictionary>" does nothing

    and cant find a page with everything one could change in <ResourceDictionary>

    do you know how to set the background picture of the actionbar/taskbar the one at the top

  • xardalodinxardalodin Member ✭✭

    thx
    was using
    UINavigationBar.Appearance.BarTintColor = UIColor.FromPatternImage(UIImage.FromBundle("actionbar3.png"));
    Iam new to IOS..
    so much to READ...

    using a 
        [assembly: ExportRenderer(typeof(ExtendedViewCell), typeof(ExtendedViewCellRenderer))]
        namespace Template.iOS
        {
            public class ExtendedViewCellRenderer: ViewCellRenderer
            {
                public override UITableViewCell GetCell(Cell item, UITableViewCell reusableCell, UITableView tv)
                {
                    var cell = base.GetCell(item, reusableCell, tv);
                    var view = item as ExtendedViewCell;
                    cell.SelectedBackgroundView = new UIView
                    {
                        BackgroundColor = view.SelectedBackgroundColor.ToUIColor(),
                    };
    
                    return cell;
                }
    
            }
    

    to change the color of the listviews select in Xaml , IS there a better way? bit extream

    mmm UIView.Appearance.TintColor gona see what this does..

  • ColeXColeX Member, Xamarin Team Xamurai

    I suggest you not use Appearance for this .

    Since UIView.Appearance.TintColor would affect all the UIView in your project , but here you just want to change cell.SelectedBackgroundView.

  • xardalodinxardalodin Member ✭✭

    cell.SelectedBackgroundView

    cant find it? its not in cell anywhere

    UITableView.Appearance.SectionIndexColor = UIColor.Green;
    UITableView.Appearance.SectionIndexBackgroundColor =
    UITableView.Appearance.SectionIndexTrackingBackgroundColor = UIColor.Green;
    UITableView.Appearance.BackgroundColor = UIColor.Green;
    UITableViewCell.Appearance.BackgroundColor = UIColor.Green;
    UITableViewCell.Appearance.TintColor = UIColor.Green;

    not working..

    only way seams to be via the code above

    cell only gives me the xamarin.forms Cell could be a conflict should be called xCell

  • ColeXColeX Member, Xamarin Team Xamurai

    I'm afraid you have to use custom renderer .

  • hydrogenhydrogen Member ✭✭

    Ich habe auch für Sie eine sehr interessante Werbung. Für Apple-Besitzer, Android- und Online-Casino-Liebhaber ist jetzt eine neue mobile Anwendung für Sie verfügbar.. Es ist in der Tat sehr praktisch, denn jetzt können Sie direkt im Auto spielen. Wenn Sie mehr Informationen wünschen, lesen Sie bitte diesen Artikel https://www.tuningblog.eu/kategorien/tipps_tuev-dekra-u-co/online-casinos-autotechnik-216961/

Sign In or Register to comment.