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
- ListBase.cs
- CompositeActivityTypeDescriptor.cs
- SettingsProperty.cs
- dbenumerator.cs
- DataIdProcessor.cs
- GridViewUpdatedEventArgs.cs
- SendKeys.cs
- SafeNativeMethods.cs
- LexicalChunk.cs
- WindowsScroll.cs
- SatelliteContractVersionAttribute.cs
- MiniAssembly.cs
- AtlasWeb.Designer.cs
- InputLangChangeEvent.cs
- PenCursorManager.cs
- EntityType.cs
- CalendarAutoFormatDialog.cs
- ITreeGenerator.cs
- ConfigXmlDocument.cs
- BitSet.cs
- HandledMouseEvent.cs
- KeyValueConfigurationElement.cs
- Adorner.cs
- DataTemplate.cs
- EFTableProvider.cs
- RtfToXamlReader.cs
- QueryExpr.cs
- ZipArchive.cs
- RecommendedAsConfigurableAttribute.cs
- CodeTypeReference.cs
- ClientTargetCollection.cs
- ErrorTableItemStyle.cs
- UICuesEvent.cs
- CollectionChangedEventManager.cs
- PropertyTabChangedEvent.cs
- XmlAutoDetectWriter.cs
- Base64Decoder.cs
- DataRecordInternal.cs
- FreezableDefaultValueFactory.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- InlineObject.cs
- DocComment.cs
- basecomparevalidator.cs
- storepermission.cs
- securitycriticaldataClass.cs
- AppDomainShutdownMonitor.cs
- HttpPostedFile.cs
- mediaclock.cs
- EventLog.cs
- SqlUnionizer.cs
- XmlDataDocument.cs
- RegionInfo.cs
- ConfigXmlCDataSection.cs
- MenuCommandsChangedEventArgs.cs
- FontStyleConverter.cs
- TypeLibConverter.cs
- PackageDocument.cs
- IPAddress.cs
- Signature.cs
- CalendarData.cs
- TypedReference.cs
- AnnotationComponentManager.cs
- RuntimeIdentifierPropertyAttribute.cs
- ConsumerConnectionPointCollection.cs
- ComponentDispatcher.cs
- LongPath.cs
- KeyManager.cs
- StaticExtension.cs
- ElementNotAvailableException.cs
- ViewKeyConstraint.cs
- HtmlContainerControl.cs
- XmlBinaryReaderSession.cs
- DetailsViewDeleteEventArgs.cs
- VirtualPath.cs
- OptimalTextSource.cs
- ImageCreator.cs
- RealProxy.cs
- COM2FontConverter.cs
- UserControlParser.cs
- COM2Properties.cs
- MachineKeyConverter.cs
- XamlWriter.cs
- TemplateBindingExtension.cs
- TableCellsCollectionEditor.cs
- TableParaClient.cs
- SrgsElementFactory.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- MissingSatelliteAssemblyException.cs
- GridView.cs
- TemplatedAdorner.cs
- EventProxy.cs
- ToolStripStatusLabel.cs
- TagMapCollection.cs
- SqlGenericUtil.cs
- SymmetricSecurityProtocol.cs
- SecurityTokenTypes.cs
- Camera.cs
- FreezableOperations.cs
- TrackingStringDictionary.cs
- ConfigUtil.cs