public override void ViewDidLoad () { base.ViewDidLoad (); // Configure navigation item NavigationItem.TitleView = durationView = new DurationView () { Hint = model != null ? model.GetDuration () : TimeSpan.Zero, } .Apply (Style.DurationEdit.DurationView); durationView.DurationChanged += (s, e) => Rebind (); durationView.SizeToFit (); barButtonItem = new UIBarButtonItem ( model == null ? "DurationAdd".Tr () : "DurationSet".Tr (), UIBarButtonItemStyle.Plain, OnNavigationBarRightClicked ).Apply (Style.NavLabelButton); Rebind (); }
public override void ViewDidLoad () { base.ViewDidLoad (); // Configure navigation item NavigationItem.TitleView = durationView = new DurationView () { Hint = new Duration (duration.Hours, duration.Minutes), } .Apply (Style.DurationEdit.DurationView); durationView.DurationChanged += (s, e) => Rebind (); durationView.SizeToFit (); barButtonItem = new UIBarButtonItem ( "DurationSet".Tr (), UIBarButtonItemStyle.Plain, OnNavigationBarRightClicked ).Apply (Style.NavLabelButton); Rebind (); }
public static void DurationView (DurationView v) { v.Font = UIFont.FromName ("HelveticaNeue-Thin", 32f); v.TextColor = Color.Gray; v.HighlightedTextColor = Color.Black; }