Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / ItemTypeToolStripMenuItem.cs / 1 / ItemTypeToolStripMenuItem.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.Windows.Forms.Design
{
using System.Design;
using System.ComponentModel;
using System.Diagnostics;
using System;
using System.Security;
using System.Security.Permissions;
using System.ComponentModel.Design;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Design;
using System.Windows.Forms.Design.Behavior;
using System.Runtime.InteropServices;
using System.Drawing.Drawing2D;
///
/// Associates Type with ToolStripMenuItem.
///
///
internal class ItemTypeToolStripMenuItem : ToolStripMenuItem
{
private static string systemWindowsFormsNamespace = typeof(System.Windows.Forms.ToolStripItem).Namespace;
private static ToolboxItem invalidToolboxItem = new ToolboxItem();
private Type _itemType;
private bool convertTo = false;
private ToolboxItem tbxItem = invalidToolboxItem;
private Image _image = null;
public ItemTypeToolStripMenuItem(Type t)
{
this._itemType = t;
}
public Type ItemType
{
get
{
return _itemType;
}
}
public bool ConvertTo
{
get
{
return convertTo;
}
set
{
convertTo = value;
}
}
public override Image Image
{
get
{
if (_image == null)
{
_image = ToolStripDesignerUtils.GetToolboxBitmap(ItemType);
}
return _image;
}
set
{
}
}
public override string Text
{
get
{
return ToolStripDesignerUtils.GetToolboxDescription(ItemType);
}
set
{
}
}
protected override void Dispose(bool disposing)
{
if (disposing)
{
tbxItem = null;
}
base.Dispose(disposing);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TaskFactory.cs
- MULTI_QI.cs
- DirectionalLight.cs
- LabelAutomationPeer.cs
- ElementFactory.cs
- TextEditorTables.cs
- NominalTypeEliminator.cs
- SerializerWriterEventHandlers.cs
- TagPrefixInfo.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- OutputCacheSettingsSection.cs
- COAUTHINFO.cs
- ToolStripLocationCancelEventArgs.cs
- DeriveBytes.cs
- VectorConverter.cs
- AutoGeneratedField.cs
- URIFormatException.cs
- WebPartConnectionsCancelVerb.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- WindowsTab.cs
- MachineKeyConverter.cs
- SqlStatistics.cs
- DataGridRow.cs
- View.cs
- MetafileHeaderWmf.cs
- ExitEventArgs.cs
- BaseTemplateBuildProvider.cs
- AsyncDataRequest.cs
- XmlSchemaAttributeGroupRef.cs
- COSERVERINFO.cs
- ProviderCollection.cs
- SqlOuterApplyReducer.cs
- RtfControls.cs
- PathFigure.cs
- Point3DKeyFrameCollection.cs
- baseshape.cs
- ClientSettingsProvider.cs
- Query.cs
- WebBrowserBase.cs
- UpDownEvent.cs
- HttpRuntime.cs
- MessageBox.cs
- LicenseContext.cs
- WebPartConnectionsDisconnectVerb.cs
- SafeLibraryHandle.cs
- DbConnectionPoolIdentity.cs
- AsyncWaitHandle.cs
- ClientSideQueueItem.cs
- HijriCalendar.cs
- XmlSchemaValidationException.cs
- TreeNode.cs
- ColorContext.cs
- AssemblyBuilder.cs
- sqlser.cs
- EntityDataSourceDataSelection.cs
- GradientBrush.cs
- _OverlappedAsyncResult.cs
- X509IssuerSerialKeyIdentifierClause.cs
- Soap.cs
- Matrix.cs
- ButtonBaseAutomationPeer.cs
- DataGridViewColumnCollection.cs
- PowerModeChangedEventArgs.cs
- EDesignUtil.cs
- DocumentApplicationDocumentViewer.cs
- RelationshipEndCollection.cs
- PropertyDescriptor.cs
- SudsWriter.cs
- ExternalFile.cs
- PersonalizationAdministration.cs
- ContextMenuService.cs
- FormViewPagerRow.cs
- GetWinFXPath.cs
- OrderByExpression.cs
- ListItemCollection.cs
- PersistenceTypeAttribute.cs
- VirtualDirectoryMapping.cs
- EnumValAlphaComparer.cs
- TextEditorContextMenu.cs
- XPathMultyIterator.cs
- EventEntry.cs
- SelectionItemProviderWrapper.cs
- XPathAncestorIterator.cs
- TemplatingOptionsDialog.cs
- ImageAnimator.cs
- DataGridViewAutoSizeModeEventArgs.cs
- securitycriticaldata.cs
- Compiler.cs
- PackagePartCollection.cs
- EDesignUtil.cs
- Crc32Helper.cs
- DataRowExtensions.cs
- UIPermission.cs
- WindowsGrip.cs
- ThreadStaticAttribute.cs
- CqlGenerator.cs
- BindingBase.cs
- EntityDataSourceState.cs
- ElementHostAutomationPeer.cs
- TextTreeRootNode.cs