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
- Brushes.cs
- Directory.cs
- ErrorWebPart.cs
- XsltQilFactory.cs
- QilStrConcatenator.cs
- WhitespaceRuleReader.cs
- ExecutionEngineException.cs
- JsonGlobals.cs
- DataServiceQuery.cs
- Message.cs
- SafeNativeMethods.cs
- ColumnCollectionEditor.cs
- Attributes.cs
- UriParserTemplates.cs
- TargetFrameworkUtil.cs
- StylusPointPropertyUnit.cs
- TypeConstant.cs
- oledbconnectionstring.cs
- EncoderBestFitFallback.cs
- ResourceManager.cs
- SelectionGlyphBase.cs
- RepeaterItemCollection.cs
- AdvancedBindingPropertyDescriptor.cs
- Classification.cs
- DataGridItemEventArgs.cs
- DataSpaceManager.cs
- DynamicILGenerator.cs
- SortedList.cs
- AssociationTypeEmitter.cs
- HebrewNumber.cs
- WindowsEditBox.cs
- Size3D.cs
- DataKey.cs
- PrimaryKeyTypeConverter.cs
- HwndTarget.cs
- VisualBasicValue.cs
- DbProviderSpecificTypePropertyAttribute.cs
- SelfIssuedAuthRSACryptoProvider.cs
- BehaviorService.cs
- ProcessRequestArgs.cs
- DesignerLoader.cs
- ListDictionary.cs
- OutputCacheModule.cs
- FusionWrap.cs
- DesignTimeTemplateParser.cs
- PointAnimationUsingKeyFrames.cs
- EntityViewGenerationAttribute.cs
- PageSettings.cs
- XamlSerializer.cs
- LinqDataSourceDeleteEventArgs.cs
- LinkedResourceCollection.cs
- EncryptedPackage.cs
- TreeNodeCollectionEditor.cs
- FixedDSBuilder.cs
- ExtenderProvidedPropertyAttribute.cs
- SpeakCompletedEventArgs.cs
- BuildProvider.cs
- DrawingGroup.cs
- securitycriticaldata.cs
- SemanticBasicElement.cs
- WhitespaceRule.cs
- DesignerTransactionCloseEvent.cs
- SqlInternalConnectionSmi.cs
- ReadOnlyAttribute.cs
- WindowHideOrCloseTracker.cs
- CompleteWizardStep.cs
- WindowsEditBoxRange.cs
- DataObjectCopyingEventArgs.cs
- PassportAuthentication.cs
- ToolStripPanelRenderEventArgs.cs
- UTF7Encoding.cs
- OleDbErrorCollection.cs
- IFlowDocumentViewer.cs
- TextTrailingWordEllipsis.cs
- COAUTHINFO.cs
- FontFamily.cs
- XsdDuration.cs
- InkCanvasSelection.cs
- SoapDocumentMethodAttribute.cs
- PtsPage.cs
- OdbcException.cs
- SwitchCase.cs
- NodeFunctions.cs
- DataControlFieldCell.cs
- x509utils.cs
- MatrixTransform3D.cs
- SuppressIldasmAttribute.cs
- DataColumnCollection.cs
- GenericWebPart.cs
- HostProtectionPermission.cs
- ObjectSecurityT.cs
- Helpers.cs
- ReadOnlyMetadataCollection.cs
- ControlPropertyNameConverter.cs
- TableSectionStyle.cs
- CodeTypeDelegate.cs
- XmlNodeChangedEventManager.cs
- Material.cs
- WindowsFormsHostAutomationPeer.cs
- CopyEncoder.cs