Giter VIP home page Giter VIP logo

Comments (2)

hotz-91 avatar hotz-91 commented on June 21, 2024

Just add the Loaded Event.

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

from stein.

nkristek avatar nkristek commented on June 21, 2024

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.

from stein.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.