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
- DuplicateWaitObjectException.cs
- CodeCommentStatementCollection.cs
- CodeVariableDeclarationStatement.cs
- RealProxy.cs
- UnsafeNativeMethods.cs
- SimpleTypeResolver.cs
- ViewCellRelation.cs
- LocatorPart.cs
- OraclePermissionAttribute.cs
- RegistrySecurity.cs
- HtmlTableCell.cs
- XmlSerializer.cs
- ElementProxy.cs
- HealthMonitoringSection.cs
- FileEnumerator.cs
- FileChangesMonitor.cs
- CodeIdentifier.cs
- CornerRadiusConverter.cs
- WhitespaceRule.cs
- TraceListener.cs
- Message.cs
- ChildChangedEventArgs.cs
- ObjectMaterializedEventArgs.cs
- ActivationServices.cs
- QueryableDataSourceView.cs
- LocalsItemDescription.cs
- COAUTHINFO.cs
- SmiXetterAccessMap.cs
- Mapping.cs
- ToolStripOverflow.cs
- SBCSCodePageEncoding.cs
- SiteOfOriginContainer.cs
- ExternalFile.cs
- SoapMessage.cs
- KeyedQueue.cs
- GridViewUpdateEventArgs.cs
- SqlOuterApplyReducer.cs
- VirtualDirectoryMappingCollection.cs
- HttpCapabilitiesBase.cs
- CodeIdentifier.cs
- CultureSpecificCharacterBufferRange.cs
- StorageRoot.cs
- EntityContainer.cs
- CultureInfo.cs
- SqlGenerator.cs
- MeasureItemEvent.cs
- FontWeightConverter.cs
- Stack.cs
- Dump.cs
- LassoHelper.cs
- Scene3D.cs
- DSASignatureFormatter.cs
- TextTreeTextBlock.cs
- LabelAutomationPeer.cs
- LogicalExpr.cs
- TaskFactory.cs
- RelatedPropertyManager.cs
- MetaModel.cs
- DispatcherHooks.cs
- RegistryExceptionHelper.cs
- AnimatedTypeHelpers.cs
- IsolatedStoragePermission.cs
- VerificationAttribute.cs
- ObjectNotFoundException.cs
- RegexCompiler.cs
- CodeVariableDeclarationStatement.cs
- UriSection.cs
- DataRowChangeEvent.cs
- PathSegment.cs
- EnlistmentState.cs
- DelegateHelpers.Generated.cs
- DataControlPagerLinkButton.cs
- HostedTransportConfigurationManager.cs
- KerberosTicketHashIdentifierClause.cs
- ErrorProvider.cs
- TreeNode.cs
- DataSourceView.cs
- DependencyPropertyDescriptor.cs
- Ipv6Element.cs
- QueryContinueDragEvent.cs
- BamlRecordHelper.cs
- NewItemsContextMenuStrip.cs
- LassoHelper.cs
- SqlCacheDependency.cs
- ColorMap.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- OleCmdHelper.cs
- DocComment.cs
- SqlError.cs
- MsmqDiagnostics.cs
- BamlStream.cs
- ChildDocumentBlock.cs
- Matrix.cs
- ProjectionPathSegment.cs
- ValueTypeFieldReference.cs
- DataControlFieldTypeEditor.cs
- TdsParserSessionPool.cs
- ParallelDesigner.cs
- EntityContainerEmitter.cs
- EncryptedType.cs