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
- AnnouncementEndpoint.cs
- CompatibleIComparer.cs
- NameValueSectionHandler.cs
- PolicyLevel.cs
- BlurEffect.cs
- WebPartExportVerb.cs
- DBProviderConfigurationHandler.cs
- ApplicationServiceHelper.cs
- GlobalEventManager.cs
- TypedTableBase.cs
- BaseDataList.cs
- Comparer.cs
- CollectionEditor.cs
- DependencyObjectProvider.cs
- XmlNodeComparer.cs
- InstanceDataCollection.cs
- DispatcherProcessingDisabled.cs
- CodeArgumentReferenceExpression.cs
- PackageRelationshipSelector.cs
- PersistenceMetadataNamespace.cs
- Substitution.cs
- brushes.cs
- SystemNetworkInterface.cs
- ToolboxItem.cs
- CacheEntry.cs
- ClientOptions.cs
- UTF8Encoding.cs
- PlatformCulture.cs
- ImageClickEventArgs.cs
- ItemsPanelTemplate.cs
- RightsManagementEncryptedStream.cs
- DbException.cs
- IndexedString.cs
- ImageConverter.cs
- NavigationWindow.cs
- PartialClassGenerationTaskInternal.cs
- FixedPageStructure.cs
- QueuedDeliveryRequirementsMode.cs
- HwndSourceParameters.cs
- DictionarySurrogate.cs
- ObjectReaderCompiler.cs
- WsatServiceAddress.cs
- DataListItemEventArgs.cs
- FixedPageStructure.cs
- XamlStackWriter.cs
- PropVariant.cs
- Attributes.cs
- WorkflowApplicationCompletedEventArgs.cs
- ObjectManager.cs
- TimerEventSubscription.cs
- CachingHintValidation.cs
- DataServiceQuery.cs
- QilValidationVisitor.cs
- WpfGeneratedKnownProperties.cs
- GrammarBuilderBase.cs
- Function.cs
- SplitContainer.cs
- QueryableFilterUserControl.cs
- Range.cs
- ScriptReferenceEventArgs.cs
- SSmlParser.cs
- StatusStrip.cs
- TextBoxLine.cs
- SqlClientPermission.cs
- RawUIStateInputReport.cs
- EtwTrace.cs
- TableLayoutSettings.cs
- And.cs
- ProcessThread.cs
- FunctionImportElement.cs
- EventLogEntry.cs
- ReachFixedDocumentSerializerAsync.cs
- LoginDesignerUtil.cs
- DataGridViewTopRowAccessibleObject.cs
- Size.cs
- EventDescriptorCollection.cs
- AnimationLayer.cs
- SendMailErrorEventArgs.cs
- Size3D.cs
- AppDomain.cs
- SecurityPolicySection.cs
- ToolboxItemWrapper.cs
- Point.cs
- ProjectionQueryOptionExpression.cs
- FunctionParameter.cs
- SerializationEventsCache.cs
- PropertyGrid.cs
- Debug.cs
- RootDesignerSerializerAttribute.cs
- ToolboxItem.cs
- ReadOnlyTernaryTree.cs
- TrackingExtract.cs
- GPStream.cs
- HtmlHead.cs
- SmtpTransport.cs
- OracleEncoding.cs
- WebPartsSection.cs
- httpapplicationstate.cs
- AssociationProvider.cs
- URIFormatException.cs