Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- HttpCapabilitiesSectionHandler.cs
- EdmRelationshipRoleAttribute.cs
- MouseButton.cs
- DetailsViewDeleteEventArgs.cs
- OdbcParameter.cs
- NotImplementedException.cs
- XslAstAnalyzer.cs
- AssemblyInfo.cs
- EmptyCollection.cs
- CursorEditor.cs
- InvalidFilterCriteriaException.cs
- LinearKeyFrames.cs
- JournalEntryListConverter.cs
- MDIWindowDialog.cs
- CompareValidator.cs
- UDPClient.cs
- WindowsSlider.cs
- ParentQuery.cs
- RootProjectionNode.cs
- ResourceExpression.cs
- LoadedOrUnloadedOperation.cs
- DataFormat.cs
- SendMailErrorEventArgs.cs
- DSASignatureFormatter.cs
- CodePrimitiveExpression.cs
- PrintDocument.cs
- SqlDependencyUtils.cs
- AmbiguousMatchException.cs
- GlobalProxySelection.cs
- AbandonedMutexException.cs
- HierarchicalDataTemplate.cs
- HyperLinkDataBindingHandler.cs
- DiscoveryClientProtocol.cs
- FakeModelItemImpl.cs
- Graphics.cs
- RenderingBiasValidation.cs
- DataServiceHostFactory.cs
- ClientCultureInfo.cs
- _ConnectOverlappedAsyncResult.cs
- ResourceProperty.cs
- ImageMapEventArgs.cs
- ScaleTransform3D.cs
- Animatable.cs
- JavaScriptString.cs
- WebPartConnectionsDisconnectVerb.cs
- UncommonField.cs
- InstalledFontCollection.cs
- VectorConverter.cs
- SoapAttributes.cs
- CollectionBase.cs
- ADMembershipProvider.cs
- DecoderBestFitFallback.cs
- RadialGradientBrush.cs
- CryptoApi.cs
- CompressedStack.cs
- DependencyPropertyConverter.cs
- StringDictionaryEditor.cs
- DbConnectionOptions.cs
- ObjectContext.cs
- MimeTypePropertyAttribute.cs
- GroupBoxDesigner.cs
- TemplatePartAttribute.cs
- LinqDataSourceDisposeEventArgs.cs
- XmlConvert.cs
- ThemeDirectoryCompiler.cs
- ADConnectionHelper.cs
- ReadOnlyDictionary.cs
- EntityFunctions.cs
- XmlResolver.cs
- ListViewGroupItemCollection.cs
- DeleteMemberBinder.cs
- DictionarySectionHandler.cs
- ValidatingCollection.cs
- FreezableCollection.cs
- Timer.cs
- Int16Converter.cs
- MachinePropertyVariants.cs
- autovalidator.cs
- BindingContext.cs
- BitmapSizeOptions.cs
- ProfessionalColors.cs
- FormViewCommandEventArgs.cs
- LicFileLicenseProvider.cs
- StringAttributeCollection.cs
- HostedElements.cs
- panel.cs
- TypeForwardedFromAttribute.cs
- TypeUtils.cs
- DataControlCommands.cs
- SignatureHelper.cs
- ToolStripItem.cs
- WindowsNonControl.cs
- Style.cs
- PropertyInformationCollection.cs
- XmlSchemaSubstitutionGroup.cs
- SerTrace.cs
- UnaryNode.cs
- FloaterParagraph.cs
- AtomParser.cs
- XmlDocument.cs