コード例 #1
0
        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 ();
        }
コード例 #2
0
        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 ();
        }
コード例 #3
0
ファイル: Style.DurationEdit.cs プロジェクト: jblj/mobile
 public static void DurationView (DurationView v)
 {
     v.Font = UIFont.FromName ("HelveticaNeue-Thin", 32f);
     v.TextColor = Color.Gray;
     v.HighlightedTextColor = Color.Black;
 }