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
- InputEventArgs.cs
- RegexRunnerFactory.cs
- WebBrowserContainer.cs
- COMException.cs
- WebPartTransformer.cs
- ActionFrame.cs
- FixedLineResult.cs
- XmlReader.cs
- SqlDataAdapter.cs
- JournalEntryStack.cs
- UserControlCodeDomTreeGenerator.cs
- OleDbDataAdapter.cs
- WeakEventManager.cs
- SiteMapNodeItemEventArgs.cs
- SoapSchemaMember.cs
- GlyphsSerializer.cs
- QueryHandler.cs
- X509ChainPolicy.cs
- Types.cs
- GenericsInstances.cs
- ToggleProviderWrapper.cs
- SiteOfOriginPart.cs
- UnmanagedMemoryStream.cs
- SystemThemeKey.cs
- _BufferOffsetSize.cs
- PointAnimation.cs
- ComboBox.cs
- FormView.cs
- RelationalExpressions.cs
- ConfigXmlCDataSection.cs
- XmlNotation.cs
- XmlDsigSep2000.cs
- UTF32Encoding.cs
- ProfileModule.cs
- VoiceChangeEventArgs.cs
- WaitForChangedResult.cs
- StylusButtonCollection.cs
- SuppressedPackageProperties.cs
- invalidudtexception.cs
- RequiredFieldValidator.cs
- Thread.cs
- CngProperty.cs
- LinkTarget.cs
- TimelineClockCollection.cs
- SqlVisitor.cs
- LocationSectionRecord.cs
- X509SecurityTokenParameters.cs
- DeviceContext2.cs
- ClaimComparer.cs
- QuinticEase.cs
- SessionSwitchEventArgs.cs
- ObjectTypeMapping.cs
- ArglessEventHandlerProxy.cs
- TypeUnloadedException.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- DropDownButton.cs
- WebPartMovingEventArgs.cs
- DurationConverter.cs
- WebEventTraceProvider.cs
- BitmapData.cs
- RequestNavigateEventArgs.cs
- ChangeInterceptorAttribute.cs
- XmlAttributes.cs
- ProtocolsConfiguration.cs
- PrivilegeNotHeldException.cs
- SafeNativeMethods.cs
- NamedPipeChannelListener.cs
- VariantWrapper.cs
- ExeContext.cs
- Timer.cs
- CellLabel.cs
- PlanCompiler.cs
- DataGridHyperlinkColumn.cs
- XPathExpr.cs
- XmlDataCollection.cs
- XsltException.cs
- SchemaInfo.cs
- FixedSOMPageElement.cs
- CellRelation.cs
- AutomationProperties.cs
- QueryableDataSourceView.cs
- ETagAttribute.cs
- PropertyConverter.cs
- CellTreeNode.cs
- TablePattern.cs
- TreeNodeCollection.cs
- InstanceNotFoundException.cs
- SingleAnimationBase.cs
- TextBoxDesigner.cs
- TextContainerChangedEventArgs.cs
- ContentType.cs
- ExtensionSimplifierMarkupObject.cs
- AssertFilter.cs
- VisualStateManager.cs
- IgnoreFileBuildProvider.cs
- WebPartUserCapability.cs
- ConfigViewGenerator.cs
- VersionPair.cs
- NetworkCredential.cs
- HttpHeaderCollection.cs