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
- OracleParameter.cs
- ContentPlaceHolder.cs
- FlatButtonAppearance.cs
- FieldDescriptor.cs
- Pen.cs
- StrongTypingException.cs
- EffectiveValueEntry.cs
- QueryCacheManager.cs
- WebPartDescription.cs
- LogRecordSequence.cs
- TargetInvocationException.cs
- UnsafeNativeMethods.cs
- Script.cs
- SafeCertificateContext.cs
- BamlBinaryWriter.cs
- Transaction.cs
- NumberFormatter.cs
- HandleExceptionArgs.cs
- ToolstripProfessionalRenderer.cs
- BindingContext.cs
- XdrBuilder.cs
- ZipIOExtraField.cs
- TextTreeUndo.cs
- IisTraceListener.cs
- UnsafeNativeMethods.cs
- ToolStripButton.cs
- WebBrowser.cs
- QuinticEase.cs
- SafeBitVector32.cs
- TemplateControlCodeDomTreeGenerator.cs
- CodeGroup.cs
- DesignerToolStripControlHost.cs
- Char.cs
- AppDomain.cs
- SlipBehavior.cs
- EpmSyndicationContentSerializer.cs
- Border.cs
- ActivityBindForm.Designer.cs
- CellParaClient.cs
- SplineKeyFrames.cs
- SafeRegistryHandle.cs
- ParallelActivityDesigner.cs
- CodeMethodReturnStatement.cs
- XmlException.cs
- CreateUserWizard.cs
- BitmapEffectGroup.cs
- DynamicRenderer.cs
- Compiler.cs
- ECDiffieHellmanCngPublicKey.cs
- X509ChainPolicy.cs
- ValidatorUtils.cs
- CacheMemory.cs
- WizardForm.cs
- ValidationErrorCollection.cs
- PropertyGridView.cs
- XmlSchemaAppInfo.cs
- SecurityManager.cs
- ConnectionStringEditor.cs
- COSERVERINFO.cs
- UDPClient.cs
- PathSegment.cs
- SessionIDManager.cs
- ColumnMapCopier.cs
- HwndProxyElementProvider.cs
- KeyEventArgs.cs
- EnumerableValidator.cs
- MatrixTransform3D.cs
- LinqDataView.cs
- WebAdminConfigurationHelper.cs
- WCFModelStrings.Designer.cs
- panel.cs
- SqlFacetAttribute.cs
- WebPartsSection.cs
- RelationshipManager.cs
- TextTreeUndoUnit.cs
- DateTimeFormatInfo.cs
- RecordConverter.cs
- DataControlFieldHeaderCell.cs
- BitmapMetadataBlob.cs
- SecurityContext.cs
- OuterGlowBitmapEffect.cs
- BackStopAuthenticationModule.cs
- Solver.cs
- ResponseBodyWriter.cs
- AppDomainFactory.cs
- CreateUserWizard.cs
- StrongNameUtility.cs
- PrintingPermission.cs
- HostVisual.cs
- ForceCopyBuildProvider.cs
- SqlPersonalizationProvider.cs
- ConfigurationValidatorBase.cs
- MenuScrollingVisibilityConverter.cs
- BackgroundWorker.cs
- OleAutBinder.cs
- PermissionSet.cs
- UIElement.cs
- Hashtable.cs
- RuleInfoComparer.cs
- EntityContainerEmitter.cs