Code:
/ FX-1434 / FX-1434 / 1.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
- Odbc32.cs
- ParameterRetriever.cs
- TemplateBuilder.cs
- SegmentTree.cs
- TextPointer.cs
- TextEditorContextMenu.cs
- UrlUtility.cs
- XPathAxisIterator.cs
- SQLByteStorage.cs
- SyndicationLink.cs
- ProxyWebPartManager.cs
- Vector3DAnimation.cs
- CustomSignedXml.cs
- _NegotiateClient.cs
- DataControlImageButton.cs
- Effect.cs
- ReflectEventDescriptor.cs
- _CacheStreams.cs
- FormViewPagerRow.cs
- HtmlInputRadioButton.cs
- ReliableSessionBindingElementImporter.cs
- InfiniteIntConverter.cs
- XmlName.cs
- ObjectReaderCompiler.cs
- JumpPath.cs
- RelationshipEnd.cs
- Encoder.cs
- FormsAuthenticationModule.cs
- FixedTextBuilder.cs
- FileDataSourceCache.cs
- TreeNodeEventArgs.cs
- AuthenticationModuleElementCollection.cs
- TemplateBindingExpressionConverter.cs
- QilDataSource.cs
- CheckBoxRenderer.cs
- Pkcs9Attribute.cs
- Parameter.cs
- WebPartCollection.cs
- DataServiceClientException.cs
- DispatcherSynchronizationContext.cs
- SByteStorage.cs
- ICollection.cs
- DocumentOutline.cs
- CoreSwitches.cs
- BooleanStorage.cs
- RelationshipType.cs
- GridViewColumnHeaderAutomationPeer.cs
- RevocationPoint.cs
- NullToBooleanConverter.cs
- DbConnectionStringCommon.cs
- Directory.cs
- SqlFactory.cs
- WebPartCloseVerb.cs
- OraclePermissionAttribute.cs
- JournalEntryListConverter.cs
- TreeNodeCollection.cs
- DispatcherHooks.cs
- WebUtil.cs
- WebReferenceOptions.cs
- MasterPageParser.cs
- Processor.cs
- GlobalizationAssembly.cs
- InkCanvasFeedbackAdorner.cs
- InitializerFacet.cs
- ListViewItem.cs
- ComponentCollection.cs
- SmtpLoginAuthenticationModule.cs
- XmlQueryOutput.cs
- TableColumnCollectionInternal.cs
- DecoratedNameAttribute.cs
- XamlContextStack.cs
- QilNode.cs
- DropShadowEffect.cs
- Int64AnimationUsingKeyFrames.cs
- ScrollProperties.cs
- CompatibleIComparer.cs
- CharKeyFrameCollection.cs
- AssemblyNameProxy.cs
- CompilationUnit.cs
- DynamicMethod.cs
- QueryLifecycle.cs
- TreeNodeEventArgs.cs
- ISAPIApplicationHost.cs
- SelectionBorderGlyph.cs
- ServiceOperationParameter.cs
- Manipulation.cs
- EventLogPermission.cs
- SoundPlayer.cs
- XmlSchemaComplexContentExtension.cs
- XmlUrlResolver.cs
- SpecularMaterial.cs
- CloudCollection.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- ClientFormsAuthenticationMembershipProvider.cs
- Polygon.cs
- FunctionImportElement.cs
- StructuredTypeEmitter.cs
- TemplateDefinition.cs
- ControlLocalizer.cs
- EncryptionUtility.cs