iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi
[I am using Metro template]
I have cloned the RegisterForm and RegisterFormViewModel and changed the Registerform to be a DialogBox (I need to pop up this form from a page to register users).
When completing this new form and clicking 'Create User' the password/confirmation controls display the 'This is a required field' as if the don't have a value - when they do. See attachment.
I think the issue lies with these lines which aren't fired when the form changes from UXPage to UXDialogPage
// Executes when the user navigates to this page. protected override void OnNavigatedTo(NavigationEventArgs e) { RegisterFormViewModel viewModel = this.DataContext as RegisterFormViewModel; // For security purpose, the Password value is passed directly from the UI controls // to the view model. This is done through accessor function. viewModel.RegistrationData.PasswordAccessor = () => Password_Input.Password; viewModel.RegistrationData.PasswordConfirmationAccessor = () => PasswordConfirmation_Input.Password; }
I think these lines
viewModel.RegistrationData.PasswordAccessor = () => Password_Input.Password; viewModel.RegistrationData.PasswordConfirmationAccessor = () => PasswordConfirma
aren't running.
I don't know how to make these lines run using UXDialogBox and MVVM - so I am looking to your advice - maybe there is a better way to pop up a Register User window. I have attached image of the issue.
Following is the original code in RegisterForm.xaml.cs.
After modify the RegisterForm to be a UXDialogBox, then change the above code into the following.
protected override void OnActivated() { base.OnActivated(); RegisterFormViewModel viewModel = this.DataContext as RegisterFormViewModel; // // For security purpose, the Password value is passed directly from the UI controls // // to the view model. This is done through accessor function. if (viewModel != null) { viewModel.RegistrationData.PasswordAccessor = () => Password_Input.Password; viewModel.RegistrationData.PasswordConfirmationAccessor = () => PasswordConfirmation_Input.Password; } }
I have tested the solution in my local end and it works without any issues. Please feel free to let us know if you have different result.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname