public EditProfilePage(User currentUser) { Title = AppResources.EditProfile; Model = currentUser; ImagePath = null; if (!string.IsNullOrEmpty(Model.ProfileImagePath)) { ImageData imageData = AppModel.Instance.Images.Items.Find(temp => temp.ServerPath.Equals(Model.ProfileImagePath)); ImagePath = imageData != null ? imageData.ImagePath : null; } CreateUserData data = new CreateUserData { Name = currentUser.Name, Email = currentUser.Email, Password = null, UserType = currentUser.Id, Job = currentUser.Job, Phone = currentUser.Phone, ProfileImage = ImagePath }; FillUserDataView fillData = new FillUserDataView(data, AppResources.SaveProfileButton, false); fillData.Apply += OnSaveUserProfile; var layout = new ContentView { Content = fillData, Padding = new Thickness(0, 10, 0, 0) }; BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, layout, false, true); //Content = new ScrollView { Content = layout }; //Content = new ScrollView { Content = bgLayout }; Content = bgLayout; }
public SignUpView() : base() { Title = AppResources.LoginCreateUser; NavigationPage.SetHasNavigationBar(this, false); BackgroundColor = AppResources.SignUpBgColor; var layout = new StackLayout { Padding = new Thickness(0, 20, 0, 0) }; //layout.Children.Add (new Image { Source = ImageLoader.Instance.GetImage(AppResources.SignUpHeaderImage, false) }); FillUserDataView fillDataView = new FillUserDataView(new CreateUserData(), AppResources.LoginCreateUser, true); fillDataView.Apply += OnApplyData; layout.Children.Add(fillDataView); BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, layout, false, true); //Content = new ScrollView {Content = bgLayout }; Content = new ContentView { Content = bgLayout }; }