Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Framework / System / Windows / Media / Animation / PauseStoryboard.cs / 1 / PauseStoryboard.cs
/****************************************************************************\
*
* File: PauseStoryboard.cs
*
* This object includes a Storyboard reference. When triggered, the Storyboard
* is paused.
*
* Copyright (C) by Microsoft Corporation. All rights reserved.
*
\***************************************************************************/
using System.Diagnostics; // Debug.Assert
namespace System.Windows.Media.Animation
{
///
/// PauseStoryboard will call pause on its Storyboard reference when
/// it is triggered.
///
public sealed class PauseStoryboard : ControllableStoryboardAction
{
///
/// 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.Pause(containingFE);
}
else
{
storyboard.Pause(containingFCE);
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
/****************************************************************************\
*
* File: PauseStoryboard.cs
*
* This object includes a Storyboard reference. When triggered, the Storyboard
* is paused.
*
* Copyright (C) by Microsoft Corporation. All rights reserved.
*
\***************************************************************************/
using System.Diagnostics; // Debug.Assert
namespace System.Windows.Media.Animation
{
///
/// PauseStoryboard will call pause on its Storyboard reference when
/// it is triggered.
///
public sealed class PauseStoryboard : ControllableStoryboardAction
{
///
/// 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.Pause(containingFE);
}
else
{
storyboard.Pause(containingFCE);
}
}
}
}
// 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
- StylusPointCollection.cs
- EllipseGeometry.cs
- SafeNativeMethods.cs
- ZipIOCentralDirectoryBlock.cs
- EmptyEnumerator.cs
- ContentType.cs
- CodeCommentStatement.cs
- DockPattern.cs
- X509Chain.cs
- dsa.cs
- Tokenizer.cs
- LZCodec.cs
- TextWriterEngine.cs
- NonParentingControl.cs
- RouteItem.cs
- RawAppCommandInputReport.cs
- QuaternionRotation3D.cs
- ParameterReplacerVisitor.cs
- RoutedEvent.cs
- HeaderedItemsControl.cs
- ScriptManager.cs
- EncryptedData.cs
- CustomError.cs
- ToolStripDropDownItemDesigner.cs
- _UriSyntax.cs
- QilReference.cs
- UndoManager.cs
- PageResolution.cs
- ScrollItemPattern.cs
- MultiBinding.cs
- FrameworkElementFactory.cs
- ResourcesChangeInfo.cs
- DesignerActionPanel.cs
- UpDownBaseDesigner.cs
- WsiProfilesElementCollection.cs
- HttpGetProtocolReflector.cs
- SecurityDescriptor.cs
- GPPOINT.cs
- Attachment.cs
- ButtonStandardAdapter.cs
- CopyOfAction.cs
- AsyncCompletedEventArgs.cs
- ToolStripItemRenderEventArgs.cs
- KoreanLunisolarCalendar.cs
- _HelperAsyncResults.cs
- ExcCanonicalXml.cs
- OdbcPermission.cs
- CertificateManager.cs
- HashCodeCombiner.cs
- HttpCapabilitiesSectionHandler.cs
- TableStyle.cs
- DecoderFallback.cs
- BrowserDefinition.cs
- CallId.cs
- DoubleLink.cs
- ProfileInfo.cs
- DateTimeOffset.cs
- RouteValueExpressionBuilder.cs
- handlecollector.cs
- LocalizationParserHooks.cs
- CounterNameConverter.cs
- KeyFrames.cs
- InputMethod.cs
- SchemaCollectionPreprocessor.cs
- ApplicationServiceHelper.cs
- XmlAggregates.cs
- UriParserTemplates.cs
- WebRequest.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- HttpListenerContext.cs
- InteropExecutor.cs
- DistinctQueryOperator.cs
- DispatcherEventArgs.cs
- FrameDimension.cs
- StatusStrip.cs
- XPathDocumentIterator.cs
- ImageInfo.cs
- CorrelationInitializer.cs
- DefaultSerializationProviderAttribute.cs
- FontCacheUtil.cs
- PartialArray.cs
- CopyAttributesAction.cs
- SecurityUtils.cs
- ExceptionHandler.cs
- EnumValidator.cs
- ComponentChangedEvent.cs
- XmlSerializer.cs
- SmtpReplyReaderFactory.cs
- DirtyTextRange.cs
- ProxyWebPartManagerDesigner.cs
- DocumentXmlWriter.cs
- DictionaryKeyPropertyAttribute.cs
- MouseActionValueSerializer.cs
- CodeCatchClause.cs
- InnerItemCollectionView.cs
- HiddenFieldDesigner.cs
- IntellisenseTextBox.cs
- WebColorConverter.cs
- Attachment.cs
- GraphicsState.cs