public CheckoutView() : base(null, null) { Title = "Order"; View.BackgroundColor = Consts.ColorMainBg; CreateView(); var bindingSet = this.CreateBindingSet <CheckoutView, CheckoutViewModel>(); bindingSet.Bind(_nextButton).To(x => x.NextCommand); _subscribeButtonTitleChange = ((INotifyPropertyChanged)ViewModel).WeakSubscribe <string>("NextButtonTitle", (s, e) => { _nextButton.SetTitle(CheckoutViewModel.NextButtonTitle, UIControlState.Normal); }); bindingSet.Bind(_backButton).To(x => x.BackCommand); bindingSet.Bind(_backButton).For(x => x.Hidden).To(x => x.ShowBackButton).WithConversion(new InvertBoolConvertor()); _subscribeBackbuttonShowChange = ((INotifyPropertyChanged)ViewModel).WeakSubscribe <bool>("ShowBackButton", (s, e) => { ResizeMainView(); NavigationItem.SetHidesBackButton(CheckoutViewModel.ShowBackButton, false); }); _subscribeCartChange = ((INotifyPropertyChanged)ViewModel).WeakSubscribe <Cart>("Cart", (s, e) => { UpdateTotalData(); }); bindingSet.Bind(_customerInfo).For(x => x.Hidden).To(x => x.ShowCustomerInfo).WithConversion(new InvertBoolConvertor()); bindingSet.Bind(_paymentMethods).For(x => x.Hidden).To(x => x.ShowPaymentInfo).WithConversion(new InvertBoolConvertor()); bindingSet.Bind(_shippingMethods).For(x => x.Hidden).To(x => x.ShowShippingInfo).WithConversion(new InvertBoolConvertor()); bindingSet.Apply(); }
public override void ViewDidLoad() { base.ViewDidLoad(); // Perform any additional setup after loading the view, typically from a nib. NavigationItem.SetLeftBarButtonItem(new UIBarButtonItem(Catalog.GetString("Back"), UIBarButtonItemStyle.Plain, (sender, args) => { ctrl.ButtonPressed(null); ctrl.RemoveScreen(type); }), false); if (type == ScreenType.Locations || type == ScreenType.Items) { NavigationItem.SetRightBarButtonItem(new UIBarButtonItem(Catalog.GetString("Map"), UIBarButtonItemStyle.Plain, (sender, args) => { ctrl.ButtonPressed(null); ctrl.ShowScreen(ScreenType.Map, null); }), false); } NavigationItem.LeftBarButtonItem.TintColor = Colors.NavBarButton; NavigationItem.SetHidesBackButton(false, false); // Create table view Table = new UITableView() { Source = screenListSource, AutoresizingMask = UIViewAutoresizing.All, AutosizesSubviews = true }; // Reposition and resize the receiver Table.Frame = new RectangleF(0, 0, View.Frame.Width, View.Frame.Height); // Add the table view as a subview View.AddSubview(this.Table); }
public override void ViewDidLoad() { base.ViewDidLoad(); // Perform any additional setup after loading the view, typically from a nib. // Get all commands for this object // Show back button NavigationItem.SetLeftBarButtonItem(new UIBarButtonItem(Catalog.GetString("Back"), UIBarButtonItemStyle.Plain, (sender, args) => { ctrl.ButtonPressed(null); ctrl.RemoveScreen(ScreenType.Details); }), false); NavigationItem.LeftBarButtonItem.TintColor = Colors.NavBarButton; NavigationItem.SetHidesBackButton(false, false); commands = null; targets = null; if (!(activeObject is Task)) { commands = ((Thing)activeObject).ActiveCommands; // foreach(Command c in ((Thing)obj).ActiveCommands) // commands.Add (c); } // Create view CreateViews(); }
public override void ViewDidLoad() { base.ViewDidLoad(); NavigationItem.Title = "Product"; var model = new CategoryPickerViewModel(_product); CategoryPicker.Model = model; if (isNewProduct) { //Will start in edit mode NavigationItem.SetHidesBackButton(true, true); NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Done, HandleDoneButtonPressed); categoryBoarder.Hidden = true; _product.Category = 0;//Set to first in list } else { NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Edit, HandleEditButtonPressed); nameField.Enabled = false; priceField.Enabled = false; quantityField.Enabled = false; CategoryPicker.Hidden = true; categoryBoarder.Hidden = false; nameField.Text = _product.Name; priceField.Text = _product.Price.ToString(); quantityField.Text = _product.Quantity.ToString(); categoryName.Text = Enum.GetName(typeof(ProductCategory), _product.Category); } }
public override void ViewDidLoad() { base.ViewDidLoad(); FacebookButton.TouchUpInside += FacebookButton_TouchUpInside; GoogleButton.TouchUpInside += GoogleButton_TouchUpInside; NavigationItem.SetHidesBackButton(true, false); }
public override void ViewDidAppear(bool animated) { base.ViewDidAppear(animated); ItemMap.Title = Strings.MAP; NavigationItem.SetHidesBackButton(true, false); SetStates(); }
public override void ViewDidLoad() { base.ViewDidLoad(); if (userProfile != null) { } this.NavigationItem.SetRightBarButtonItem(new UIBarButtonItem("Continue", UIBarButtonItemStyle.Plain, (sender, args) => { PleaseComplateYourProfileInfoInsertAsync(); }), true); NavigationItem.SetHidesBackButton(true, false); NavigationItem.Title = "Complete Profile"; ivUserProfilePic.UserInteractionEnabled = true; var selectivUserProfilePicTapped = new UITapGestureRecognizer(() => { ImageAttacted(); }); ivUserProfilePic.AddGestureRecognizer(selectivUserProfilePicTapped); imagePicker = new UIImagePickerController(); imagePicker.SourceType = UIImagePickerControllerSourceType.PhotoLibrary; imagePicker.MediaTypes = UIImagePickerController.AvailableMediaTypes(UIImagePickerControllerSourceType.PhotoLibrary); imagePicker.FinishedPickingMedia += Handle_FinishedPickingMedia; imagePicker.Canceled += Handle_Canceled; var g = new UITapGestureRecognizer(() => View.EndEditing(false)); g.CancelsTouchesInView = true; View.AddGestureRecognizer(g); }
public override void ViewDidLoad() { base.ViewDidLoad(); NavigationItem.SetHidesBackButton(true, false); var dosiers = dataHelper.GetDosierDatas(); jumpToNextView = (dosiers.Count == 1); if (jumpToNextView) { dataHelper.insertNewCurrentDossier(dosiers.First().DossierId); // Return to prevent table from being filled! return; } var sourceFromTablehelper = tableHelper.CreateSource(dosiers, d => d.DossierId, d => d.Name); sourceFromTablehelper.RowClicked += RowClicked_handler; tblCell.Source = sourceFromTablehelper; UIPopoverController myPopOver = new UIPopoverController(new LockScreenSettings()); // btnLockScreenSettings.TouchUpInside += (sender, e) => { // myPopOver.PopoverContentSize = new SizeF (View.Frame.Width - 30f, View.Frame.Height - 10f); // myPopOver.PresentFromRect (btnLockScreenSettings.Frame, this.View, UIPopoverArrowDirection.Up, true); // }; }
protected override void FetchDataToControl() { _vacationError.Text = string.Empty; _vacationsViewModel = FactorySingleton.Factory.Get <VacationsViewModel>(); var title = string.Empty; if (_vacationsViewModel.IsOnlineMode) { title = Localize("createVacationRequest"); } else { title = Localize("createVacationRequestOffline"); } NavigationItem.Title = title; NavigationItem.SetHidesBackButton(false, false); createButton = new UIBarButtonItem(); createButton.Title = Localize("done"); NavigationItem.RightBarButtonItem = createButton; backButton = new UIBarButtonItem(); backButton.Title = Localize("cancel_button"); NavigationItem.LeftBarButtonItem = backButton; InintAndLocalizeNewControl(); LoadFonts(); }
public override void ViewDidLoad() { base.ViewDidLoad(); NavigationController.NavigationBar.BarTintColor = UIColor.FromRGB(69, 150, 232); NavigationController.NavigationBar.TitleTextAttributes = new UIStringAttributes() { ForegroundColor = UIColor.White }; //NavigationController.NavigationItem.BackBarButtonItem.TintColor = UIColor.LightGray; NavigationItem.SetHidesBackButton(true, false); //checking for if the logout button is pressed, then set the username and password fields to empty //else, fill them with the keychain if (UserDataManager.getIsLoggedOut() == true) { UsernameText.Text = ""; PasswordText.Text = ""; UserDataManager.isLoggedOut = false; } else { UsernameText.Text = UserDataManager.UserName; PasswordText.Text = UserDataManager.Password; } }
public override void ViewDidLoad() { if (!_constructed) { return; } base.ViewDidLoad(); NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Add); NavigationItem.SetHidesBackButton(true, false); UIBarButtonItem LogoutButton = new UIBarButtonItem { Title = "Logout" }; NavigationItem.LeftBarButtonItem = LogoutButton; MvxFluentBindingDescriptionSet <JobTabView, JobTabViewModel> set = new MvxFluentBindingDescriptionSet <JobTabView, JobTabViewModel>(this); set.Bind(NavigationItem.RightBarButtonItem).To(vm => vm.NavigateToAddJobCommand); set.Bind(NavigationItem.LeftBarButtonItem).To(vm => vm.NavigateToLogoutCommand); set.Apply(); CreateTabs(); }
private void ResetBarButton(bool isParkingSummaryView) { if (isParkingSummaryView) { NavigationItem.RightBarButtonItem = btnBarExtend; if (ViewModel.Status == ParkingStatus.Rented) { NavigationItem.SetHidesBackButton(true, false); NavigationItem.LeftBarButtonItem = btnBarMenu; } } else { if (ViewModel.MapVM.HasStaredNavigation) { NavigationItem.RightBarButtonItem = btnBarOverviewResume; } else { NavigationItem.RightBarButtonItem = btnBarStart; } NavigationItem.LeftBarButtonItem = null; NavigationItem.SetHidesBackButton(false, true); } }
public override void ViewDidLoad() { base.ViewDidLoad(); // Perform any additional setup after loading the view, typically from a nib. iconLocation = Images.IconLocation; iconYouSee = Images.IconYouSee; iconInventory = Images.IconInventory; iconTask = Images.IconTask; iconPosition = Images.IconPosition; // Show back button NavigationItem.SetHidesBackButton(false, false); // Create source for table view MainScreenSource mainListSource = new MainScreenSource(this, ctrl); // Create table view Table = new UITableView() { Source = mainListSource, AutoresizingMask = UIViewAutoresizing.All, AutosizesSubviews = true }; // Set the table view to fit the width of the app. Table.SizeToFit(); // Reposition and resize the receiver Table.Frame = new RectangleF(0, 0, this.View.Frame.Width, this.View.Frame.Height); // Add the table view as a subview this.View.AddSubviews(this.Table); }
public override void SetEditing(bool editing, bool animated) { base.SetEditing(editing, animated); // Prevent navigating back in edit mode. NavigationItem.SetHidesBackButton(editing, animated); // Reload the first row to switch from "Add Item" to "Change Color" NSIndexPath indexPath = NSIndexPath.FromRowSection(0, 0); TableView.ReloadRows(new NSIndexPath[] { indexPath }, UITableViewRowAnimation.Automatic); // If moving out of edit mode, notify observers about the list color and trigger a save. if (!editing) { // Notify the document of a change. document.UpdateChangeCount(UIDocumentChangeKind.Done); MasterController.UpdateDocumentColor(DocumentURL, List.Color); TriggerNewDataForWidget(); } NavigationController.SetToolbarHidden(!editing, animated); NavigationController.Toolbar.SetItems(listToolbarItems, animated); }
public override void ViewDidLoad() { base.ViewDidLoad(); NavigationItem.SetHidesBackButton(true, false); Title = "Wsh Lst Login"; var source = new MvxBindableTableViewSource(TableView, UITableViewCellStyle.Default, new NSString("LoginView"), "{'TitleText':{'Path':'Name'}}", UITableViewCellAccessory.DisclosureIndicator); this.AddBindings(new Dictionary <object, string>() { { source, "{'ItemsSource':{'Path':'Platforms'}}" } }); source.SelectionChanged += (sender, e) => { var path = TableView.IndexPathForSelectedRow; var platform = ViewModel.Platforms [path.Row]; InvokeOnMainThread(() => TableView.DeselectRow(path, true)); ViewModel.Login(platform); }; NavigationController.ToolbarHidden = false; TableView.Source = source; TableView.ReloadData(); ViewModel.ViewController = this; }
private void ConfigureNavbarItems() { var nav = ParentViewController as UINavigationController; if (nav != null) { nav.SetToolbarHidden(ToolbarButtons == null, true); NavigationItem.RightBarButtonItem = null; NavigationItem.LeftBarButtonItem = null; if (NavbarButtons != null) { foreach (var button in NavbarButtons) { if (button.Command.CanExecute(null)) { if (button.Location == BarButtonLocation.Right) { NavigationItem.RightBarButtonItem = button; } else if (button.Location != BarButtonLocation.Back) { NavigationItem.LeftBarButtonItem = button; } else { NavigationItem.LeftBarButtonItem = button; NavigationItem.SetHidesBackButton(true, false); } } } } } }
private void OnStartPosting() { InvokeOnMainThread(() => { NavigationItem.SetHidesBackButton(true, true); NavigationItem.SetRightBarButtonItems(new[] { _postIndicatorItem }, true); }); }
public override void ViewDidAppear(bool animated) { base.ViewDidAppear(animated); // Hide the back button to prevent back-navigation just after logging-in (straightaway, w/o animation) NavigationItem.SetHidesBackButton(true, false); }
public override void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); PopulateTable(); NavigationItem.SetHidesBackButton(false, false); }
private void OnStopUpdating() { InvokeOnMainThread(() => { NavigationItem.SetHidesBackButton(false, true); NavigationItem.SetRightBarButtonItems(new[] { _updateItem }, true); }); }
public override void ViewDidLoad() { base.ViewDidLoad(); viajes = new List <Viaje>(); NavigationItem.SetHidesBackButton(true, false); NavigationController.SetNavigationBarHidden(false, true); }
public override void ViewDidLoad() { base.ViewDidLoad(); SetNavBarTitleView(); if (NavigationBarPage.HideBackButton) { NavigationItem.SetHidesBackButton(true, false); } }
public override void ViewDidLoad() { base.ViewDidLoad(); UIGraphics.BeginImageContext(this.View.Frame.Size); UIImage i = UIImage.FromFile(@"BackgroundImages/bg3.jpg"); i = i.Scale(this.View.Frame.Size); this.View.BackgroundColor = UIColor.FromPatternImage(i); ProfileButton.SetTitle(String.Format("{0}", UserDataManager.getDisplayName()), UIControlState.Normal); NavigationItem.SetHidesBackButton(true, false); }
public override void ViewDidAppear(bool animated) { base.ViewDidAppear(animated); NavigationController.SetNavigationBarHidden(false, false); NavigationItem.SetHidesBackButton(false, false); NavigationItem.Title = engine.Cartridge.Name; StartEvents(); Refresh(); }
public override void ViewDidLoad() { base.ViewDidLoad(); // Perform any additional setup after loading the view, typically from a nib. // createView (); NSNotificationCenter.DefaultCenter.AddObserver("UIKeyboardDidShowNotification", keyboardUpNotification); NavigationController.SetNavigationBarHidden(false, false); NavigationItem.SetHidesBackButton(true, false); CreateView(); }
private void HandleEditButtonPressed(object sender, EventArgs e) { NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Done, HandleDoneButtonPressed); //Hide and show UI elements NavigationItem.SetHidesBackButton(true, true); nameField.Enabled = true; priceField.Enabled = true; quantityField.Enabled = true; CategoryPicker.Hidden = false; categoryBoarder.Hidden = true; ((CategoryPickerViewModel)CategoryPicker.Model).Select(CategoryPicker, _product.Category); }
public override void ViewDidLoad() { base.ViewDidLoad(); this.NavigationItem.SetRightBarButtonItem(new UIBarButtonItem("Done", UIBarButtonItemStyle.Plain, (sender, args) => { BBIDone_Activated(); }), true); NavigationItem.SetHidesBackButton(true, false); Title = "Select Interest"; txtSuggestInterest.BecomeFirstResponder(); }
public override void ViewDidAppear(bool animated) { base.ViewDidAppear(animated); NavigationItem.SetHidesBackButton(true, false); var deliveringVC = ViewControllers[0] as DeliveringTableViewController; deliveringVC.UserId = UserId; var WaitingVC = ViewControllers[1] as WaitingTableViewController; WaitingVC.UserId = UserId; var deliveredVC = ViewControllers[2] as DeliveredTableViewController; deliveredVC.UserId = UserId; }
public void SetupNavigationBar(bool showStatusBar, bool showBackButton, bool showMenuButton = false) { NavigationController.NavigationBarHidden = !showStatusBar; this.NavigationController.ToolbarHidden = true; var navigationBar = NavigationController.NavigationBar; //navigationBar.BarStyle = ToolbarContentColor == UIColor.White ? UIBarStyle.Black : UIBarStyle.Default; //navigationBar.TintColor = ToolbarContentColor; //navigationBar.BarTintColor = ToolbarTintColor; if (!showStatusBar) { return; } var animated = true; StyleNavigationBar(navigationBar); navigationBar.ClipsToBounds = false; navigationBar.SetBackgroundImage(new UIImage(), UIBarPosition.Any, UIBarMetrics.Default); navigationBar.ShadowImage = new UIImage(); if (!showStatusBar) { return; } if (showBackButton) { var backImage = UIImage.FromBundle("ic_keyboard_arrow_left_white.png"); NavigationItem.SetLeftBarButtonItem( new UIBarButtonItem(backImage, UIBarButtonItemStyle.Bordered, (sender, args) => ViewModel.ToolbarBackCommand.Execute()), animated); } else { NavigationItem.SetHidesBackButton(true, animated); } //if (showMenuButton) //{ // var backImage = UIImage.FromBundle("ic_menu_white.png"); // NavigationItem.SetLeftBarButtonItem( // new UIBarButtonItem(backImage, UIBarButtonItemStyle.Bordered, (sender, args) => ViewModel.ToolbarBackCommand.Execute()), animated); //} }
public override void InitializeAllControls() { Title = Strings.MenuLabel; NavigationItem.SetHidesBackButton(false, false); _logoutOption = new MenuOptionView(); _settingsOption = new MenuOptionView(); CGSize profilePhotoSize = imviewProfile.Layer.PreferredFrameSize(); imviewProfile.Layer.CornerRadius = profilePhotoSize.Height / 2; imviewProfile.Layer.MasksToBounds = true; _logoutOption.Label.Text = Strings.LogoutLabel; _settingsOption.Label.Text = Strings.SettingsLabel; stviewMenuItems.AddArrangedSubview(_settingsOption); stviewMenuItems.AddArrangedSubview(_logoutOption); }