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
- PenContext.cs
- SerializationInfoEnumerator.cs
- HttpListenerException.cs
- Material.cs
- DockProviderWrapper.cs
- SrgsDocument.cs
- ManipulationDelta.cs
- OleDbConnection.cs
- EditorPartDesigner.cs
- XmlReturnWriter.cs
- MSHTMLHost.cs
- XmlSchemaAnnotation.cs
- TransformerInfo.cs
- DoubleAnimationUsingPath.cs
- PackagePartCollection.cs
- MachineKeySection.cs
- GridViewPageEventArgs.cs
- SpeakInfo.cs
- ReceiveMessageContent.cs
- DataPagerFieldCollection.cs
- HistoryEventArgs.cs
- DispatcherExceptionEventArgs.cs
- InputBinder.cs
- ProxyWebPartManager.cs
- HwndStylusInputProvider.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- ThreadInterruptedException.cs
- StrokeNodeData.cs
- TemplateBindingExpression.cs
- ExpandoClass.cs
- AnnotationService.cs
- SafeEventLogWriteHandle.cs
- BaseCodeDomTreeGenerator.cs
- NamedPermissionSet.cs
- HorizontalAlignConverter.cs
- ListViewItemSelectionChangedEvent.cs
- AbandonedMutexException.cs
- ObfuscationAttribute.cs
- TypeResolver.cs
- SiteIdentityPermission.cs
- CodePageEncoding.cs
- WebConfigurationHost.cs
- SwitchLevelAttribute.cs
- DBCSCodePageEncoding.cs
- Profiler.cs
- WorkflowCommandExtensionItem.cs
- Accessible.cs
- OLEDB_Util.cs
- TreeView.cs
- HtmlValidationSummaryAdapter.cs
- NameValuePair.cs
- UnknownBitmapDecoder.cs
- FrameSecurityDescriptor.cs
- XmlNavigatorFilter.cs
- CompositeFontFamily.cs
- GetLedgerRequest.cs
- ServiceDescriptionData.cs
- ListContractAdapter.cs
- UniqueIdentifierService.cs
- ChangeInterceptorAttribute.cs
- SafeProcessHandle.cs
- ApplicationServiceManager.cs
- DataSetUtil.cs
- WebPartConnectionsCancelEventArgs.cs
- HttpApplication.cs
- PeerCollaborationPermission.cs
- GridSplitter.cs
- ScriptingWebServicesSectionGroup.cs
- WeakReference.cs
- FixedSOMElement.cs
- PolygonHotSpot.cs
- Simplifier.cs
- FastPropertyAccessor.cs
- Point3DCollectionConverter.cs
- SrgsOneOf.cs
- CheckBoxField.cs
- DocumentSequenceHighlightLayer.cs
- DesignerEditorPartChrome.cs
- WebPartConnectionsCancelEventArgs.cs
- DummyDataSource.cs
- XmlDocument.cs
- Label.cs
- ResourceCodeDomSerializer.cs
- FileNotFoundException.cs
- Content.cs
- GridEntry.cs
- IncrementalReadDecoders.cs
- Property.cs
- StringResourceManager.cs
- OutputCacheModule.cs
- __TransparentProxy.cs
- WebEventCodes.cs
- DoubleCollection.cs
- EventLogEntry.cs
- GridViewColumn.cs
- ThreadStateException.cs
- DataTableMappingCollection.cs
- RootBrowserWindowAutomationPeer.cs
- ActivityBuilderHelper.cs
- FormViewPagerRow.cs