Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- EntityAdapter.cs
- SByteStorage.cs
- SerializationEventsCache.cs
- ExtendedPropertyDescriptor.cs
- SimpleFileLog.cs
- RectKeyFrameCollection.cs
- ProfileSettings.cs
- InvalidateEvent.cs
- XmlNodeList.cs
- CodeSubDirectory.cs
- Hex.cs
- Evidence.cs
- DateTimeConstantAttribute.cs
- NullPackagingPolicy.cs
- COM2Enum.cs
- HuffModule.cs
- CatalogPartChrome.cs
- PointHitTestResult.cs
- MemberDescriptor.cs
- PropertyMapper.cs
- StorageAssociationTypeMapping.cs
- WebPartEditorApplyVerb.cs
- TableLayoutSettingsTypeConverter.cs
- StringResourceManager.cs
- DoubleStorage.cs
- AudioBase.cs
- HyperLinkColumn.cs
- OleDbRowUpdatingEvent.cs
- WebPartConnectVerb.cs
- SiteMapNodeCollection.cs
- RotateTransform.cs
- PropertyGridEditorPart.cs
- PropertyIDSet.cs
- DataDocumentXPathNavigator.cs
- DataGridColumn.cs
- ToolStripContainer.cs
- NonParentingControl.cs
- ObjectView.cs
- DbConnectionStringBuilder.cs
- FontWeightConverter.cs
- EntityDesignPluralizationHandler.cs
- ShaderEffect.cs
- FontFamily.cs
- ManifestBasedResourceGroveler.cs
- UrlUtility.cs
- SQLBytesStorage.cs
- ResourceManagerWrapper.cs
- DrawingAttributesDefaultValueFactory.cs
- UmAlQuraCalendar.cs
- StringUtil.cs
- MasterPage.cs
- Dump.cs
- SHA512Managed.cs
- XPathNodeIterator.cs
- ConfigurationStrings.cs
- TTSEngineProxy.cs
- _RequestCacheProtocol.cs
- Function.cs
- sitestring.cs
- BaseDataListComponentEditor.cs
- ListViewGroupItemCollection.cs
- PreviousTrackingServiceAttribute.cs
- CodeVariableDeclarationStatement.cs
- WsrmTraceRecord.cs
- ProcessModelInfo.cs
- XmlName.cs
- XmlWellformedWriter.cs
- WebBrowserNavigatingEventHandler.cs
- TableLayoutPanel.cs
- ServiceObjectContainer.cs
- RewritingPass.cs
- FlowDocumentReader.cs
- BoolExpr.cs
- COM2ComponentEditor.cs
- CompatibleComparer.cs
- OrderByQueryOptionExpression.cs
- NotConverter.cs
- EarlyBoundInfo.cs
- SmtpCommands.cs
- GenericWebPart.cs
- Emitter.cs
- SmiContextFactory.cs
- ContextMarshalException.cs
- HeaderedItemsControl.cs
- EndpointDiscoveryMetadataCD1.cs
- ExternalFile.cs
- ProfilePropertySettings.cs
- RunWorkerCompletedEventArgs.cs
- dbenumerator.cs
- SaveFileDialog.cs
- ToolStripPanelCell.cs
- TimeManager.cs
- IIS7UserPrincipal.cs
- HMACSHA384.cs
- HtmlControl.cs
- ServiceDesigner.cs
- LinqDataView.cs
- SqlProviderServices.cs
- shaper.cs
- ToolBar.cs