Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / Primitives / CustomPopupPlacement.cs / 1305600 / 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
- AttributeUsageAttribute.cs
- ApplicationSecurityManager.cs
- ProfileSettingsCollection.cs
- AutomationPattern.cs
- PerfCounters.cs
- PaperSource.cs
- SettingsSection.cs
- FieldNameLookup.cs
- _ListenerAsyncResult.cs
- StringInfo.cs
- RootNamespaceAttribute.cs
- ClipboardData.cs
- SupportsEventValidationAttribute.cs
- ButtonStandardAdapter.cs
- Point3DIndependentAnimationStorage.cs
- TableProviderWrapper.cs
- FrameworkTextComposition.cs
- SymbolTable.cs
- RestrictedTransactionalPackage.cs
- SqlTriggerContext.cs
- TriState.cs
- UnsafeNativeMethods.cs
- SelectionItemPatternIdentifiers.cs
- NativeMethods.cs
- MenuBase.cs
- ErrorWebPart.cs
- ScrollBar.cs
- MaskedTextProvider.cs
- ThicknessAnimationBase.cs
- SrgsRulesCollection.cs
- RectAnimation.cs
- AutoResetEvent.cs
- HttpWebRequest.cs
- SqlClientWrapperSmiStream.cs
- SchemaTypeEmitter.cs
- TableColumnCollection.cs
- ExtentCqlBlock.cs
- URLEditor.cs
- NamespaceDecl.cs
- RoutedPropertyChangedEventArgs.cs
- Rectangle.cs
- RoleBoolean.cs
- FileSystemInfo.cs
- DetailsViewInsertEventArgs.cs
- PageThemeCodeDomTreeGenerator.cs
- UriTemplateDispatchFormatter.cs
- ExceptionUtil.cs
- XmlWrappingReader.cs
- CodeGen.cs
- HttpResponse.cs
- TraceContextEventArgs.cs
- RoutedEventHandlerInfo.cs
- COM2AboutBoxPropertyDescriptor.cs
- OleDbRowUpdatingEvent.cs
- MaterializeFromAtom.cs
- WindowsPen.cs
- FacetChecker.cs
- GPRECTF.cs
- Iis7Helper.cs
- FlowDocumentPage.cs
- DataColumnMappingCollection.cs
- NotImplementedException.cs
- FacetValueContainer.cs
- _ListenerResponseStream.cs
- ToolboxComponentsCreatedEventArgs.cs
- ExpressionValueEditor.cs
- StringUtil.cs
- PopupControlService.cs
- MonthChangedEventArgs.cs
- PropertyIDSet.cs
- ComponentResourceManager.cs
- RectangleF.cs
- NonceCache.cs
- CodeTypeParameter.cs
- VBCodeProvider.cs
- LineBreak.cs
- Crypto.cs
- UserInitiatedNavigationPermission.cs
- UnmanagedMarshal.cs
- _AuthenticationState.cs
- ConnectionInterfaceCollection.cs
- EdmItemCollection.cs
- Rotation3D.cs
- GiveFeedbackEventArgs.cs
- ClassicBorderDecorator.cs
- _DigestClient.cs
- BaseCodePageEncoding.cs
- BasicCellRelation.cs
- Trigger.cs
- DataBoundControl.cs
- FacetValueContainer.cs
- WebPartsSection.cs
- UInt16Converter.cs
- FrameSecurityDescriptor.cs
- DocComment.cs
- Odbc32.cs
- RootCodeDomSerializer.cs
- CodeExpressionCollection.cs
- CompositeTypefaceMetrics.cs
- ConfigXmlWhitespace.cs