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
- PropertyGridCommands.cs
- CollectionBuilder.cs
- PointLight.cs
- DependencyObjectValidator.cs
- CompilerLocalReference.cs
- WindowPattern.cs
- log.cs
- SortKey.cs
- MediaPlayer.cs
- ProbeDuplex11AsyncResult.cs
- DetailsViewDeletedEventArgs.cs
- DesignerCategoryAttribute.cs
- IPGlobalProperties.cs
- safemediahandle.cs
- LabelLiteral.cs
- ToolBar.cs
- SqlRewriteScalarSubqueries.cs
- MultiView.cs
- MultiAsyncResult.cs
- DateTimeSerializationSection.cs
- XPathDescendantIterator.cs
- ColorAnimationBase.cs
- XmlQualifiedName.cs
- InputLanguageCollection.cs
- OdbcParameterCollection.cs
- precedingsibling.cs
- FragmentQueryProcessor.cs
- EntityDataSourceColumn.cs
- UIElementCollection.cs
- MetaForeignKeyColumn.cs
- DataGridViewEditingControlShowingEventArgs.cs
- TimeoutException.cs
- SafeCloseHandleCritical.cs
- TdsParameterSetter.cs
- XmlCustomFormatter.cs
- WindowsRegion.cs
- StrokeNodeOperations.cs
- MessagePropertyAttribute.cs
- Delegate.cs
- Cursor.cs
- ObsoleteAttribute.cs
- QueryOutputWriter.cs
- ToolStripComboBox.cs
- StatusBarPanel.cs
- WebPartMinimizeVerb.cs
- LogManagementAsyncResult.cs
- ReferenceConverter.cs
- PriorityChain.cs
- JapaneseLunisolarCalendar.cs
- EntityDataSourceColumn.cs
- messageonlyhwndwrapper.cs
- InfoCardClaim.cs
- ScrollChrome.cs
- CollectionViewGroup.cs
- CodeIdentifier.cs
- Timer.cs
- ComAdminInterfaces.cs
- HtmlControlAdapter.cs
- SqlDataSourceFilteringEventArgs.cs
- Vector3DKeyFrameCollection.cs
- SoapFormatExtensions.cs
- oledbconnectionstring.cs
- WriteLine.cs
- ThreadAttributes.cs
- ReflectionPermission.cs
- ByteAnimationBase.cs
- CachedBitmap.cs
- HttpCachePolicy.cs
- AutomationElementCollection.cs
- CalendarDesigner.cs
- ContextMarshalException.cs
- HTTPNotFoundHandler.cs
- XmlLinkedNode.cs
- CheckBox.cs
- NativeMethods.cs
- CodeSpit.cs
- documentsequencetextpointer.cs
- CaseStatementSlot.cs
- PreviewKeyDownEventArgs.cs
- FigureParaClient.cs
- nulltextnavigator.cs
- MasterPageCodeDomTreeGenerator.cs
- ReachFixedPageSerializerAsync.cs
- ProfileSection.cs
- DoubleLinkListEnumerator.cs
- WebException.cs
- JumpPath.cs
- DeleteHelper.cs
- DirectionalLight.cs
- Filter.cs
- SharedStream.cs
- RemotingAttributes.cs
- RawContentTypeMapper.cs
- Soap.cs
- HttpListenerResponse.cs
- IndentedWriter.cs
- ListViewTableCell.cs
- UInt64Storage.cs
- FacetChecker.cs
- FocusWithinProperty.cs