public override void ViewDidLoad() { base.ViewDidLoad(); recipes = DataLoader.GetRecipes(); var toolbarBg = FoodyTheme.SharedTheme.ToolbarBackgroundForSplitView(true); ToolbarBottom.SetBackgroundImage(toolbarBg, UIToolbarPosition.Bottom, UIBarMetrics.Default); var navbarBg = FoodyTheme.SharedTheme.NavigationBackgroundForSplitView(true); NavigationController.NavigationBar.SetBackgroundImage(navbarBg, UIBarMetrics.Default); DishTableView.WeakDelegate = this; DishTableView.WeakDataSource = this; DishTableView.BackgroundColor = UIColor.Clear; DishTableView.SeparatorStyle = UITableViewCellSeparatorStyle.None; var label = new UILabel(); label.BackgroundColor = UIColor.Clear; label.Font = UIFont.SystemFontOfSize(20); label.ShadowColor = UIColor.Black; label.TextAlignment = UITextAlignment.Center; label.TextColor = UIColor.White; NavigationItem.TitleView = label; label.Text = "Dishes"; label.SizeToFit(); FoodyTheme.Apply(View); }
public override void ViewDidLoad() { base.ViewDidLoad(); var toolbarBg = FoodyTheme.SharedTheme.NavigationBackgroundForSplitView(); Toolbar.SetBackgroundImage(toolbarBg, UIToolbarPosition.Any, UIBarMetrics.Default); var bottomToolbarBg = FoodyTheme.SharedTheme.ToolbarBackgroundForSplitView(); BottomToolbar.SetBackgroundImage(bottomToolbarBg, UIToolbarPosition.Bottom, UIBarMetrics.Default); ingredientsController = new IngredientsTableVIewController(UITableViewStyle.Plain); IngredientsTableView.WeakDataSource = ingredientsController; IngredientsTableView.WeakDelegate = ingredientsController; IngredientsTableView.SeparatorColor = UIColor.Clear; IngredientsTableView.SeparatorStyle = UITableViewCellSeparatorStyle.None; stepsController = new StepsTableVIewController(UITableViewStyle.Plain); StepsTableView.WeakDataSource = stepsController; StepsTableView.WeakDelegate = stepsController; FoodyTheme.Apply(View); ViewsContainer.Hidden = true; }
public override void ViewDidLoad() { base.ViewDidLoad(); recipe = DataLoader.GetRecipes() [0]; StepsTableView.WeakDelegate = this; StepsTableView.WeakDataSource = this; StepsTableView.BackgroundColor = UIColor.Clear; StepsTableView.SeparatorStyle = UITableViewCellSeparatorStyle.None; FoodyTheme.Apply(View); Title = "Steps"; }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { FoodyTheme.Apply(); UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false); var idiom = UIDevice.CurrentDevice.UserInterfaceIdiom; if (idiom == UIUserInterfaceIdiom.Phone) { PhoneInit(); } else { PadInit(); } return(true); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); FoodyTheme.Apply(); UIWindow window; UIViewController root; root = new UIViewController(); Page2 vc1; CardView cardviews; // You must set your senderId and display name LoadApplication(new App()); UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false); UIApplication.SharedApplication.SetStatusBarHidden(false, UIStatusBarAnimation.Slide); return(base.FinishedLaunching(app, options)); }
public override void ViewDidLoad() { base.ViewDidLoad(); agreeButton = GetButton(new CGRect(105, 155, 110, 45), FoodyTheme.SharedTheme.ButtonImage, "Agree"); agreeButton.TouchUpInside += HandleAgreeTouchUpInside; View.AddSubview(agreeButton); disagreeButton = GetButton(new CGRect(105, 215, 110, 45), FoodyTheme.SharedTheme.ButtonImage, "Disagree"); disagreeButton.TouchUpInside += HandleDisagreeTouchUpInside; View.AddSubview(disagreeButton); FoodyTheme.Apply(View); // Perform any additional setup after loading the view, typically from a nib. }
public override void ViewDidLoad() { base.ViewDidLoad(); FoodyTheme.Apply(View); var edit = new UIBarButtonItem("Edit", UIBarButtonItemStyle.Bordered, null, null); NavigationItem.SetRightBarButtonItem(edit, false); btnAction = new UIButton(UIButtonType.Custom); btnAction.SetBackgroundImage(FoodyTheme.SharedTheme.ButtonImage, UIControlState.Normal); btnAction.SetTitle("Press me!", UIControlState.Normal); btnAction.Frame = new CGRect(0, 0, 200, 40); btnAction.TouchUpInside += HandleTouchUpInside; btnAction.Center = ScrollView.Center; ScrollView.AddSubview(btnAction); TableSteps.WeakDelegate = this; TableSteps.WeakDataSource = this; }
public override void ViewDidLoad() { base.ViewDidLoad(); normalButton = GetButton(new CGRect(10, 120, 295, 48), FoodyTheme.SharedTheme.ButtonImage, "Standard Button"); View.AddSubview(normalButton); pressedButton = GetButton(new CGRect(10, 190, 295, 48), FoodyTheme.SharedTheme.PressedButtonImage, "Button Pressed"); View.AddSubview(pressedButton); label = new UILabel(new CGRect(15, 40, 400, 30)); FoodyTheme.Apply(label); label.Text = "Label"; View.AddSubview(label); var paddingView = new UIView(new CGRect(0, 0, 5, 20)); TextField.LeftView = paddingView; TextField.LeftViewMode = UITextFieldViewMode.Always; TextField.ShouldReturn = TextFieldShouldReturn; TextField.Background = FoodyTheme.SharedTheme.TextFieldBackground; progress = new UIProgressView(new CGRect(13, 300, 292, 10)); progress.Progress = 0.5f; View.AddSubview(progress); slider = new UISlider(new CGRect(10, 330, 298, 10)); slider.Value = 0.5f; slider.ValueChanged += HandleValueChanged; View.AddSubview(slider); FoodyTheme.Apply(View); }