Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- PropertyGroupDescription.cs
- ConstructorBuilder.cs
- TraceHandler.cs
- SingleSelectRootGridEntry.cs
- DataContract.cs
- DataColumnCollection.cs
- RewritingProcessor.cs
- MessageQueueCriteria.cs
- FieldToken.cs
- ListControlConvertEventArgs.cs
- smtppermission.cs
- XPathQilFactory.cs
- ReachSerializationCacheItems.cs
- Double.cs
- SByteStorage.cs
- Automation.cs
- DependencyPropertyHelper.cs
- FixedSOMLineCollection.cs
- SetStoryboardSpeedRatio.cs
- EventLogPermissionEntry.cs
- WmlValidationSummaryAdapter.cs
- HttpModuleActionCollection.cs
- ColorAnimation.cs
- FontUnit.cs
- MarshalByRefObject.cs
- ButtonDesigner.cs
- XmlnsDictionary.cs
- SerialPinChanges.cs
- DispatchChannelSink.cs
- FixedTextContainer.cs
- Win32PrintDialog.cs
- CodeIdentifier.cs
- PeoplePickerWrapper.cs
- Int16AnimationUsingKeyFrames.cs
- StateChangeEvent.cs
- TextCompositionManager.cs
- InstanceDescriptor.cs
- RelativeSource.cs
- FixedDocument.cs
- TypeUnloadedException.cs
- Token.cs
- GridViewCellAutomationPeer.cs
- PropertyDescriptorGridEntry.cs
- CellConstantDomain.cs
- BooleanFunctions.cs
- Pens.cs
- FrameworkReadOnlyPropertyMetadata.cs
- GridLength.cs
- CompilerTypeWithParams.cs
- CornerRadiusConverter.cs
- TabItem.cs
- PropertyChangedEventManager.cs
- HitTestWithPointDrawingContextWalker.cs
- PanelStyle.cs
- SocketCache.cs
- ApplicationCommands.cs
- GridViewSortEventArgs.cs
- PopupControlService.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- XmlIgnoreAttribute.cs
- BaseTreeIterator.cs
- PrintDialog.cs
- WriteableBitmap.cs
- AsnEncodedData.cs
- IteratorFilter.cs
- PageThemeBuildProvider.cs
- EntityObject.cs
- SettingsPropertyValue.cs
- ConfigXmlElement.cs
- HeaderCollection.cs
- Convert.cs
- OneToOneMappingSerializer.cs
- PermissionSetTriple.cs
- MobileControl.cs
- TrustLevelCollection.cs
- GregorianCalendar.cs
- ReliableSessionElement.cs
- BindingManagerDataErrorEventArgs.cs
- EntityProviderFactory.cs
- KeyValueSerializer.cs
- ResourceExpressionBuilder.cs
- ValueExpressions.cs
- ArcSegment.cs
- Latin1Encoding.cs
- SByte.cs
- EncodingDataItem.cs
- Invariant.cs
- CodeGenerationManager.cs
- AdobeCFFWrapper.cs
- KeyNotFoundException.cs
- XmlElementAttributes.cs
- HtmlControlDesigner.cs
- AuthorizationRule.cs
- _ChunkParse.cs
- ReversePositionQuery.cs
- _SingleItemRequestCache.cs
- ParameterElementCollection.cs
- SqlWebEventProvider.cs
- NetTcpSecurity.cs
- WebPartEditorApplyVerb.cs