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
- BinaryFormatter.cs
- FixedSOMLineRanges.cs
- CharacterMetricsDictionary.cs
- ParameterBuilder.cs
- MediaCommands.cs
- HttpRequest.cs
- PermissionAttributes.cs
- EncodedStreamFactory.cs
- XmlDesignerDataSourceView.cs
- WmpBitmapEncoder.cs
- HybridCollection.cs
- ScriptReferenceBase.cs
- RadioButtonFlatAdapter.cs
- SrgsRulesCollection.cs
- TextTreePropertyUndoUnit.cs
- Type.cs
- AppSettingsSection.cs
- PlanCompilerUtil.cs
- TableCellCollection.cs
- CultureSpecificStringDictionary.cs
- ZipFileInfo.cs
- DataGridCellItemAutomationPeer.cs
- WindowVisualStateTracker.cs
- EmptyStringExpandableObjectConverter.cs
- JapaneseLunisolarCalendar.cs
- OletxResourceManager.cs
- XPathNodeHelper.cs
- DependentList.cs
- StyleModeStack.cs
- BuildManager.cs
- TraceSource.cs
- XamlVector3DCollectionSerializer.cs
- ClientBuildManagerCallback.cs
- ExecutionContext.cs
- CapabilitiesSection.cs
- AssociationEndMember.cs
- IisTraceWebEventProvider.cs
- LinqDataSourceUpdateEventArgs.cs
- MultiBinding.cs
- CultureMapper.cs
- GB18030Encoding.cs
- WebPartDeleteVerb.cs
- DataTableNameHandler.cs
- DesignerToolboxInfo.cs
- UntypedNullExpression.cs
- GridLengthConverter.cs
- ResourcesGenerator.cs
- ServiceOperationParameter.cs
- DataServiceBuildProvider.cs
- ArraySubsetEnumerator.cs
- DataGridState.cs
- SqlExpressionNullability.cs
- PointConverter.cs
- HtmlTitle.cs
- EventDriven.cs
- arc.cs
- Pair.cs
- HwndStylusInputProvider.cs
- ProfilePropertySettings.cs
- Exceptions.cs
- EntityTypeEmitter.cs
- BinaryQueryOperator.cs
- EntitySqlQueryBuilder.cs
- SqlRemoveConstantOrderBy.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- TrustSection.cs
- arclist.cs
- LazyTextWriterCreator.cs
- SkipStoryboardToFill.cs
- Style.cs
- DataTableMapping.cs
- InputLangChangeEvent.cs
- RemoteWebConfigurationHost.cs
- ListItemConverter.cs
- DataControlField.cs
- ManualResetEvent.cs
- SmiTypedGetterSetter.cs
- CqlParser.cs
- UIElement.cs
- BufferedGraphics.cs
- CharKeyFrameCollection.cs
- TraceLevelStore.cs
- x509utils.cs
- _UriSyntax.cs
- CompilerLocalReference.cs
- PaintEvent.cs
- SqlCacheDependency.cs
- UserControl.cs
- dataobject.cs
- Debug.cs
- RectangleF.cs
- DbConnectionPoolOptions.cs
- CookieProtection.cs
- IPHostEntry.cs
- StackSpiller.Temps.cs
- BindingExpressionBase.cs
- WebBrowser.cs
- ServiceObjectContainer.cs
- SByteConverter.cs
- TrueReadOnlyCollection.cs