Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Core / CSharp / System / Windows / Media / Animation / HandoffBehavior.cs / 1 / HandoffBehavior.cs
// HandoffBehavior.cs
using MS.Internal.PresentationCore; // FriendAccessAllowed
namespace System.Windows.Media.Animation
{
///
/// Used to specify how new animations will interact with any current
/// animations already applied to a property.
///
public enum HandoffBehavior
{
///
/// New animations will completely replace all current animations
/// on a property. The current value at the time of replacement
/// will be passed into the first new animation as the
/// defaultOriginValue parameter to allow for smooth handoff.
///
SnapshotAndReplace,
///
/// New animations will compose with the current animations. The new
/// animations will be added after the current animations in the
/// composition chain.
///
Compose
}
internal static class HandoffBehaviorEnum
{
// FxCop doesn't like people using Enum.IsDefined for enum validation
// http://fxcop/CostlyCallAlternatives/EnumIsDefined.html
//
// We have this to have the validation code alongside the enum
// definition. (Rather than spread throughtout the codebase causing
// maintenance headaches in the future.)
[FriendAccessAllowed] // Built into Core, also used by Framework.
internal static bool IsDefined( HandoffBehavior handoffBehavior )
{
if( handoffBehavior < HandoffBehavior.SnapshotAndReplace ||
handoffBehavior > HandoffBehavior.Compose )
{
return false;
}
else
{
return true;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
// HandoffBehavior.cs
using MS.Internal.PresentationCore; // FriendAccessAllowed
namespace System.Windows.Media.Animation
{
///
/// Used to specify how new animations will interact with any current
/// animations already applied to a property.
///
public enum HandoffBehavior
{
///
/// New animations will completely replace all current animations
/// on a property. The current value at the time of replacement
/// will be passed into the first new animation as the
/// defaultOriginValue parameter to allow for smooth handoff.
///
SnapshotAndReplace,
///
/// New animations will compose with the current animations. The new
/// animations will be added after the current animations in the
/// composition chain.
///
Compose
}
internal static class HandoffBehaviorEnum
{
// FxCop doesn't like people using Enum.IsDefined for enum validation
// http://fxcop/CostlyCallAlternatives/EnumIsDefined.html
//
// We have this to have the validation code alongside the enum
// definition. (Rather than spread throughtout the codebase causing
// maintenance headaches in the future.)
[FriendAccessAllowed] // Built into Core, also used by Framework.
internal static bool IsDefined( HandoffBehavior handoffBehavior )
{
if( handoffBehavior < HandoffBehavior.SnapshotAndReplace ||
handoffBehavior > HandoffBehavior.Compose )
{
return false;
}
else
{
return true;
}
}
}
}
// 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
- Char.cs
- InvalidWorkflowException.cs
- ParserHooks.cs
- XamlSerializerUtil.cs
- StateInitializationDesigner.cs
- Utils.cs
- ReadOnlyPropertyMetadata.cs
- SymmetricSecurityProtocol.cs
- OperatingSystem.cs
- SpellerStatusTable.cs
- SeparatorAutomationPeer.cs
- TextProperties.cs
- ZoneButton.cs
- WeakReadOnlyCollection.cs
- SqlSelectStatement.cs
- AbstractDataSvcMapFileLoader.cs
- ClientProxyGenerator.cs
- SerializationTrace.cs
- ByeMessageCD1.cs
- ScrollData.cs
- OleAutBinder.cs
- NotifyInputEventArgs.cs
- WebServiceClientProxyGenerator.cs
- FontDialog.cs
- ButtonBaseDesigner.cs
- SqlClientWrapperSmiStream.cs
- List.cs
- AccessDataSource.cs
- ActivityValidationServices.cs
- Glyph.cs
- DisposableCollectionWrapper.cs
- TraceInternal.cs
- MetadataCache.cs
- ClusterSafeNativeMethods.cs
- ToolboxBitmapAttribute.cs
- InternalPermissions.cs
- TraversalRequest.cs
- XmlExpressionDumper.cs
- StaticResourceExtension.cs
- ProcessThreadCollection.cs
- SemanticResolver.cs
- TypeUtil.cs
- RightNameExpirationInfoPair.cs
- MouseWheelEventArgs.cs
- Currency.cs
- WebBrowsableAttribute.cs
- StrokeRenderer.cs
- VersionedStreamOwner.cs
- PenLineJoinValidation.cs
- CannotUnloadAppDomainException.cs
- RelationshipSet.cs
- TdsParserHelperClasses.cs
- SqlInternalConnectionTds.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- ResourceDescriptionAttribute.cs
- BitmapEffectGroup.cs
- StringToken.cs
- AnyAllSearchOperator.cs
- Axis.cs
- DataSvcMapFile.cs
- ToolStripRenderEventArgs.cs
- TextProperties.cs
- SkinBuilder.cs
- NotificationContext.cs
- IteratorDescriptor.cs
- DesignerAutoFormat.cs
- LicenseProviderAttribute.cs
- _SecureChannel.cs
- DataControlFieldCollection.cs
- StandardOleMarshalObject.cs
- AsnEncodedData.cs
- BreakSafeBase.cs
- AnnotationHelper.cs
- ResizeBehavior.cs
- ScalarRestriction.cs
- DataGridTableCollection.cs
- TileModeValidation.cs
- IMembershipProvider.cs
- Misc.cs
- BindingNavigator.cs
- Assert.cs
- SessionMode.cs
- StringFreezingAttribute.cs
- TypeUsage.cs
- Command.cs
- HuffModule.cs
- ProgressPage.cs
- XmlMembersMapping.cs
- SecurityManager.cs
- DesignerActionPanel.cs
- SessionStateItemCollection.cs
- TrustLevel.cs
- StaticDataManager.cs
- MatrixTransform3D.cs
- ApplicationFileCodeDomTreeGenerator.cs
- List.cs
- ProcessHostFactoryHelper.cs
- validation.cs
- OLEDB_Util.cs
- AttachedPropertyMethodSelector.cs