Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / ToolStripCodeDomSerializer.cs / 1 / ToolStripCodeDomSerializer.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope="member", Target="System.Windows.Forms.Design.ToolStripCodeDomSerializer..ctor()")] namespace System.Windows.Forms.Design { using System; using System.Design; using System.CodeDom; using System.Collections; using System.ComponentModel; using System.ComponentModel.Design; using System.ComponentModel.Design.Serialization; using System.Diagnostics; using System.Reflection; using System.Text; internal class ToolStripCodeDomSerializer: ControlCodeDomSerializer { protected override bool HasSitedNonReadonlyChildren(Control parent) { ToolStrip toolStrip = parent as ToolStrip; if (toolStrip == null) { Debug.Fail("why were we passed a non winbar?"); return false; } if (toolStrip.Items.Count == 0) { return false; } foreach (ToolStripItem item in toolStrip.Items) { if (item.Site != null && toolStrip.Site != null && item.Site.Container == toolStrip.Site.Container) { // We only emit Size/Location information for controls that are sited and not inherrited readonly. InheritanceAttribute ia = (InheritanceAttribute)TypeDescriptor.GetAttributes(item)[typeof(InheritanceAttribute)]; if (ia != null && ia.InheritanceLevel != InheritanceLevel.InheritedReadOnly) { return true; } } } return false; } } } // 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
- CheckBox.cs
- SessionEndedEventArgs.cs
- ControlDesignerState.cs
- CodeLinePragma.cs
- BrushConverter.cs
- ObjectSet.cs
- BrushMappingModeValidation.cs
- LicenseProviderAttribute.cs
- KnownTypesProvider.cs
- ImportContext.cs
- Model3D.cs
- WebPartCatalogAddVerb.cs
- MatrixAnimationUsingKeyFrames.cs
- ProjectedSlot.cs
- MemberDescriptor.cs
- TextContainerChangeEventArgs.cs
- FixedHyperLink.cs
- ShutDownListener.cs
- OleCmdHelper.cs
- QuaternionConverter.cs
- DataViewManagerListItemTypeDescriptor.cs
- SocketException.cs
- ExpressionBinding.cs
- HttpFileCollection.cs
- DataSvcMapFile.cs
- loginstatus.cs
- BaseParser.cs
- RbTree.cs
- Light.cs
- XmlSchemaInclude.cs
- StateRuntime.cs
- RunClient.cs
- Geometry.cs
- AuthenticationConfig.cs
- WriterOutput.cs
- ConfigXmlAttribute.cs
- SerializationUtilities.cs
- SqlProfileProvider.cs
- ResourceWriter.cs
- SafeEventHandle.cs
- TerminatingOperationBehavior.cs
- NGCPageContentSerializerAsync.cs
- Token.cs
- BackgroundFormatInfo.cs
- StylusPlugin.cs
- DeleteHelper.cs
- TagPrefixAttribute.cs
- CallbackValidatorAttribute.cs
- formatter.cs
- AnnotationResource.cs
- DataChangedEventManager.cs
- DataGridViewRowHeaderCell.cs
- ReverseComparer.cs
- Object.cs
- ServiceOperationWrapper.cs
- ElementFactory.cs
- ValidationErrorEventArgs.cs
- ComboBox.cs
- BuildManagerHost.cs
- Image.cs
- ComponentEditorForm.cs
- InvalidComObjectException.cs
- BaseUriHelper.cs
- ObjectConverter.cs
- HostingPreferredMapPath.cs
- PlaceHolder.cs
- Point3DCollection.cs
- ResXResourceWriter.cs
- MobileControlsSection.cs
- EntityDataSourceViewSchema.cs
- OracleDateTime.cs
- SafeEventLogWriteHandle.cs
- NativeMethods.cs
- ComNativeDescriptor.cs
- ListItemCollection.cs
- MinMaxParagraphWidth.cs
- ProfileSection.cs
- CatalogZoneDesigner.cs
- RemotingServices.cs
- PasswordTextNavigator.cs
- ObjectItemCollection.cs
- ConfigurationProperty.cs
- EmissiveMaterial.cs
- HyperLinkStyle.cs
- Pkcs9Attribute.cs
- HandlerBase.cs
- ThemeableAttribute.cs
- PocoEntityKeyStrategy.cs
- DefaultPropertyAttribute.cs
- ServiceReference.cs
- SignedPkcs7.cs
- SocketElement.cs
- XmlDataSourceView.cs
- TaiwanLunisolarCalendar.cs
- SafeNativeMethods.cs
- AddDataControlFieldDialog.cs
- SqlTriggerAttribute.cs
- FullTextBreakpoint.cs
- TextLineBreak.cs
- BinaryCommonClasses.cs