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
- CryptoProvider.cs
- EmptyReadOnlyDictionaryInternal.cs
- XMLUtil.cs
- CharacterBufferReference.cs
- DemultiplexingDispatchMessageFormatter.cs
- DefaultAssemblyResolver.cs
- SafeNativeMethodsCLR.cs
- WebPartConnectionsCancelEventArgs.cs
- AttachedAnnotationChangedEventArgs.cs
- CompModSwitches.cs
- ProfileServiceManager.cs
- EdmProperty.cs
- AsymmetricAlgorithm.cs
- Part.cs
- StoreItemCollection.Loader.cs
- SapiInterop.cs
- Touch.cs
- TdsEnums.cs
- StateWorkerRequest.cs
- FixedSOMPageConstructor.cs
- KeyedHashAlgorithm.cs
- DynamicActivity.cs
- TypeConstant.cs
- EmbeddedMailObjectCollectionEditor.cs
- Vector3DCollectionValueSerializer.cs
- DispatcherExceptionEventArgs.cs
- ExternalException.cs
- ObjectView.cs
- MediaTimeline.cs
- TextCharacters.cs
- ToolStripProgressBar.cs
- UrlRoutingHandler.cs
- MemberCollection.cs
- SimpleBitVector32.cs
- FormatConvertedBitmap.cs
- ProxyManager.cs
- NoClickablePointException.cs
- MembershipPasswordException.cs
- TableSectionStyle.cs
- RangeValueProviderWrapper.cs
- CaseExpr.cs
- odbcmetadatacolumnnames.cs
- ParseChildrenAsPropertiesAttribute.cs
- PenContexts.cs
- RemoveStoryboard.cs
- EntityFrameworkVersions.cs
- ConfigXmlSignificantWhitespace.cs
- SoapConverter.cs
- TypeForwardedToAttribute.cs
- ErrorFormatterPage.cs
- sqlinternaltransaction.cs
- XmlQueryTypeFactory.cs
- ColorDialog.cs
- FacetDescriptionElement.cs
- SqlUtils.cs
- CallbackValidatorAttribute.cs
- _TransmitFileOverlappedAsyncResult.cs
- UpdateException.cs
- ManagedFilter.cs
- RealizationContext.cs
- CollectionBuilder.cs
- OpCodes.cs
- Matrix3D.cs
- ExtractedStateEntry.cs
- Property.cs
- HTMLTagNameToTypeMapper.cs
- AutoResetEvent.cs
- TreeNodeSelectionProcessor.cs
- FormViewDeleteEventArgs.cs
- GenericNameHandler.cs
- UnsafeNativeMethodsTablet.cs
- SingleAnimationUsingKeyFrames.cs
- GridView.cs
- PropertyMapper.cs
- Point3DAnimationUsingKeyFrames.cs
- DbgCompiler.cs
- RowToParametersTransformer.cs
- ConstNode.cs
- BindValidator.cs
- TextDecorationLocationValidation.cs
- RuntimeIdentifierPropertyAttribute.cs
- panel.cs
- LayoutEditorPart.cs
- SharedRuntimeState.cs
- BitVector32.cs
- Pair.cs
- SessionKeyExpiredException.cs
- Transform3DGroup.cs
- DataTableReader.cs
- MetadataUtilsSmi.cs
- EventLogEntryCollection.cs
- GeometryModel3D.cs
- CngProvider.cs
- DependentTransaction.cs
- DispatchProxy.cs
- TraceSection.cs
- cookiecontainer.cs
- wmiprovider.cs
- SecurityUniqueId.cs
- ThaiBuddhistCalendar.cs