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
- SafeEventLogWriteHandle.cs
- SystemTcpStatistics.cs
- PinnedBufferMemoryStream.cs
- EdmToObjectNamespaceMap.cs
- PrePostDescendentsWalker.cs
- ValuePattern.cs
- CalendarData.cs
- OverrideMode.cs
- relpropertyhelper.cs
- ResourceSet.cs
- LogExtent.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- UpDownBase.cs
- ShapingEngine.cs
- WindowsToolbar.cs
- PropertyKey.cs
- ClientOperation.cs
- DependentList.cs
- FormsAuthenticationEventArgs.cs
- DataSourceCacheDurationConverter.cs
- BitmapEffectState.cs
- DesignerRegionMouseEventArgs.cs
- CLRBindingWorker.cs
- Codec.cs
- SerializableReadOnlyDictionary.cs
- columnmapfactory.cs
- IndexExpression.cs
- WebPartVerbCollection.cs
- WebPartUserCapability.cs
- ParamArrayAttribute.cs
- ProfileGroupSettings.cs
- StringSorter.cs
- WebContentFormatHelper.cs
- ISAPIRuntime.cs
- RegexFCD.cs
- VScrollProperties.cs
- TypeSystemHelpers.cs
- NamedPipeTransportSecurity.cs
- InstallerTypeAttribute.cs
- SslStream.cs
- FlowDocumentReaderAutomationPeer.cs
- KnowledgeBase.cs
- CollectionBase.cs
- ListSourceHelper.cs
- TextElement.cs
- TreeWalkHelper.cs
- PositiveTimeSpanValidatorAttribute.cs
- PropertyValueUIItem.cs
- Int16Storage.cs
- DelegatedStream.cs
- followingquery.cs
- WebPartTracker.cs
- ContextMarshalException.cs
- TextClipboardData.cs
- RewritingPass.cs
- BrowserCapabilitiesCodeGenerator.cs
- AdornerPresentationContext.cs
- ErrorTolerantObjectWriter.cs
- ListBox.cs
- WorkflowDefinitionContext.cs
- DataGridTextBoxColumn.cs
- ClientTarget.cs
- ValueUtilsSmi.cs
- TextStore.cs
- WebPartManager.cs
- ContractBase.cs
- MultiSelector.cs
- ThreadExceptionDialog.cs
- DocumentProperties.cs
- OdbcEnvironmentHandle.cs
- FontWeightConverter.cs
- XmlDataSourceNodeDescriptor.cs
- CompensableActivity.cs
- TreeNodeEventArgs.cs
- CopyOnWriteList.cs
- DbDataAdapter.cs
- AsymmetricKeyExchangeFormatter.cs
- MembershipValidatePasswordEventArgs.cs
- CodeExpressionStatement.cs
- IntermediatePolicyValidator.cs
- PointConverter.cs
- WinFormsSecurity.cs
- SiteIdentityPermission.cs
- BindableAttribute.cs
- ListSortDescriptionCollection.cs
- AppDomainFactory.cs
- COAUTHIDENTITY.cs
- DrawingImage.cs
- ItemMap.cs
- XmlReflectionImporter.cs
- KeyFrames.cs
- PeerMaintainer.cs
- RegexReplacement.cs
- ActivityBindForm.Designer.cs
- TickBar.cs
- SecUtil.cs
- QilSortKey.cs
- baseaxisquery.cs
- Socket.cs
- SyncMethodInvoker.cs