Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / TextDecoration.cs / 1 / TextDecoration.cs
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
//
// Description: TextDecoration class
//
// History:
// 10/14/2004: [....] Created the file
//
//---------------------------------------------------------------------------
using System;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Markup;
namespace System.Windows
{
///
/// A text decoration
///
[Localizability(LocalizationCategory.None)]
public sealed partial class TextDecoration : Animatable
{
///
/// Constructor
///
public TextDecoration()
{
}
///
/// Constructor
///
/// The location of the text decoration
/// The pen used to draw this text decoration
/// The offset of this text decoration to the location
/// The unit of the offset
/// The unit of the thickness of the pen
public TextDecoration(
TextDecorationLocation location,
Pen pen,
double penOffset,
TextDecorationUnit penOffsetUnit,
TextDecorationUnit penThicknessUnit
)
{
Location = location;
Pen = pen;
PenOffset = penOffset;
PenOffsetUnit = penOffsetUnit;
PenThicknessUnit = penThicknessUnit;
}
///
/// Compare the values of thhe properties in the two TextDecoration objects
///
/// The TextDecoration object to be compared against
/// True if their property values are equal. False otherwise
///
/// The method doesn't check "full" equality as it can not take into account of all the possible
/// values associated with the DependencyObject,such as Animation, DataBinding and Attached property.
/// It only compares the public properties to serve the specific Framework's needs in inline property
/// management and Editing serialization.
///
internal bool ValueEquals(TextDecoration textDecoration)
{
if (textDecoration == null)
return false; // o is either null or not a TextDecoration object.
if (this == textDecoration)
return true; // reference equality.
return (
Location == textDecoration.Location
&& PenOffset == textDecoration.PenOffset
&& PenOffsetUnit == textDecoration.PenOffsetUnit
&& PenThicknessUnit == textDecoration.PenThicknessUnit
&& (Pen == null ? textDecoration.Pen == null : Pen.Equals( textDecoration.Pen))
);
}
}
}
// 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
- CodeCommentStatementCollection.cs
- SymbolPair.cs
- FixedDocumentSequencePaginator.cs
- BackStopAuthenticationModule.cs
- CompositionAdorner.cs
- PropertySegmentSerializationProvider.cs
- XmlMessageFormatter.cs
- OdbcReferenceCollection.cs
- StylusOverProperty.cs
- SizeLimitedCache.cs
- LeafCellTreeNode.cs
- PerformanceCounter.cs
- ReachBasicContext.cs
- ArgumentValidation.cs
- NavigationCommands.cs
- ECDsaCng.cs
- ILGenerator.cs
- AuthenticationConfig.cs
- ChangePasswordDesigner.cs
- DbResourceAllocator.cs
- DashStyles.cs
- PersonalizableTypeEntry.cs
- Formatter.cs
- QilTernary.cs
- CompiledRegexRunnerFactory.cs
- CommonEndpointBehaviorElement.cs
- BaseParser.cs
- ServicePerformanceCounters.cs
- NavigationService.cs
- HostProtectionException.cs
- DisplayInformation.cs
- RectAnimationUsingKeyFrames.cs
- DeviceSpecific.cs
- _SslState.cs
- DataListCommandEventArgs.cs
- LicenseManager.cs
- OpacityConverter.cs
- TextFormatter.cs
- TheQuery.cs
- filewebrequest.cs
- FillRuleValidation.cs
- XmlTypeAttribute.cs
- ProjectionCamera.cs
- SignerInfo.cs
- FieldTemplateFactory.cs
- SqlConnectionStringBuilder.cs
- TreeBuilderBamlTranslator.cs
- ScriptControlManager.cs
- BindingListCollectionView.cs
- SqlFlattener.cs
- HandoffBehavior.cs
- SqlParameterizer.cs
- MobileControlsSectionHelper.cs
- LongSumAggregationOperator.cs
- MasterPageCodeDomTreeGenerator.cs
- ExecutedRoutedEventArgs.cs
- UrlPropertyAttribute.cs
- ImageIndexConverter.cs
- ServiceEndpointCollection.cs
- Rotation3DAnimation.cs
- CancellationState.cs
- CellRelation.cs
- __Filters.cs
- StrokeCollectionDefaultValueFactory.cs
- WmfPlaceableFileHeader.cs
- SingleObjectCollection.cs
- XmlQualifiedName.cs
- DrawingCollection.cs
- FamilyCollection.cs
- ColorBlend.cs
- ValueSerializerAttribute.cs
- FromRequest.cs
- MaxSessionCountExceededException.cs
- WebPartConnectionsConfigureVerb.cs
- DataGridViewEditingControlShowingEventArgs.cs
- OptimizedTemplateContentHelper.cs
- ValueTypeIndexerReference.cs
- PerformanceCounterPermissionEntryCollection.cs
- HtmlValidationSummaryAdapter.cs
- DataGridCommandEventArgs.cs
- SchemaElementLookUpTable.cs
- CompilerScope.Storage.cs
- ProcessModelInfo.cs
- AppDomainFactory.cs
- ZipIORawDataFileBlock.cs
- ProxyWebPartManagerDesigner.cs
- Journaling.cs
- TypeDelegator.cs
- ByteAnimationUsingKeyFrames.cs
- SchemaLookupTable.cs
- CodeRegionDirective.cs
- ProgressBar.cs
- WebPartDisplayModeCancelEventArgs.cs
- NavigationHelper.cs
- OdbcFactory.cs
- FontWeight.cs
- SQLGuidStorage.cs
- Table.cs
- PermissionListSet.cs
- VirtualPath.cs