Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / Media / Animation / SetStoryboardSpeedRatio.cs / 1 / SetStoryboardSpeedRatio.cs
/****************************************************************************\
*
* File: SetStoryboardSpeedRatio.cs
*
* This object includes a Storyboard reference. When triggered, the Storyboard
* speed ratio is set to the given parameter.
*
* Copyright (C) by Microsoft Corporation. All rights reserved.
*
\***************************************************************************/
using System.ComponentModel; // DefaultValueAttribute
using System.Diagnostics; // Debug.Assert
namespace System.Windows.Media.Animation
{
///
/// SetStoryboardSpeedRatio will set the speed for its Storyboard reference when
/// it is triggered.
///
public sealed class SetStoryboardSpeedRatio : ControllableStoryboardAction
{
///
/// A speed ratio to use for this action. If it is never explicitly
/// specified, it is 1.0.
///
[DefaultValue(1.0)]
public double SpeedRatio
{
get
{
return _speedRatio;
}
set
{
if (IsSealed)
{
throw new InvalidOperationException(SR.Get(SRID.CannotChangeAfterSealed, "SetStoryboardSpeedRatio"));
}
_speedRatio = value;
}
}
///
/// Called when it's time to execute this storyboard action
///
internal override void Invoke( FrameworkElement containingFE, FrameworkContentElement containingFCE, Storyboard storyboard )
{
Debug.Assert( containingFE != null || containingFCE != null,
"Caller of internal function failed to verify that we have a FE or FCE - we have neither." );
if( containingFE != null )
{
storyboard.SetSpeedRatio(containingFE, SpeedRatio);
}
else
{
storyboard.SetSpeedRatio(containingFCE, SpeedRatio);
}
}
double _speedRatio = 1.0;
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
/****************************************************************************\
*
* File: SetStoryboardSpeedRatio.cs
*
* This object includes a Storyboard reference. When triggered, the Storyboard
* speed ratio is set to the given parameter.
*
* Copyright (C) by Microsoft Corporation. All rights reserved.
*
\***************************************************************************/
using System.ComponentModel; // DefaultValueAttribute
using System.Diagnostics; // Debug.Assert
namespace System.Windows.Media.Animation
{
///
/// SetStoryboardSpeedRatio will set the speed for its Storyboard reference when
/// it is triggered.
///
public sealed class SetStoryboardSpeedRatio : ControllableStoryboardAction
{
///
/// A speed ratio to use for this action. If it is never explicitly
/// specified, it is 1.0.
///
[DefaultValue(1.0)]
public double SpeedRatio
{
get
{
return _speedRatio;
}
set
{
if (IsSealed)
{
throw new InvalidOperationException(SR.Get(SRID.CannotChangeAfterSealed, "SetStoryboardSpeedRatio"));
}
_speedRatio = value;
}
}
///
/// Called when it's time to execute this storyboard action
///
internal override void Invoke( FrameworkElement containingFE, FrameworkContentElement containingFCE, Storyboard storyboard )
{
Debug.Assert( containingFE != null || containingFCE != null,
"Caller of internal function failed to verify that we have a FE or FCE - we have neither." );
if( containingFE != null )
{
storyboard.SetSpeedRatio(containingFE, SpeedRatio);
}
else
{
storyboard.SetSpeedRatio(containingFCE, SpeedRatio);
}
}
double _speedRatio = 1.0;
}
}
// 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
- TransactionOptions.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- FontDriver.cs
- XmlBinaryReaderSession.cs
- CompilerErrorCollection.cs
- InternalConfigEventArgs.cs
- VariableDesigner.xaml.cs
- CalendarAutoFormatDialog.cs
- LinqDataSourceInsertEventArgs.cs
- ArgumentDesigner.xaml.cs
- SafeLibraryHandle.cs
- DataObject.cs
- DeclarativeCatalogPart.cs
- _TimerThread.cs
- mda.cs
- UnionCqlBlock.cs
- ContextInformation.cs
- DetailsViewModeEventArgs.cs
- DateTimeParse.cs
- ArgumentValueSerializer.cs
- ToolBarButtonClickEvent.cs
- baseaxisquery.cs
- FrameworkRichTextComposition.cs
- RandomNumberGenerator.cs
- PartitionerStatic.cs
- StrongNameMembershipCondition.cs
- OpenTypeLayout.cs
- SymmetricSecurityProtocol.cs
- CfgParser.cs
- TextSearch.cs
- GridSplitter.cs
- FontStretch.cs
- XmlWhitespace.cs
- ProxyManager.cs
- StorageComplexTypeMapping.cs
- ListBox.cs
- LassoSelectionBehavior.cs
- ContentPropertyAttribute.cs
- DetailsViewInsertEventArgs.cs
- PasswordTextNavigator.cs
- PointCollectionValueSerializer.cs
- _CookieModule.cs
- XPathException.cs
- DataMemberFieldConverter.cs
- ListParaClient.cs
- ImageSource.cs
- DistributedTransactionPermission.cs
- StylusPointPropertyInfoDefaults.cs
- XslException.cs
- securitymgrsite.cs
- Int32AnimationBase.cs
- UIElement3DAutomationPeer.cs
- CacheOutputQuery.cs
- WinFormsSpinner.cs
- StatusBarItem.cs
- WCFModelStrings.Designer.cs
- ZipIOCentralDirectoryFileHeader.cs
- Rotation3DAnimationBase.cs
- ColorAnimation.cs
- WindowPatternIdentifiers.cs
- ApplicationException.cs
- UnsafeNativeMethods.cs
- SequenceNumber.cs
- ConfigXmlAttribute.cs
- SEHException.cs
- StylusButtonEventArgs.cs
- ComponentCollection.cs
- SqlClientPermission.cs
- EditorServiceContext.cs
- ProxyAssemblyNotLoadedException.cs
- RIPEMD160Managed.cs
- Slider.cs
- SR.cs
- WorkflowApplicationCompletedException.cs
- ExitEventArgs.cs
- EdmValidator.cs
- GeometryModel3D.cs
- DbConnectionStringCommon.cs
- Persist.cs
- AssertSection.cs
- RealProxy.cs
- ArcSegment.cs
- SevenBitStream.cs
- UnaryExpression.cs
- GlobalEventManager.cs
- UnknownBitmapEncoder.cs
- Page.cs
- ColumnWidthChangingEvent.cs
- MergeFilterQuery.cs
- UnmanagedHandle.cs
- URLEditor.cs
- WbemProvider.cs
- Internal.cs
- RSAOAEPKeyExchangeFormatter.cs
- ExtensionSimplifierMarkupObject.cs
- CompilationUnit.cs
- CodeTypeMemberCollection.cs
- CaretElement.cs
- FontCollection.cs
- XmlSchemaValidationException.cs