Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- ParsedAttributeCollection.cs
- TextElementEditingBehaviorAttribute.cs
- DragEvent.cs
- ProviderConnectionPointCollection.cs
- FloaterBaseParagraph.cs
- EntityContainer.cs
- ContentDisposition.cs
- InputLanguageEventArgs.cs
- RegexRunnerFactory.cs
- SQLResource.cs
- DataGridDesigner.cs
- BinaryUtilClasses.cs
- ObjectDataSourceFilteringEventArgs.cs
- Material.cs
- HScrollBar.cs
- PageRanges.cs
- XmlSchemaSimpleContentRestriction.cs
- AdRotatorDesigner.cs
- FileVersion.cs
- LogStream.cs
- LinkUtilities.cs
- UserControlBuildProvider.cs
- WebPartTransformerCollection.cs
- FixedSOMFixedBlock.cs
- SoapReflectionImporter.cs
- SerialErrors.cs
- XmlSchemaInclude.cs
- SuspendDesigner.cs
- HotSpotCollection.cs
- Profiler.cs
- SHA1Managed.cs
- XsltOutput.cs
- TcpTransportManager.cs
- SerializationAttributes.cs
- LinearGradientBrush.cs
- IISUnsafeMethods.cs
- BatchStream.cs
- ParserContext.cs
- x509utils.cs
- XmlText.cs
- CloudCollection.cs
- ConstraintCollection.cs
- ModelService.cs
- TimeSpanConverter.cs
- ProcessManager.cs
- Constants.cs
- VBIdentifierNameEditor.cs
- xml.cs
- TreeView.cs
- CodeCommentStatementCollection.cs
- ApplicationSettingsBase.cs
- SiteMapNodeItemEventArgs.cs
- CodeMemberMethod.cs
- FixedDSBuilder.cs
- GeneralTransformCollection.cs
- CharacterMetrics.cs
- VisemeEventArgs.cs
- JavascriptXmlWriterWrapper.cs
- ScriptModule.cs
- CountdownEvent.cs
- ComponentCollection.cs
- XmlUnspecifiedAttribute.cs
- LineUtil.cs
- DataControlHelper.cs
- DelayLoadType.cs
- LoadMessageLogger.cs
- ErrorFormatterPage.cs
- Rijndael.cs
- DelegateSerializationHolder.cs
- UnsettableComboBox.cs
- KnownColorTable.cs
- KoreanLunisolarCalendar.cs
- ServiceDeploymentInfo.cs
- PassportPrincipal.cs
- OpCodes.cs
- ProofTokenCryptoHandle.cs
- ObjectList.cs
- RawMouseInputReport.cs
- PaintEvent.cs
- ListItem.cs
- SmiMetaData.cs
- DoubleAnimationUsingPath.cs
- StorageRoot.cs
- WebPartConnectionsDisconnectVerb.cs
- TypeExtensionSerializer.cs
- ActivityExecutionContextCollection.cs
- DecimalConstantAttribute.cs
- errorpatternmatcher.cs
- StrongTypingException.cs
- ControlBindingsCollection.cs
- Rect3D.cs
- ISFTagAndGuidCache.cs
- BaseProcessor.cs
- Part.cs
- HandleRef.cs
- DesignerActionKeyboardBehavior.cs
- RepeatButtonAutomationPeer.cs
- DispatcherSynchronizationContext.cs
- NativeMethods.cs
- ScriptManager.cs