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
- WebRequestModuleElement.cs
- FragmentQueryProcessor.cs
- PassportAuthentication.cs
- XmlNamespaceManager.cs
- IItemProperties.cs
- SchemaReference.cs
- _DigestClient.cs
- ThreadInterruptedException.cs
- SemanticBasicElement.cs
- SpinWait.cs
- AuthorizationContext.cs
- FontStretchConverter.cs
- DropSourceBehavior.cs
- WinFormsUtils.cs
- CompModSwitches.cs
- GlobalizationAssembly.cs
- ServiceNotStartedException.cs
- LayoutUtils.cs
- DetailsViewRowCollection.cs
- PatternMatcher.cs
- MobileControlsSectionHandler.cs
- DialogResultConverter.cs
- FrameworkContextData.cs
- StorageAssociationSetMapping.cs
- NameValueFileSectionHandler.cs
- SqlBinder.cs
- CreationContext.cs
- _AutoWebProxyScriptEngine.cs
- WorkflowValidationFailedException.cs
- RestHandler.cs
- ListView.cs
- Vector.cs
- SqlProcedureAttribute.cs
- MimePart.cs
- Focus.cs
- SslStreamSecurityBindingElement.cs
- ToolStripItemGlyph.cs
- Matrix3DValueSerializer.cs
- FileNotFoundException.cs
- LinkedResourceCollection.cs
- ThumbButtonInfoCollection.cs
- XPathBuilder.cs
- safemediahandle.cs
- ContentPlaceHolder.cs
- MemoryMappedViewAccessor.cs
- ParallelEnumerable.cs
- DataSourceView.cs
- SqlProcedureAttribute.cs
- ObjectSet.cs
- AttachedProperty.cs
- TypeConverterValueSerializer.cs
- ISFClipboardData.cs
- BuildManagerHost.cs
- WindowsMenu.cs
- precedingsibling.cs
- PrintPreviewDialog.cs
- RoleServiceManager.cs
- BufferModesCollection.cs
- ApplyImportsAction.cs
- SubstitutionDesigner.cs
- HttpSocketManager.cs
- AnnotationObservableCollection.cs
- TypefaceMap.cs
- DynamicDocumentPaginator.cs
- ToolStripDropDownMenu.cs
- CqlQuery.cs
- ConstNode.cs
- PropertyGridEditorPart.cs
- TypeContext.cs
- OperatingSystem.cs
- SemaphoreSecurity.cs
- StorageEntityContainerMapping.cs
- PageParserFilter.cs
- FixedSOMGroup.cs
- SafeNativeMethods.cs
- Label.cs
- InternalConfigRoot.cs
- XmlHierarchicalDataSourceView.cs
- TextBox.cs
- WebPartConnectionsCancelEventArgs.cs
- HtmlCommandAdapter.cs
- ViewKeyConstraint.cs
- basecomparevalidator.cs
- MsmqOutputSessionChannel.cs
- FrameworkTextComposition.cs
- HashMembershipCondition.cs
- VectorCollection.cs
- WindowsSlider.cs
- ZipIOModeEnforcingStream.cs
- Preprocessor.cs
- DisposableCollectionWrapper.cs
- Preprocessor.cs
- SourceElementsCollection.cs
- CqlErrorHelper.cs
- ResourcesGenerator.cs
- UriPrefixTable.cs
- HtmlInputRadioButton.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- EarlyBoundInfo.cs
- ListViewItem.cs