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
- SrgsItemList.cs
- MethodImplAttribute.cs
- WindowsListView.cs
- BindingObserver.cs
- CacheOutputQuery.cs
- NativeRecognizer.cs
- FormsAuthenticationEventArgs.cs
- FixedSOMSemanticBox.cs
- Msec.cs
- SafeTimerHandle.cs
- InvokeGenerator.cs
- EventProvider.cs
- FontStretches.cs
- Quack.cs
- PenLineJoinValidation.cs
- ItemPager.cs
- ModelPerspective.cs
- RecognitionResult.cs
- DependencyPropertyDescriptor.cs
- IntAverageAggregationOperator.cs
- DataGridRow.cs
- SerializerDescriptor.cs
- SignedXmlDebugLog.cs
- IPeerNeighbor.cs
- XmlProcessingInstruction.cs
- DataBinder.cs
- ScrollBar.cs
- FixedDSBuilder.cs
- SaveFileDialog.cs
- GridViewRow.cs
- DocumentEventArgs.cs
- CellLabel.cs
- IgnoreDeviceFilterElementCollection.cs
- DataGridCellItemAutomationPeer.cs
- SynchronizedInputHelper.cs
- Material.cs
- UriTemplatePathSegment.cs
- Vector3DValueSerializer.cs
- PseudoWebRequest.cs
- ToolStripRendererSwitcher.cs
- DataPagerFieldItem.cs
- Win32Exception.cs
- ScriptComponentDescriptor.cs
- ColumnPropertiesGroup.cs
- ConnectionManagementElementCollection.cs
- CngProperty.cs
- DynamicILGenerator.cs
- ZipIOExtraFieldPaddingElement.cs
- CSharpCodeProvider.cs
- SafeFreeMibTable.cs
- SoapSchemaImporter.cs
- DataMisalignedException.cs
- SoapMessage.cs
- Help.cs
- ServiceDocumentFormatter.cs
- PrintDialog.cs
- DefaultMemberAttribute.cs
- ThumbAutomationPeer.cs
- CounterNameConverter.cs
- SafeHandle.cs
- TerminatorSinks.cs
- CodeIterationStatement.cs
- PrePrepareMethodAttribute.cs
- DBNull.cs
- _LocalDataStoreMgr.cs
- SchemaElementLookUpTable.cs
- ArithmeticException.cs
- QilLoop.cs
- XmlAttributeHolder.cs
- ComPlusTypeValidator.cs
- XhtmlBasicPageAdapter.cs
- HtmlElementCollection.cs
- UpdatableWrapper.cs
- MessageSmuggler.cs
- ControlBuilderAttribute.cs
- MimeWriter.cs
- BufferedWebEventProvider.cs
- SafeSecurityHandles.cs
- CursorConverter.cs
- ReflectEventDescriptor.cs
- ResumeStoryboard.cs
- XmlWhitespace.cs
- CalculatedColumn.cs
- ProfileService.cs
- Action.cs
- ZipPackagePart.cs
- mactripleDES.cs
- NetSectionGroup.cs
- FlowDocumentPage.cs
- SignatureResourcePool.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- WebPartDescription.cs
- unsafeIndexingFilterStream.cs
- BaseTreeIterator.cs
- NotImplementedException.cs
- odbcmetadatacollectionnames.cs
- LabelLiteral.cs
- UntypedNullExpression.cs
- BodyGlyph.cs
- TextEffect.cs