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
- MatrixAnimationUsingKeyFrames.cs
- LocalTransaction.cs
- DigestComparer.cs
- ReferencedCollectionType.cs
- LinqDataSourceDeleteEventArgs.cs
- Deflater.cs
- StylusDevice.cs
- BitmapSourceSafeMILHandle.cs
- EncoderBestFitFallback.cs
- Container.cs
- CustomGrammar.cs
- CharUnicodeInfo.cs
- CuspData.cs
- ProcessModelInfo.cs
- ModifyActivitiesPropertyDescriptor.cs
- ActivityWithResult.cs
- PageAsyncTaskManager.cs
- WindowsSolidBrush.cs
- SurrogateDataContract.cs
- TargetException.cs
- OdbcInfoMessageEvent.cs
- MsmqNonTransactedPoisonHandler.cs
- LocalizationCodeDomSerializer.cs
- HttpServerProtocol.cs
- CheckedPointers.cs
- TextTreeTextBlock.cs
- ListViewSortEventArgs.cs
- ResourceDisplayNameAttribute.cs
- ConnectionPoint.cs
- XmlElementAttributes.cs
- HyperLink.cs
- DNS.cs
- TextTreeInsertUndoUnit.cs
- Rotation3D.cs
- QuaternionRotation3D.cs
- HeaderedContentControl.cs
- MatrixTransform3D.cs
- PersonalizableAttribute.cs
- ToolboxItemFilterAttribute.cs
- XPathParser.cs
- VisualBrush.cs
- SspiWrapper.cs
- HttpListenerContext.cs
- DocumentEventArgs.cs
- SystemColors.cs
- BasicDesignerLoader.cs
- ConstantCheck.cs
- WebPartsPersonalization.cs
- mil_sdk_version.cs
- DBConnectionString.cs
- SafeEventLogReadHandle.cs
- AuthenticateEventArgs.cs
- RolePrincipal.cs
- EtwTrackingParticipant.cs
- FixedSOMPageElement.cs
- Converter.cs
- GridViewEditEventArgs.cs
- KeyValuePair.cs
- FixedFlowMap.cs
- HelloMessageApril2005.cs
- DataSvcMapFile.cs
- GeneralTransform2DTo3DTo2D.cs
- ObjectConverter.cs
- ToolZone.cs
- JsonFormatMapping.cs
- KnownTypesProvider.cs
- PinnedBufferMemoryStream.cs
- PreservationFileWriter.cs
- BitmapImage.cs
- Window.cs
- MsmqTransportSecurity.cs
- EmptyStringExpandableObjectConverter.cs
- AnimationLayer.cs
- PolicyVersionConverter.cs
- WorkflowInstanceProvider.cs
- SafeLocalAllocation.cs
- ContractReference.cs
- ImportCatalogPart.cs
- SqlDataSourceCache.cs
- WindowsToolbarItemAsMenuItem.cs
- NodeLabelEditEvent.cs
- IfJoinedCondition.cs
- InvalidFilterCriteriaException.cs
- RestHandler.cs
- SimpleWebHandlerParser.cs
- VectorCollectionConverter.cs
- Storyboard.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- ValidationEventArgs.cs
- WsdlExporter.cs
- documentsequencetextpointer.cs
- TimeZoneNotFoundException.cs
- WebServiceClientProxyGenerator.cs
- AspNetSynchronizationContext.cs
- ProxyManager.cs
- DataRowChangeEvent.cs
- UriExt.cs
- TreePrinter.cs
- XamlInterfaces.cs
- SpecularMaterial.cs