Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- SourceChangedEventArgs.cs
- QueryStringParameter.cs
- GridErrorDlg.cs
- SharedConnectionListener.cs
- WebBaseEventKeyComparer.cs
- OdbcConnection.cs
- HtmlValidatorAdapter.cs
- OrderedDictionary.cs
- FieldMetadata.cs
- SoapReflectionImporter.cs
- TaskHelper.cs
- HMAC.cs
- XmlConvert.cs
- CAGDesigner.cs
- MatrixTransform.cs
- XNodeValidator.cs
- ToolStripKeyboardHandlingService.cs
- TrackingQueryElement.cs
- TemplateComponentConnector.cs
- Stack.cs
- RelationshipSet.cs
- CompilationUtil.cs
- XPathMultyIterator.cs
- AutomationPropertyInfo.cs
- CompoundFileStorageReference.cs
- ValidationErrorEventArgs.cs
- DataServiceExpressionVisitor.cs
- _StreamFramer.cs
- HTTPRemotingHandler.cs
- TextBoxAutoCompleteSourceConverter.cs
- WebConfigurationHostFileChange.cs
- ToolBarButtonClickEvent.cs
- GradientStopCollection.cs
- FixedSOMGroup.cs
- _NetRes.cs
- CodeTypeMember.cs
- Int16Storage.cs
- QueryContinueDragEvent.cs
- ProxyFragment.cs
- TrustManager.cs
- SqlConnectionPoolProviderInfo.cs
- LocationUpdates.cs
- ListChangedEventArgs.cs
- SqlNamer.cs
- Tuple.cs
- AppSettingsReader.cs
- LineGeometry.cs
- AspProxy.cs
- ClaimTypeRequirement.cs
- DodSequenceMerge.cs
- KeySpline.cs
- NullableDecimalAverageAggregationOperator.cs
- MessageQueueKey.cs
- BinaryNode.cs
- TextDataBindingHandler.cs
- UnsafeMethods.cs
- PartialList.cs
- SqlUdtInfo.cs
- ControlBindingsCollection.cs
- EnumValAlphaComparer.cs
- UnsafeNativeMethodsTablet.cs
- AbandonedMutexException.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- ShellProvider.cs
- ThrowHelper.cs
- nulltextnavigator.cs
- OdbcRowUpdatingEvent.cs
- Pen.cs
- QueryLifecycle.cs
- UserUseLicenseDictionaryLoader.cs
- CompiledIdentityConstraint.cs
- PathGeometry.cs
- HostedHttpRequestAsyncResult.cs
- EnvelopedPkcs7.cs
- DataSourceNameHandler.cs
- EdgeModeValidation.cs
- LocationInfo.cs
- xamlnodes.cs
- LabelAutomationPeer.cs
- ExceptionValidationRule.cs
- InvalidPropValue.cs
- TransformDescriptor.cs
- InternalCache.cs
- Int32Storage.cs
- DelegatingTypeDescriptionProvider.cs
- BitmapEffectGroup.cs
- PenLineJoinValidation.cs
- CodeDirectionExpression.cs
- SqlNotificationEventArgs.cs
- StreamAsIStream.cs
- Int64.cs
- DocumentSchemaValidator.cs
- HGlobalSafeHandle.cs
- LongValidatorAttribute.cs
- HttpVersion.cs
- UnsafeNativeMethods.cs
- Hash.cs
- SamlAdvice.cs
- VirtualPathProvider.cs
- LinqDataSource.cs