Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- GeometryModel3D.cs
- RegexWorker.cs
- ConfigXmlAttribute.cs
- RtType.cs
- FontClient.cs
- HtmlContainerControl.cs
- ForEachAction.cs
- Verify.cs
- X509Logo.cs
- ImageCodecInfoPrivate.cs
- ErrorStyle.cs
- LinkedDataMemberFieldEditor.cs
- EnumBuilder.cs
- Object.cs
- StyleSheetRefUrlEditor.cs
- PathSegmentCollection.cs
- TraceSection.cs
- IpcPort.cs
- KnownBoxes.cs
- ErrorTableItemStyle.cs
- CodeParameterDeclarationExpression.cs
- UInt32.cs
- cryptoapiTransform.cs
- UInt64.cs
- ScrollPatternIdentifiers.cs
- SqlInternalConnectionTds.cs
- StringValidator.cs
- MemoryPressure.cs
- FileInfo.cs
- TrailingSpaceComparer.cs
- ResXResourceReader.cs
- InkPresenterAutomationPeer.cs
- TextEditor.cs
- HttpContextBase.cs
- HttpServerVarsCollection.cs
- AuthenticatedStream.cs
- DirectoryNotFoundException.cs
- WebPartTransformerAttribute.cs
- OutputCacheEntry.cs
- PerformanceCounterLib.cs
- RoutedEvent.cs
- QilChoice.cs
- PtsHost.cs
- HttpModulesSection.cs
- GeometryCollection.cs
- SoapSchemaImporter.cs
- BevelBitmapEffect.cs
- UserPreferenceChangingEventArgs.cs
- ProtocolsConfigurationEntry.cs
- LinqExpressionNormalizer.cs
- ProgressBarRenderer.cs
- ColumnClickEvent.cs
- ResizingMessageFilter.cs
- ProtocolsConfiguration.cs
- HtmlToClrEventProxy.cs
- _ListenerResponseStream.cs
- ContentOnlyMessage.cs
- PropertyEmitterBase.cs
- WeakReferenceList.cs
- Stack.cs
- DefaultHttpHandler.cs
- PasswordRecovery.cs
- ControlAdapter.cs
- ControllableStoryboardAction.cs
- AssociationTypeEmitter.cs
- ClrProviderManifest.cs
- SessionStateModule.cs
- CapabilitiesPattern.cs
- TimeZone.cs
- Accessible.cs
- Message.cs
- AnnotationComponentChooser.cs
- FixedSOMSemanticBox.cs
- PrinterSettings.cs
- BlurBitmapEffect.cs
- ResolveCompletedEventArgs.cs
- SafeFileMapViewHandle.cs
- InvalidAsynchronousStateException.cs
- XpsPartBase.cs
- ConfigXmlElement.cs
- ConsoleKeyInfo.cs
- Screen.cs
- WebPartTransformerAttribute.cs
- OracleBFile.cs
- CustomWebEventKey.cs
- XmlNamespaceMappingCollection.cs
- QilValidationVisitor.cs
- Ipv6Element.cs
- InheritanceContextHelper.cs
- XmlWrappingReader.cs
- HostDesigntimeLicenseContext.cs
- PrefixQName.cs
- XmlWhitespace.cs
- FormViewDeletedEventArgs.cs
- ExceptionUtility.cs
- ScrollItemProviderWrapper.cs
- PhonemeEventArgs.cs
- ProcessHost.cs
- AuthStoreRoleProvider.cs
- DataGridViewColumnHeaderCell.cs