Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / Controls / Primitives / CustomPopupPlacement.cs / 1 / CustomPopupPlacement.cs
using System; namespace System.Windows.Controls.Primitives { ////// Describes where a popup should be placed on screen. /// public struct CustomPopupPlacement { ////// Constructor /// /// Assigns to Point /// Assigns to PrimaryAxis public CustomPopupPlacement(Point point, PopupPrimaryAxis primaryAxis) { _point = point; _primaryAxis = primaryAxis; } ////// The point, relative to the PlacementTarget, where the upper left corner of the Popup should be. /// public Point Point { get { return _point; } set { _point = value; } } ////// The primary axis of the popup that will be used for nudging on-screen. /// public PopupPrimaryAxis PrimaryAxis { get { return _primaryAxis; } set { _primaryAxis = value; } } ////// Compares the value of two CustomPopupPlacement structs for equality. /// /// The first value. /// The second value. ///public static bool operator==(CustomPopupPlacement placement1, CustomPopupPlacement placement2) { return placement1.Equals(placement2); } /// /// Compares the value of two CustomPopupPlacement structs for inequality. /// /// The first value. /// The second value. ///public static bool operator !=(CustomPopupPlacement placement1, CustomPopupPlacement placement2) { return !placement1.Equals(placement2); } /// /// Compares the value of this struct with another object. /// /// An object to compare to. ///True if equivalent. False otherwise. public override bool Equals(object o) { if (o is CustomPopupPlacement) { CustomPopupPlacement placement = (CustomPopupPlacement)o; return (placement._primaryAxis == _primaryAxis) && (placement._point == _point); } return false; } ////// Hash function for this type. /// ///A hash code for this struct. public override int GetHashCode() { return _primaryAxis.GetHashCode() ^ _point.GetHashCode(); } private Point _point; private PopupPrimaryAxis _primaryAxis; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; namespace System.Windows.Controls.Primitives { ////// Describes where a popup should be placed on screen. /// public struct CustomPopupPlacement { ////// Constructor /// /// Assigns to Point /// Assigns to PrimaryAxis public CustomPopupPlacement(Point point, PopupPrimaryAxis primaryAxis) { _point = point; _primaryAxis = primaryAxis; } ////// The point, relative to the PlacementTarget, where the upper left corner of the Popup should be. /// public Point Point { get { return _point; } set { _point = value; } } ////// The primary axis of the popup that will be used for nudging on-screen. /// public PopupPrimaryAxis PrimaryAxis { get { return _primaryAxis; } set { _primaryAxis = value; } } ////// Compares the value of two CustomPopupPlacement structs for equality. /// /// The first value. /// The second value. ///public static bool operator==(CustomPopupPlacement placement1, CustomPopupPlacement placement2) { return placement1.Equals(placement2); } /// /// Compares the value of two CustomPopupPlacement structs for inequality. /// /// The first value. /// The second value. ///public static bool operator !=(CustomPopupPlacement placement1, CustomPopupPlacement placement2) { return !placement1.Equals(placement2); } /// /// Compares the value of this struct with another object. /// /// An object to compare to. ///True if equivalent. False otherwise. public override bool Equals(object o) { if (o is CustomPopupPlacement) { CustomPopupPlacement placement = (CustomPopupPlacement)o; return (placement._primaryAxis == _primaryAxis) && (placement._point == _point); } return false; } ////// Hash function for this type. /// ///A hash code for this struct. public override int GetHashCode() { return _primaryAxis.GetHashCode() ^ _point.GetHashCode(); } private Point _point; private PopupPrimaryAxis _primaryAxis; } } // 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
- SoapCommonClasses.cs
- _ChunkParse.cs
- SecureEnvironment.cs
- RelationshipConstraintValidator.cs
- ConfigurationPropertyAttribute.cs
- CalendarAutomationPeer.cs
- OdbcDataReader.cs
- ConfigurationSectionCollection.cs
- RepeatButton.cs
- DataDocumentXPathNavigator.cs
- CrossSiteScriptingValidation.cs
- XmlSiteMapProvider.cs
- DateTimeValueSerializerContext.cs
- PtsHost.cs
- WeakReferenceEnumerator.cs
- TraceContextEventArgs.cs
- HttpHandler.cs
- PageThemeParser.cs
- PageCodeDomTreeGenerator.cs
- PersonalizationState.cs
- COAUTHIDENTITY.cs
- IssuedTokenServiceCredential.cs
- PaginationProgressEventArgs.cs
- COM2PictureConverter.cs
- DetailsViewInsertedEventArgs.cs
- EventWaitHandle.cs
- InfoCardServiceInstallComponent.cs
- MenuItem.cs
- MouseButtonEventArgs.cs
- DataSourceHelper.cs
- ErrorActivity.cs
- StylusOverProperty.cs
- InstanceDescriptor.cs
- NetSectionGroup.cs
- EntityContainerEntitySet.cs
- JsonServiceDocumentSerializer.cs
- FaultDesigner.cs
- ObjectAssociationEndMapping.cs
- OdbcPermission.cs
- QueryCacheKey.cs
- SoapAttributes.cs
- InheritanceRules.cs
- DbConnectionStringCommon.cs
- AuthenticateEventArgs.cs
- CommentAction.cs
- Typography.cs
- UnionCodeGroup.cs
- CheckableControlBaseAdapter.cs
- ToolStripDropDown.cs
- QueuePathEditor.cs
- StaticDataManager.cs
- SystemDiagnosticsSection.cs
- ArrayEditor.cs
- OutputBuffer.cs
- DataSourceIDConverter.cs
- LocatorBase.cs
- XmlBinaryReader.cs
- RowCache.cs
- ServiceInstanceProvider.cs
- TextPattern.cs
- BoundField.cs
- AVElementHelper.cs
- XmlCharType.cs
- XmlSchemaSimpleContentRestriction.cs
- Win32Native.cs
- FontStretchConverter.cs
- ListBindingConverter.cs
- SchemaSetCompiler.cs
- FormViewDeletedEventArgs.cs
- Simplifier.cs
- Array.cs
- CompilerErrorCollection.cs
- TextEndOfLine.cs
- WebPartEditorCancelVerb.cs
- QilUnary.cs
- CodeRemoveEventStatement.cs
- MutexSecurity.cs
- ClientScriptItemCollection.cs
- AppDomainProtocolHandler.cs
- SplitContainer.cs
- WebBrowser.cs
- XmlImplementation.cs
- WebPartActionVerb.cs
- QuinticEase.cs
- DataTableMappingCollection.cs
- AttributeEmitter.cs
- SafeFileMapViewHandle.cs
- ProgressChangedEventArgs.cs
- StorageConditionPropertyMapping.cs
- ItemContainerGenerator.cs
- GCHandleCookieTable.cs
- XPathNavigator.cs
- SHA384Cng.cs
- VisualSerializer.cs
- UnmanagedMarshal.cs
- Site.cs
- ThicknessAnimationUsingKeyFrames.cs
- Selection.cs
- SerializationInfo.cs
- EdmError.cs