-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 'Remember' CheckBox to the LoginDialog #2308
Add 'Remember' CheckBox to the LoginDialog #2308
Conversation
} | ||
|
||
public class LoginDialogData | ||
{ | ||
public string Username { get; set; } | ||
public string Password { get; set; } | ||
public bool Remember { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change the name of this property to a more boolean-sounding
name. I would suggest something like IsRememberRequested, RequestRemember. This is because the developer might be confused because it might understand that MahApps does remember the state of the dialog.
Another possibility would be to add a documentation tag to the property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think ShouldRemember
is better since it's a request to the caller to persist the data.
Additionally I'd suggest to make all setters of LoginDialogData
internal
. There's no need to set these properties outside of MahApps.Metro.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I was also thinking about ShouldRemember
as alternative to Remember
. It is more explicit.
Totally agree on suggested internal
improvement.
Made all property setters of LoginDialogData internal.
…e-LoginDialog Add 'Remember' CheckBox to the LoginDialog
…e-LoginDialog Add 'Remember' CheckBox to the LoginDialog (reverted from commit cded951)
This adds a "Remember ..." checkbox to the
LoginDialog
. Reference feature #2305.To keep backward compatibility the
Checkbox
isCollapsed
by default.The default text for
Checkbox
equals to "Remember".