Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / DockingAttribute.cs / 1305376 / DockingAttribute.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Windows.Forms {
///
///
///
/// Specifies how a control should be docked by default when added through the designer.
///
///
[AttributeUsage(AttributeTargets.Class)]
public sealed class DockingAttribute : Attribute {
private DockingBehavior dockingBehavior;
///
///
///
/// Default constructor.
///
///
public DockingAttribute() {
this.dockingBehavior = DockingBehavior.Never;
}
///
///
///
/// Constructor.
///
///
public DockingAttribute(DockingBehavior dockingBehavior) {
this.dockingBehavior = dockingBehavior;
}
///
///
///
/// Specifies the default value for the .
/// This field is read-only.
///
///
public static readonly DockingAttribute Default = new DockingAttribute();
///
///
///
/// DockingBehavior property.
///
///
public DockingBehavior DockingBehavior {
get {
return dockingBehavior;
}
}
///
///
///
///
public override bool Equals(object obj) {
if (obj == this) {
return true;
}
DockingAttribute other = obj as DockingAttribute;
return (other != null) && other.DockingBehavior == this.dockingBehavior;
}
///
///
/// [To be supplied.]
///
public override int GetHashCode() {
return dockingBehavior.GetHashCode();
}
///
///
///
///
public override bool IsDefaultAttribute() {
return (this.Equals(Default));
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Windows.Forms {
///
///
///
/// Specifies how a control should be docked by default when added through the designer.
///
///
[AttributeUsage(AttributeTargets.Class)]
public sealed class DockingAttribute : Attribute {
private DockingBehavior dockingBehavior;
///
///
///
/// Default constructor.
///
///
public DockingAttribute() {
this.dockingBehavior = DockingBehavior.Never;
}
///
///
///
/// Constructor.
///
///
public DockingAttribute(DockingBehavior dockingBehavior) {
this.dockingBehavior = dockingBehavior;
}
///
///
///
/// Specifies the default value for the .
/// This field is read-only.
///
///
public static readonly DockingAttribute Default = new DockingAttribute();
///
///
///
/// DockingBehavior property.
///
///
public DockingBehavior DockingBehavior {
get {
return dockingBehavior;
}
}
///
///
///
///
public override bool Equals(object obj) {
if (obj == this) {
return true;
}
DockingAttribute other = obj as DockingAttribute;
return (other != null) && other.DockingBehavior == this.dockingBehavior;
}
///
///
/// [To be supplied.]
///
public override int GetHashCode() {
return dockingBehavior.GetHashCode();
}
///
///
///
///
public override bool IsDefaultAttribute() {
return (this.Equals(Default));
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Focus.cs
- ExceptionUtil.cs
- BatchServiceHost.cs
- Gdiplus.cs
- SqlClientWrapperSmiStream.cs
- Decoder.cs
- FreezableDefaultValueFactory.cs
- TextParentUndoUnit.cs
- graph.cs
- PresentationSource.cs
- HiddenField.cs
- ErrorHandlerModule.cs
- FormsAuthentication.cs
- XmlArrayAttribute.cs
- WindowsRegion.cs
- EventLogger.cs
- PaintEvent.cs
- AuthStoreRoleProvider.cs
- MultiView.cs
- DeflateStream.cs
- ISessionStateStore.cs
- SimpleType.cs
- SetUserLanguageRequest.cs
- RelationshipConstraintValidator.cs
- InputScopeManager.cs
- MouseEvent.cs
- State.cs
- SqlDataSourceCache.cs
- InplaceBitmapMetadataWriter.cs
- CollaborationHelperFunctions.cs
- HMACMD5.cs
- BindingNavigator.cs
- ErrorFormatterPage.cs
- Rectangle.cs
- AttachInfo.cs
- SchemaObjectWriter.cs
- BaseCollection.cs
- DropShadowBitmapEffect.cs
- MappingItemCollection.cs
- SamlAuthorityBinding.cs
- AuditLevel.cs
- StyleBamlRecordReader.cs
- LingerOption.cs
- HeaderCollection.cs
- URLMembershipCondition.cs
- Cursor.cs
- DateTimeValueSerializer.cs
- FixedSOMElement.cs
- ClientTarget.cs
- ArithmeticException.cs
- PartitionResolver.cs
- ListControlStringCollectionEditor.cs
- LambdaCompiler.Statements.cs
- PauseStoryboard.cs
- RecognitionEventArgs.cs
- DifferencingCollection.cs
- LOSFormatter.cs
- DataGridState.cs
- AutomationFocusChangedEventArgs.cs
- EventMappingSettingsCollection.cs
- WebPartDisplayModeCollection.cs
- PrintControllerWithStatusDialog.cs
- AttributedMetaModel.cs
- CellLabel.cs
- ConfigXmlSignificantWhitespace.cs
- HitTestWithPointDrawingContextWalker.cs
- RegexGroupCollection.cs
- ItemsControl.cs
- TagNameToTypeMapper.cs
- securitycriticaldataClass.cs
- PointConverter.cs
- HMAC.cs
- SingleKeyFrameCollection.cs
- GC.cs
- DataTableNewRowEvent.cs
- RegisteredExpandoAttribute.cs
- Rect3DConverter.cs
- DispatcherSynchronizationContext.cs
- MemberInfoSerializationHolder.cs
- ParameterCollectionEditor.cs
- Update.cs
- XmlSchemaSimpleTypeUnion.cs
- LookupNode.cs
- TextChangedEventArgs.cs
- DocumentPageView.cs
- XmlSchemaResource.cs
- RoutedUICommand.cs
- XpsPartBase.cs
- XPathAncestorIterator.cs
- BulletedList.cs
- GridViewRowEventArgs.cs
- XsdBuildProvider.cs
- XmlReader.cs
- PolyBezierSegment.cs
- TypeSystem.cs
- MaskedTextProvider.cs
- DesignerForm.cs
- DescendantQuery.cs
- ClientBuildManagerCallback.cs
- LogEntrySerializationException.cs