Creating an Object Model for a Windows Application - Part 1
page 6 of 11
by Brian Mains
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 38919/ 81

Tool Windows

Tool windows are a very similar approach; however, they are a little different.  Tool windows can be featured in different areas of the applications.  Tool windows can be in the left, right, and bottom sides of the screen.  This is handled through the tool window collection constructor, using an enumeration that specifies the location that the collection represents:

Listing 6

public ToolWindowCollection(ToolWindow.LocationType location)
{
  _location = location;
}

Because a tool window is in a specific region, the tool window has to be in an area defined by the location type.  Is it possible through this approach, to move the location?  For each property, there is a detection of that property change.  For instance, in the Title property of the UIElement class, is the following in the setter:

Listing 7

if (string.Compare(_title, valueCheck, StringComparison.CurrentCulture) != 0)
{
  string oldValue = _title;
  _title = value;
  this.OnPropertyChanged(new PropertyChangedEventArgs("Title", oldValue, value));
}

This statement broadcasts a property change whenever the value changes or the title changes.  This works for all the properties, and is similar to the property change notification for certain windows components.  This can also work to change the location of a toolbar (say from left to right, in response to dragging the window).


View Entire Article

User Comments

Title: good article   
Name: RangaswmyR
Date: 2008-01-25 4:41:03 AM
Comment:
This artical gives the best learning knowledge and it is very use full for creating and developing of a window form application and according to knowledge wise it is very use full to identified the controles which are usead to devlope a login page for any web sites.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-05-02 6:05:44 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search