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
- FormatConvertedBitmap.cs
- StringArrayConverter.cs
- SortQuery.cs
- HttpCapabilitiesSectionHandler.cs
- OdbcError.cs
- LiteralControl.cs
- DataSourceCacheDurationConverter.cs
- EntityDataSourceDataSelectionPanel.cs
- TripleDES.cs
- SpeechSeg.cs
- IndentedTextWriter.cs
- LineUtil.cs
- SynchronizedPool.cs
- ObjectCacheSettings.cs
- HttpClientCertificate.cs
- MimeBasePart.cs
- DynamicValidatorEventArgs.cs
- RuleSettingsCollection.cs
- OleServicesContext.cs
- DataControlButton.cs
- MissingManifestResourceException.cs
- HttpApplication.cs
- XPathExpr.cs
- SecurityRuntime.cs
- DefaultPrintController.cs
- ControlBuilder.cs
- ColorKeyFrameCollection.cs
- SamlSecurityTokenAuthenticator.cs
- ClientSettingsStore.cs
- Int16Storage.cs
- Size3D.cs
- OrderingQueryOperator.cs
- RSAPKCS1SignatureFormatter.cs
- DbConnectionStringBuilder.cs
- IntMinMaxAggregationOperator.cs
- GridViewDesigner.cs
- SchemaImporter.cs
- XamlVector3DCollectionSerializer.cs
- DesignerSerializationOptionsAttribute.cs
- GlobalEventManager.cs
- ChameleonKey.cs
- HtmlEmptyTagControlBuilder.cs
- RuntimeArgumentHandle.cs
- BlurEffect.cs
- SystemWebCachingSectionGroup.cs
- RoleGroupCollection.cs
- SymbolPair.cs
- ExpressionParser.cs
- DataGridTableCollection.cs
- HeaderUtility.cs
- BindingMAnagerBase.cs
- SiteMapHierarchicalDataSourceView.cs
- StreamReader.cs
- SqlProvider.cs
- FixUp.cs
- TagPrefixCollection.cs
- XmlSerializerFactory.cs
- SqlCaseSimplifier.cs
- MarshalByRefObject.cs
- ImageKeyConverter.cs
- HtmlPanelAdapter.cs
- WebExceptionStatus.cs
- AsyncResult.cs
- ConfigUtil.cs
- HttpDebugHandler.cs
- HelpOperationInvoker.cs
- ListSortDescriptionCollection.cs
- ServicesUtilities.cs
- Processor.cs
- OdbcStatementHandle.cs
- mediapermission.cs
- FormViewUpdateEventArgs.cs
- RadioButton.cs
- KnownBoxes.cs
- RegexCapture.cs
- EncryptedReference.cs
- StoryFragments.cs
- BuildProvider.cs
- SubpageParagraph.cs
- COM2PictureConverter.cs
- TrackingProfile.cs
- TagMapCollection.cs
- CodeDirectionExpression.cs
- PropertyChangedEventArgs.cs
- ProtocolsConfigurationEntry.cs
- QueryTreeBuilder.cs
- isolationinterop.cs
- ThrowHelper.cs
- RepeaterItem.cs
- ClassGenerator.cs
- TreeNodeCollection.cs
- UserNamePasswordValidationMode.cs
- DataColumnCollection.cs
- Transform3DGroup.cs
- NullRuntimeConfig.cs
- HMACMD5.cs
- CompiledRegexRunnerFactory.cs
- TimeSpanValidator.cs
- PrimaryKeyTypeConverter.cs
- LayoutUtils.cs