.NET Tips and Tricks

Blog archive

Working with Infragistics NetAdvantage WinClient

I appreciate toolsets that reflect the world that I live in as a software developer. Often, it's the little things that count.

For instance, as I worked with the Infragistics NetAdvantage for .NET: Windows Client suite (reviewed in the January issue), one of the tools that I wanted to try out was its UltraMessageBoxManager. MessageBoxes may seem like a trivial tool to concentrate on but, when all you want to do is ask the user to click a button, it's easier to use a MessageBox than create a custom form. The problem is that you don't have much control over the appearance of your MessageBox -- they all look very much alike. There's also no way to centrally manage your message box settings. Every invocation of the Show method is a unique occurrence, stranded somewhere in your code.

The UltraMessageBox manager has about the same number of overloads in its Show method as the regular MessageBox but also accepts an UltraMessageBoxInfo object, which makes all the difference. The UltraMessageBoxInfo has numerous parameters that let you configure the dialog box that will be displayed and, as a result, allows you to define your MessageBoxes centrally.

You can, for instance, define a single UltraMessageBoxInfo object with some settings you want to use throughout your application. For any particular call to the Show method, you can just provide the text/caption. Alternatively, you can define in one location in your application a separate MessageBoxInfo for each dialog box you intend to display. When the time comes to display the message, you just pass the appropriate MessageBoxInfo object to the Show method.

And the UltraMessageBox gives me some additional features that the standard MessageBox does not: a header a footer, and tremendous control over the dialog's appearance. The UltraMessageBoxInfo even has a Tag property that I can use to store related information.

As I said, it's not an important part of the NetAdvantage package but it means a lot to me.

Posted by Peter Vogel on 01/12/2011


comments powered by Disqus

Featured

  • Full Stack Hands-On Development with .NET

    In the fast-paced realm of modern software development, proficiency across a full stack of technologies is not just beneficial, it's essential. Microsoft has an entire stack of open source development components in its .NET platform (formerly known as .NET Core) that can be used to build an end-to-end set of applications.

  • .NET-Centric Uno Platform Debuts 'Single Project' for 9 Targets

    "We've reduced the complexity of project files and eliminated the need for explicit NuGet package references, separate project libraries, or 'shared' projects."

  • Creating Reactive Applications in .NET

    In modern applications, data is being retrieved in asynchronous, real-time streams, as traditional pull requests where the clients asks for data from the server are becoming a thing of the past.

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

Subscribe on YouTube