Giter Club home page Giter Club logo

plexdata.dialogs's Introduction

Plexdata Dialogs

This library represents a collection of dialog windows especially designed to be used in other WFP projects.

For the moment, this library supports two dialog windows. The first one is a replacement of the standard Windows message box. The second one is a open folder dialog window allowing to easily choose a directory.

Dialog Box

The Dialog Box represents a simple replacement of the standard Windows message box. This dialog has been implemented because of the fact that in WPF the standard Windows message box looks pretty ugly.

Examples

This example demonstrates how to show the DialogBox in the simplest possible way.

DialogBox.Show(this, message);

This example demonstrates how to show the DialogBox with a symbol and different buttons.

DialogBox.Show(this, message, DialogSymbol.Information, DialogButton.OkCancel);

This example demonstrates how to show the DialogBox with selecting a different default button.

DialogBox.Show(this, message, DialogSymbol.Error, DialogButton.YesNoCancel, DialogOption.DefaultButtonNo);

Finally note, it is also possible to provide a user-defined caption as well as to apply other options like customized button labels.

Open Folder Dialog

The Open Folder Dialog instead represents a dialog window allowing users to choose a particular directory. This dialog has been implemented because of the fact that such a dialog box does not exist in WPF.

Examples

This example demonstrates how to show the OpenFolderDialog in the simplest possible way.

OpenFolderDialog.Show(this);

This example demonstrates how to show the OpenFolderDialog with an additional message.

OpenFolderDialog.Show(this, message);

This example demonstrates how to show the OpenFolderDialog with an initial folder.

OpenFolderDialog.Show(this, new DirectoryInfo(@"C:\Users"));

Finally note, it is also possible to provide a user-defined caption as well as to provide both, a message and an initial folder.

Exception Box

The Exception Box represents a dialog window allowing users to show exceptions with more details. Main feature of this dialog box is that inner exceptions can be expanded to bring their details into view.

Examples

This example demonstrates how to show the ExceptionBox in the simplest possible way.

try
{
    throw new NotSupportedException();
}
catch (Exception exception)
{
    ExceptionBox.Show(this, exception);
}

This example demonstrates how to show the ExceptionBox with an additional message.

try
{
    throw new NotSupportedException();
}
catch (Exception exception)
{
    ExceptionBox.Show(this, exception, "An exception occurred unexpectedly.");
}

Finally please note, the caption of the dialog box can be changed as well.

Library Usage

First Way

Download the compiled library from latest release and include and reference it in your project.

Second Way

Download all sources and compile them your own way. Thereafter, include the resulting library in your projects and reference it.

plexdata.dialogs's People

Contributors

akesseler avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.