.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 at 1:16 PM


comments powered by Disqus

Featured

  • Microsoft's Tools to Fight Solorigate Attack Are Now Open Source

    Microsoft open sourced homegrown tools it used to check its systems for code related to the recent massive breach of supply chains that the company has named Solorigate.

  • Microsoft's Lander on Blazor Desktop: 'I Don't See a Grand Unified App Model in the Future'

    For all of the talk of unifying the disparate ecosystem of Microsoft-centric developer tooling -- using one framework for apps of all types on all platforms -- Blazor Desktop is not the answer. There isn't one.

  • Firm Automates Legacy Web Forms-to-ASP.NET Core Conversions

    Migration technology uses the Angular web framework and Progress Kendo UI user interface elements to convert ASP.NET Web Forms client code to HTML and CSS, with application business logic converted automatically to ASP.NET Core.

  • New TypeScript 4.2 Tweaks Include Project Explainer

    Microsoft shipped TypeScript 4.2 -- the regular quarterly update to the open source programming language that improves JavaScript with static types -- with a host of tweaks including a way to explain why files are included in a project.

Upcoming Events