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
- EnumMember.cs
- TreeNodeClickEventArgs.cs
- ImageCodecInfo.cs
- Sql8ConformanceChecker.cs
- Funcletizer.cs
- Geometry3D.cs
- GridToolTip.cs
- MailAddress.cs
- SingleTagSectionHandler.cs
- NameSpaceEvent.cs
- Decoder.cs
- QueryableFilterRepeater.cs
- SchemaImporterExtensionElement.cs
- ContainerVisual.cs
- JournalNavigationScope.cs
- StringDictionaryWithComparer.cs
- SystemSounds.cs
- DiagnosticTraceSource.cs
- ClientViaElement.cs
- ObjectCloneHelper.cs
- EventWaitHandleSecurity.cs
- ManagementPath.cs
- DynamicControlParameter.cs
- XmlCountingReader.cs
- HuffCodec.cs
- SQLSingle.cs
- ObjectDataSourceWizardForm.cs
- TemplateBaseAction.cs
- ButtonField.cs
- XmlWrappingReader.cs
- ProcessProtocolHandler.cs
- SerializationHelper.cs
- ConstructorNeedsTagAttribute.cs
- StringBuilder.cs
- AffineTransform3D.cs
- Int32AnimationBase.cs
- UIElementAutomationPeer.cs
- DesignerImageAdapter.cs
- cryptoapiTransform.cs
- DbProviderSpecificTypePropertyAttribute.cs
- ItemChangedEventArgs.cs
- EpmCustomContentSerializer.cs
- WindowsBrush.cs
- XamlBrushSerializer.cs
- MDIWindowDialog.cs
- ManipulationInertiaStartingEventArgs.cs
- UiaCoreProviderApi.cs
- SplitterEvent.cs
- RoutedEventValueSerializer.cs
- EntityTemplateFactory.cs
- DBPropSet.cs
- Line.cs
- CustomErrorsSection.cs
- MultiAsyncResult.cs
- CodeTypeDelegate.cs
- EventMappingSettingsCollection.cs
- SiteMapNode.cs
- SpeakProgressEventArgs.cs
- ObjectListGeneralPage.cs
- PathSegmentCollection.cs
- SrgsElementList.cs
- FontWeightConverter.cs
- SafeSecurityHelper.cs
- PropertyEmitter.cs
- TerminatorSinks.cs
- safesecurityhelperavalon.cs
- ASCIIEncoding.cs
- Select.cs
- FileSystemInfo.cs
- ValueHandle.cs
- TreeNodeCollectionEditor.cs
- ApplicationServicesHostFactory.cs
- altserialization.cs
- SafeCryptoHandles.cs
- DescendantBaseQuery.cs
- RegularExpressionValidator.cs
- DataColumnPropertyDescriptor.cs
- DiscoveryClient.cs
- XmlSchemaElement.cs
- PolyBezierSegment.cs
- MatrixCamera.cs
- QilLoop.cs
- CmsInterop.cs
- BamlLocalizer.cs
- XmlEncodedRawTextWriter.cs
- OrderedHashRepartitionEnumerator.cs
- Material.cs
- PartialCachingControl.cs
- SendMailErrorEventArgs.cs
- EventProviderWriter.cs
- ContentFilePart.cs
- PersonalizationStateInfoCollection.cs
- HtmlInputSubmit.cs
- UIElementParagraph.cs
- UseManagedPresentationElement.cs
- DesignerDataParameter.cs
- COM2FontConverter.cs
- FilterRepeater.cs
- WorkBatch.cs
- RecognizerInfo.cs