public void Load(FoodMarker marker) { _categoryName.Text = marker.CategoryName; _categoryName.TextColor = ControlProps.UIColors.Gray; _categoryName.Font = UIFont.FromName("Helvetica", 14f); _categoryName.TextAlignment = UITextAlignment.Center; _categoryName.LineBreakMode = UILineBreakMode.WordWrap; _categoryName.Lines = 0; _categoryName.Frame = new CGRect(0, 5f, ControlProps.Width, 0); LabelSizeCalculator.SetCenterAndHeightBasedOnText(ContainingView, _categoryName); _restaurantAddress.Text = marker.RestaurantAddress; _restaurantAddress.TextColor = ControlProps.UIColors.Gray; _restaurantAddress.Font = UIFont.FromName("Helvetica", 14f); _restaurantAddress.TextAlignment = UITextAlignment.Center; _restaurantAddress.LineBreakMode = UILineBreakMode.WordWrap; _restaurantAddress.Lines = 0; _restaurantAddress.Frame = new CGRect(0, _categoryName.Frame.GetMaxY() + 10f, ControlProps.Width, 0); LabelSizeCalculator.SetCenterAndHeightBasedOnText(ContainingView, _restaurantAddress); View.BackgroundColor = ControlProps.UIColors.Brown; View.Frame = new CGRect( 0, _parentContainer.View.Frame.GetMaxY(), ContainingView.Frame.Width, _categoryName.Frame.Height + _restaurantAddress.Frame.Height + 20f ); }
public void Load(string text) { _scrollView.Frame = new CGRect(0, 0, Width, Height); FoodNameControl.Text = text; FoodNameControl.TextColor = ControlProps.UIColors.Black; FoodNameControl.Font = UIFont.FromName("Menlo-BoldItalic", 14f); FoodNameControl.TextAlignment = UITextAlignment.Center; FoodNameControl.LineBreakMode = UILineBreakMode.WordWrap; FoodNameControl.Lines = 0; FoodNameControl.Frame = new CGRect(0, 10, 270, 0); LabelSizeCalculator.SetCenterAndHeightBasedOnText(_scrollView, FoodNameControl); }
public void Load(FoodMarker marker) { _comment.Text = marker.Comment; _comment.TextColor = ControlProps.UIColors.Black; _comment.Font = UIFont.PreferredBody; _comment.TextAlignment = UITextAlignment.Center; _comment.LineBreakMode = UILineBreakMode.WordWrap; _comment.Lines = 0; _comment.Frame = new CGRect(0, 5f, ControlProps.Width, 0); LabelSizeCalculator.SetCenterAndHeightBasedOnText(ContainingView, _comment); View.BackgroundColor = ControlProps.UIColors.Yellow; View.Frame = new CGRect( 0, _parentContainer.View.Frame.GetMaxY(), ContainingView.Frame.Width, _comment.Frame.Height + 10f ); }
public void Load(FoodMarker marker) { _fromText.Text = "from"; _fromText.TextColor = ControlProps.UIColors.Black; _fromText.Font = UIFont.FromName("Helvetica-BoldOblique", 12f); _fromText.TextAlignment = UITextAlignment.Center; _fromText.LineBreakMode = UILineBreakMode.WordWrap; _fromText.Lines = 0; _fromText.Frame = new CGRect( 0, 0, ControlProps.Width, 0 ); LabelSizeCalculator.SetCenterAndHeightBasedOnText(ContainingView, _fromText); View.Frame = new CGRect( 0, _parentContainer.View.Frame.GetMaxY(), ContainingView.Frame.Width, _fromText.Frame.Height + 10f ); }
public void Load(FoodMarker marker) { _restaurantName.Text = marker.RestaurantName; _restaurantName.TextColor = ControlProps.UIColors.Black; _restaurantName.Font = UIFont.FromName("Menlo-BoldItalic", 16f); _restaurantName.TextAlignment = UITextAlignment.Center; _restaurantName.LineBreakMode = UILineBreakMode.WordWrap; _restaurantName.Lines = 0; _restaurantName.Frame = new CGRect( 0, 0, ControlProps.Width, 0 ); LabelSizeCalculator.SetCenterAndHeightBasedOnText(ContainingView, _restaurantName); View.Frame = new CGRect( 0, _parentContainer.View.Frame.GetMaxY(), ContainingView.Frame.Width, _restaurantName.Frame.Height + 10f ); }