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
- ToolStripDropDownClosedEventArgs.cs
- RelationshipSet.cs
- invalidudtexception.cs
- DataGridViewSelectedCellCollection.cs
- NameNode.cs
- DataGrid.cs
- ObjectAssociationEndMapping.cs
- InstanceHandleConflictException.cs
- ServiceContractDetailViewControl.cs
- AsnEncodedData.cs
- GenericTypeParameterConverter.cs
- ZipFileInfo.cs
- ToolboxComponentsCreatedEventArgs.cs
- XmlBinaryReader.cs
- CodeDelegateInvokeExpression.cs
- StrokeCollectionDefaultValueFactory.cs
- ResourceExpressionBuilder.cs
- AlphaSortedEnumConverter.cs
- LambdaCompiler.cs
- Msec.cs
- DataObject.cs
- CrossSiteScriptingValidation.cs
- CodeCommentStatement.cs
- ScrollViewer.cs
- UnmanagedBitmapWrapper.cs
- DependencyPropertyKey.cs
- ProgressBarAutomationPeer.cs
- ConfigurationElementCollection.cs
- EncryptedData.cs
- RoleServiceManager.cs
- _Win32.cs
- Style.cs
- AsmxEndpointPickerExtension.cs
- ReferencedAssembly.cs
- DataColumnMapping.cs
- EpmContentSerializer.cs
- RelationalExpressions.cs
- _LocalDataStoreMgr.cs
- ObservableDictionary.cs
- SamlAuthenticationClaimResource.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- BamlRecordWriter.cs
- ListSourceHelper.cs
- Part.cs
- TemplateControl.cs
- EncryptionUtility.cs
- PixelFormatConverter.cs
- XmlAutoDetectWriter.cs
- PackageDigitalSignatureManager.cs
- PermissionSetTriple.cs
- Int32CollectionConverter.cs
- ContextStack.cs
- DataControlButton.cs
- ApplicationInfo.cs
- DataGridParentRows.cs
- XmlIgnoreAttribute.cs
- ResolveNameEventArgs.cs
- DbProviderFactories.cs
- SiteMapPath.cs
- documentsequencetextview.cs
- VisemeEventArgs.cs
- BrushMappingModeValidation.cs
- StorageEntitySetMapping.cs
- AdRotator.cs
- AudioDeviceOut.cs
- NavigationProgressEventArgs.cs
- SapiAttributeParser.cs
- XmlSchemaValidationException.cs
- DesignerActionListCollection.cs
- RequestCacheValidator.cs
- ConfigXmlWhitespace.cs
- SlipBehavior.cs
- TCPClient.cs
- InstancePersistence.cs
- SemanticAnalyzer.cs
- ListChangedEventArgs.cs
- OdbcFactory.cs
- Evidence.cs
- OptimizedTemplateContent.cs
- LinearKeyFrames.cs
- DesignerOptionService.cs
- ObjectContextServiceProvider.cs
- TabOrder.cs
- TypeRestriction.cs
- Padding.cs
- Internal.cs
- AudienceUriMode.cs
- HtmlTitle.cs
- NumberEdit.cs
- OuterGlowBitmapEffect.cs
- TimeSpanSecondsConverter.cs
- UiaCoreProviderApi.cs
- CompositeActivityDesigner.cs
- HostUtils.cs
- MethodCallConverter.cs
- PageThemeCodeDomTreeGenerator.cs
- AutomationPropertyInfo.cs
- DocobjHost.cs
- ComponentChangedEvent.cs
- PlaceHolder.cs