PropertyValueUIItem.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CommonUI / System / Drawing / Design / PropertyValueUIItem.cs / 1 / PropertyValueUIItem.cs

                            //------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

/* 
 */ 
namespace System.Drawing.Design {
 
    using System.Diagnostics;

    using Microsoft.Win32;
    using System.Collections; 
    using System.Drawing;
 
    ///  
    /// 
    ///    Provides information about the property value UI including the invoke 
    ///       handler, tool tip, and the glyph icon to be displayed on the property
    ///       browser.
    /// 
    [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name="FullTrust")] 
    [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")]
    public class PropertyValueUIItem { 
 
      /// 
      ///  
      /// The image to display for this.  Must be 8x8
      /// 
      private Image itemImage;
 
      /// 
      ///  
      /// The handler to fire if this item is double clicked. 
      /// 
      private PropertyValueUIItemInvokeHandler handler; 

      /// 
      /// 
      /// The tooltip for this item. 
      /// 
      private string tooltip; 
 
      /// 
      ///  
      /// Initiailzes a new instance of the  class.
      /// 
      public PropertyValueUIItem(Image uiItemImage, PropertyValueUIItemInvokeHandler handler, string tooltip){
            this.itemImage = uiItemImage; 
            this.handler = handler;
            if (itemImage == null) { 
               throw new ArgumentNullException("uiItemImage"); 
            }
            if (handler == null) { 
               throw new ArgumentNullException("handler");
            }
            this.tooltip = tooltip;
      } 

      ///  
      ///  
      ///    Gets or sets
      ///       the 8x8 pixel image that will be drawn on the properties window. 
      /// 
      public virtual Image Image {
          get {
            return itemImage; 
          }
      } 
 

      ///  
      /// 
      ///    Gets or sets the handler that will be raised when this item is double clicked.
      /// 
      public virtual PropertyValueUIItemInvokeHandler InvokeHandler { 
          get {
             return handler; 
          } 
      }
 
      /// 
      /// 
      ///    Gets or sets the
      ///       tool tip to display for this item. 
      /// 
      public virtual string ToolTip { 
          get { 
            return tooltip;
          } 
      }

      /// 
      ///  
      ///    Resets the UI item.
      ///  
      public virtual void Reset(){ 
      }
    } 

}

 
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK