Skip to content
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

Show welcome view at first application start #27

Closed
nkristek opened this issue Mar 29, 2019 · 2 comments · Fixed by #32
Closed

Show welcome view at first application start #27

nkristek opened this issue Mar 29, 2019 · 2 comments · Fixed by #32

Comments

@nkristek
Copy link
Owner

Show a view explaining the features etc. when the application is first launched.

@hotz-91
Copy link

hotz-91 commented Apr 7, 2019

Just add the Loaded Event.

   private void Window_Loaded(object sender, RoutedEventArgs e)
    {
        MessageBox.Show("Welcom");
    }

@nkristek
Copy link
Owner Author

nkristek commented Apr 7, 2019

Thank you for your comment.
As a welcome dialog I thought more of a dialog explaining what you can do with Stein, maybe add the first installer source (normally done by the + button), etc.
I really tried to get away from showing small dialogs via MessageBox.Show simply because it doesn't support any theming and generally looks a bit off. Also they only support showing text with an optional icon (info, error, alert, etc.) and you can't select text in those dialogs.
An example, on how I would like the welcome dialog to be implemented, would be the dialog for showing exceptions.
I made a custom dialog which allows for the text to be selected, has a copy button which automatically copies the contents in the clipboard, supports theming and allows changes to the layout if needed.

Relevant files/lines of the ExceptionDialog are:

Now you can show an exception like this.

var exceptionDialogModel = viewModelService.CreateViewModel<ExceptionDialogModel>(null, exception);
var dialogResult = dialogService.ShowDialog(exceptionDialogModel);

This would imply creating/modifying:

  • create WelcomeDialog.xaml + WelcomeDialog.xaml.cs
  • modify Views.xaml: add entry for WelcomeDialog
  • create WelcomeDialogModel.cs
  • modify ViewModelService.cs: add case for WelcomeDialogModel in CreateViewModel
  • optionally create Commands for extra functionality
  • modify App.xaml.cs: show dialog, when the configuration fails to load (here)

I just thought this would be a great issue for anybody which wants to contribute, since it doesn't involve the installer file handling, which is a bit difficult.

nkristek added a commit that referenced this issue Apr 19, 2019
nkristek added a commit that referenced this issue Apr 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants