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
- ObjectCloneHelper.cs
- TargetParameterCountException.cs
- ClientSettingsStore.cs
- StyleTypedPropertyAttribute.cs
- EditBehavior.cs
- AttachmentCollection.cs
- WorkingDirectoryEditor.cs
- CounterCreationDataConverter.cs
- MediaPlayerState.cs
- XmlAttribute.cs
- SingleAnimationBase.cs
- HandlerFactoryWrapper.cs
- Pointer.cs
- GeneralTransformGroup.cs
- SvcMapFile.cs
- TransformerConfigurationWizardBase.cs
- EventMappingSettings.cs
- SubtreeProcessor.cs
- ExtractedStateEntry.cs
- DependencyPropertyHelper.cs
- VariantWrapper.cs
- FormsAuthenticationUserCollection.cs
- SystemInfo.cs
- WebPartCloseVerb.cs
- MemberCollection.cs
- UrlAuthorizationModule.cs
- GACIdentityPermission.cs
- ToolStripItemRenderEventArgs.cs
- HwndAppCommandInputProvider.cs
- DoubleConverter.cs
- SocketInformation.cs
- SoapTransportImporter.cs
- HttpRequestCacheValidator.cs
- Highlights.cs
- TogglePattern.cs
- SqlLiftIndependentRowExpressions.cs
- Utils.cs
- _AutoWebProxyScriptEngine.cs
- SponsorHelper.cs
- DllNotFoundException.cs
- FormatterServices.cs
- CodeStatementCollection.cs
- WebColorConverter.cs
- ContentOnlyMessage.cs
- ServiceOperationHelpers.cs
- RolePrincipal.cs
- TextureBrush.cs
- CancellationHandlerDesigner.cs
- PnrpPermission.cs
- SpecialFolderEnumConverter.cs
- EventMappingSettingsCollection.cs
- FunctionImportMapping.cs
- ModulesEntry.cs
- WhitespaceRuleReader.cs
- DragStartedEventArgs.cs
- Accessible.cs
- TypeLibConverter.cs
- DoubleAnimationUsingKeyFrames.cs
- SymbolType.cs
- TextEditorLists.cs
- ExceptionHandlersDesigner.cs
- Array.cs
- TableProviderWrapper.cs
- XmlDataDocument.cs
- PagePropertiesChangingEventArgs.cs
- DataSourceBooleanViewSchemaConverter.cs
- SecurityManager.cs
- Stroke.cs
- CallbackValidator.cs
- OutOfProcStateClientManager.cs
- PriorityBindingExpression.cs
- ButtonStandardAdapter.cs
- DynamicPhysicalDiscoSearcher.cs
- RootBuilder.cs
- DoubleLinkList.cs
- ListDataHelper.cs
- SoapHelper.cs
- SessionStateSection.cs
- DataGridViewColumnTypeEditor.cs
- PlainXmlWriter.cs
- WebZoneDesigner.cs
- DataBinder.cs
- ParentQuery.cs
- EnumerableRowCollectionExtensions.cs
- PatternMatchRules.cs
- JobStaple.cs
- Enlistment.cs
- TitleStyle.cs
- UnauthorizedAccessException.cs
- CallSiteOps.cs
- FactoryId.cs
- MarkupWriter.cs
- UrlPropertyAttribute.cs
- BitmapCache.cs
- QueryOperationResponseOfT.cs
- WebUtil.cs
- EntityException.cs
- CodeStatement.cs
- BuilderElements.cs
- cookieexception.cs