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
- SchemaImporter.cs
- SafeEventHandle.cs
- SpecularMaterial.cs
- AnimationException.cs
- LocalizableResourceBuilder.cs
- FormattedText.cs
- BindingExpression.cs
- AuthenticationService.cs
- SerializationInfo.cs
- TextSimpleMarkerProperties.cs
- TrackingServices.cs
- TextUtf8RawTextWriter.cs
- CookieHandler.cs
- FileInfo.cs
- SettingsPropertyWrongTypeException.cs
- SparseMemoryStream.cs
- VisualStateChangedEventArgs.cs
- CommandBindingCollection.cs
- BaseTemplateParser.cs
- DataFormats.cs
- ScriptMethodAttribute.cs
- ScrollPatternIdentifiers.cs
- SerializationInfoEnumerator.cs
- AppDomain.cs
- DbXmlEnabledProviderManifest.cs
- DragSelectionMessageFilter.cs
- ParallelTimeline.cs
- Bold.cs
- LazyTextWriterCreator.cs
- FacetChecker.cs
- SqlResolver.cs
- BuiltInExpr.cs
- XmlSchemaImporter.cs
- BatchWriter.cs
- ParallelDesigner.cs
- RoutedEventArgs.cs
- DataIdProcessor.cs
- TreeView.cs
- TreeNodeMouseHoverEvent.cs
- behaviorssection.cs
- typedescriptorpermission.cs
- CompatibleComparer.cs
- DnsEndpointIdentity.cs
- ArgumentValueSerializer.cs
- TextEffect.cs
- ReaderContextStackData.cs
- DesignerListAdapter.cs
- ActivityExecutionContextCollection.cs
- DoubleMinMaxAggregationOperator.cs
- RsaSecurityTokenAuthenticator.cs
- PointAnimationClockResource.cs
- EditableRegion.cs
- XamlStream.cs
- FormsAuthenticationEventArgs.cs
- SourceFileInfo.cs
- ProtocolImporter.cs
- KeyInstance.cs
- UserControlBuildProvider.cs
- DataTableNameHandler.cs
- PageStatePersister.cs
- WebInvokeAttribute.cs
- Types.cs
- TextSerializer.cs
- ClusterRegistryConfigurationProvider.cs
- DispatcherExceptionFilterEventArgs.cs
- MasterPage.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- WindowsListViewSubItem.cs
- SqlClientWrapperSmiStreamChars.cs
- LinqExpressionNormalizer.cs
- NonParentingControl.cs
- EntitySetBaseCollection.cs
- PathParser.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- NamespaceQuery.cs
- MaterialGroup.cs
- FontEmbeddingManager.cs
- ApplicationDirectory.cs
- FieldToken.cs
- KnownTypeHelper.cs
- BinaryObjectWriter.cs
- AvtEvent.cs
- DbSourceCommand.cs
- BoolLiteral.cs
- TypeConverterMarkupExtension.cs
- BitmapEffectGroup.cs
- WmpBitmapEncoder.cs
- MembershipPasswordException.cs
- SymDocumentType.cs
- MenuItemCollection.cs
- TypeCodeDomSerializer.cs
- WebPartUtil.cs
- QueryCacheKey.cs
- DocumentPageViewAutomationPeer.cs
- TcpConnectionPool.cs
- NumericUpDownAccelerationCollection.cs
- ProxySimple.cs
- TemplateControlParser.cs
- Delegate.cs
- ITreeGenerator.cs