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
- DesignSurfaceManager.cs
- PnrpPeerResolverElement.cs
- ConfigsHelper.cs
- HtmlObjectListAdapter.cs
- SmtpNegotiateAuthenticationModule.cs
- ResourceDescriptionAttribute.cs
- FillErrorEventArgs.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- PointAnimationUsingPath.cs
- GACIdentityPermission.cs
- RootBrowserWindowAutomationPeer.cs
- DupHandleConnectionReader.cs
- ActionFrame.cs
- MetadataItem.cs
- ProfileSettingsCollection.cs
- _FtpControlStream.cs
- Asn1IntegerConverter.cs
- TableParaClient.cs
- XmlSchemaProviderAttribute.cs
- CompositeFontInfo.cs
- DesignerActionTextItem.cs
- SapiAttributeParser.cs
- LabelTarget.cs
- PasswordDeriveBytes.cs
- ImmComposition.cs
- FontStretches.cs
- ToolBar.cs
- RuntimeConfig.cs
- Fonts.cs
- BulletChrome.cs
- GC.cs
- GeneralTransform3DGroup.cs
- RuntimeHelpers.cs
- SqlMethodCallConverter.cs
- DetailsViewPageEventArgs.cs
- GroupPartitionExpr.cs
- SingleObjectCollection.cs
- RecognizedAudio.cs
- FormsAuthentication.cs
- WorkflowServiceBehavior.cs
- MessageTraceRecord.cs
- InvokePattern.cs
- InstancePersistenceCommand.cs
- ContentType.cs
- ProfileSection.cs
- HashCryptoHandle.cs
- NameHandler.cs
- Inline.cs
- AspNetHostingPermission.cs
- NamespaceEmitter.cs
- LicenseContext.cs
- SendActivityValidator.cs
- SmtpReplyReader.cs
- ZipIOExtraField.cs
- MenuItemBindingCollection.cs
- ControlParameter.cs
- GACIdentityPermission.cs
- RowToParametersTransformer.cs
- HwndSubclass.cs
- TripleDES.cs
- SaveFileDialog.cs
- ExtensibleClassFactory.cs
- WebRequestModulesSection.cs
- ListMarkerSourceInfo.cs
- FixUpCollection.cs
- FixedSOMTableRow.cs
- TypeRestriction.cs
- ComboBoxRenderer.cs
- InvalidOperationException.cs
- Matrix.cs
- StatusBarItem.cs
- InternalBufferOverflowException.cs
- XmlEventCache.cs
- BackgroundWorker.cs
- FieldNameLookup.cs
- WSSecurityJan2004.cs
- ConstraintConverter.cs
- ToolTipService.cs
- DataBinding.cs
- UserControlAutomationPeer.cs
- EditorPartCollection.cs
- WorkflowRuntimeServiceElement.cs
- TextEditorTables.cs
- ConstructorArgumentAttribute.cs
- followingquery.cs
- X509Certificate.cs
- DesignerProperties.cs
- odbcmetadatacollectionnames.cs
- IpcServerChannel.cs
- MimeAnyImporter.cs
- HttpCacheParams.cs
- Fx.cs
- sortedlist.cs
- OpenFileDialog.cs
- DirectionalLight.cs
- SQLDecimalStorage.cs
- _emptywebproxy.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- PropertyChangingEventArgs.cs
- CodeTypeParameterCollection.cs