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
- AppDomainAttributes.cs
- SerializationInfoEnumerator.cs
- FormatVersion.cs
- ItemChangedEventArgs.cs
- RC2CryptoServiceProvider.cs
- GiveFeedbackEvent.cs
- CodeTypeMember.cs
- AuthenticatingEventArgs.cs
- DataGridViewRowPrePaintEventArgs.cs
- ConnectionConsumerAttribute.cs
- Timeline.cs
- InternalException.cs
- SoapSchemaImporter.cs
- TimeZone.cs
- EnumerableValidator.cs
- BaseInfoTable.cs
- CurrentChangedEventManager.cs
- ServiceMemoryGates.cs
- SqlClientWrapperSmiStream.cs
- GlyphRunDrawing.cs
- CapabilitiesState.cs
- PointHitTestResult.cs
- DispatcherEventArgs.cs
- ErrorWrapper.cs
- ConfigurationValidatorAttribute.cs
- DetailsViewDeleteEventArgs.cs
- PathGradientBrush.cs
- XmlRawWriterWrapper.cs
- DurationConverter.cs
- Util.cs
- WorkflowServiceBehavior.cs
- CodeParameterDeclarationExpressionCollection.cs
- SemanticKeyElement.cs
- PhysicalAddress.cs
- PageThemeBuildProvider.cs
- MouseBinding.cs
- PrimitiveXmlSerializers.cs
- mil_sdk_version.cs
- ControlCollection.cs
- NamespaceMapping.cs
- XmlSchemaImport.cs
- MemoryFailPoint.cs
- ApplicationDirectoryMembershipCondition.cs
- Tuple.cs
- MergablePropertyAttribute.cs
- RegexTree.cs
- StringUtil.cs
- StringResourceManager.cs
- SqlIdentifier.cs
- KeyGestureValueSerializer.cs
- GrammarBuilderPhrase.cs
- BitmapEffectInputData.cs
- Enum.cs
- ControlType.cs
- BaseProcessor.cs
- ApplicationServiceHelper.cs
- DataGridViewSelectedCellCollection.cs
- EventlogProvider.cs
- DispatcherSynchronizationContext.cs
- XmlSerializerVersionAttribute.cs
- QilParameter.cs
- BaseTemplateBuildProvider.cs
- UserControlAutomationPeer.cs
- HwndAppCommandInputProvider.cs
- AVElementHelper.cs
- SubqueryTrackingVisitor.cs
- ServiceModelSecurityTokenTypes.cs
- NoneExcludedImageIndexConverter.cs
- NameValuePair.cs
- DataGridrowEditEndingEventArgs.cs
- ISessionStateStore.cs
- SByte.cs
- PresentationTraceSources.cs
- QueryOperationResponseOfT.cs
- SqlCacheDependencySection.cs
- objectresult_tresulttype.cs
- DrawingDrawingContext.cs
- DebugInfoExpression.cs
- DefaultHttpHandler.cs
- DispatcherSynchronizationContext.cs
- RecoverInstanceLocksCommand.cs
- CompatibleComparer.cs
- Wow64ConfigurationLoader.cs
- itemelement.cs
- InternalCompensate.cs
- ServiceHost.cs
- TransactionFlowBindingElement.cs
- GridLength.cs
- XmlQualifiedNameTest.cs
- ZipFileInfo.cs
- DataGridColumnCollection.cs
- AppDomainProtocolHandler.cs
- DiscardableAttribute.cs
- MediaTimeline.cs
- IncrementalCompileAnalyzer.cs
- Popup.cs
- OperationPickerDialog.cs
- CryptoApi.cs
- WebPartEditorOkVerb.cs
- ListViewAutomationPeer.cs