Browse by Tags

All Tags » Windows (RSS)
I remember reading about an approach to create an Object-Oriented API for an application, similar to Visual Studio, using documents, tool windows, menu items, and other objects. The approach was to create events for each transaction and have these events...
Posted by bmains | with no comments
I thought that wrapping text in a datagridview would be a problem, but it turned out to be really simple. All you have to do is to change a setting in the DefaultCellStyle. This property represents a style of the cell, and has a WrapMode object, which...
Posted by bmains | with no comments
Filed under:
I've been working with the combobox, and it appears that the FlatStyle property has some bugs in how it renders the combobox. When setting the property to FlatStyle.Flat, it doesn't render correctly when using anchoring to resize the item; instead...
Posted by bmains | 1 comment(s)
Filed under:
.NET 2.0 has a WebBrowser control for windows development. Using this control, you can request and view HTML content parsed as you would see it in IE or Firefox. It's really simple to use; pass a Uri to the Navigate method, and it navigates to both...
Posted by bmains | 7 comment(s)
Filed under:
When using generics, and you get an error "Given Expression is Never of <X> Type", it is usually how it is assigned. For example, I was trying to do this: public IInterface<T> CreateProvider<T>() { if (typeof(T) is ObjectA...
Posted by bmains | with no comments
Recently, I've been seeing the value of application frameworks, like the Membership and Roles frameworks. Having the capabilities for your application, custom controls, and other objects to work together through a common API, components working together...
Posted by bmains | with no comments
IFormattable is an interface that defines a version of a ToString method that include a format, and a format provider, if necessary. Within the method is a series of if statements, determining whether the format provide is null. If it isn't, it gets an...
Posted by bmains | with no comments
Filed under: ,
I had a custom control that I was using to render a series of text; however, it had a marking container on the side that you can click to mark a "verse" (the business object) in the collection of verses. The collection that I use can be cast to IEnumerable...
Posted by bmains | with no comments
Filed under:
What about the common functionality, like Quitting? The Manager static class has a Quit method. When called, it invokes the OnQuitting method, to see if any class or other object still needs to use the application; for instance, if the user is still editing...
Posted by bmains | with no comments
Filed under:
Each of the object model items, Menu, MenuItem, Document, Toolbar, and ToolbarItem, maps directly to a UI element. When is it created? The win form that renders the UI attaches to the appropriate object model events, Menus_On<Event>, Documents_On<Event>...
Posted by bmains | with no comments
Filed under:
Windows applications are event-driven. Events notify other objects of some action. For instance, when a MenuItem wants to be clicked, it raises the OnClick event. Anything that needs to work with the menu item can catch this event, and perform its work...
Posted by bmains | with no comments
Filed under:
A while ago, I came across an article called Implementing a Word-Like Object Model for your .NET Framework Application , by Omar AL Zabir. I was very intrigued; this was a great way to create an object model. However, I wanted to create something more...
Posted by bmains | with no comments
Filed under:
CAB has a special way to deal with UI elements in applications. It has a means to register certain UI elements, which you can then reference them by name. Why is that more beneficial? Let's take a look at how you can register a ToolStripMenuItem in a...
Error handling in a CAB application can be tricky. Because the ModuleLoaderService loads the CAB application, if there is an error that isn't handled in the application, the ModuleLoaderService throws an error, effectively hiding the true error in the...
In the Composite UI Application Block, the windows application that is the host uses a class to run the project. In C#, this is the default setup for a windows application; it includes a Program.cs file that runs the default form. This is a great setup...
More Posts Next page »
The leading UI suite for ASP.NET - Telerik radControls
Outstanding performance. Full ASP.NET AJAX support. Nearly codeless development.