Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / Media / RenderCapability.cs / 1 / RenderCapability.cs
//------------------------------------------------------------------------------ // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: // The RenderCapability class allows clients to query for the current // render tier associated with their Dispatcher and to register for // notification on change. // //----------------------------------------------------------------------------- using System; using System.Diagnostics; namespace System.Windows.Media { ////// RenderCapability - /// The RenderCapability class allows clients to query for the current /// render tier associated with their Dispatcher and to register for /// notification on change. /// public static class RenderCapability { ////// Tier Property - returns the current render tier for the Dispatcher associated /// with the current thread. /// public static int Tier { get { MediaContext mediaContext = MediaContext.CurrentMediaContext; // The Dispatcher auto-creates if there is no Dispatcher associated with this // thread, and the MediaContext does the same. Thus, mediaContext should never // be null. Debug.Assert(mediaContext != null); return mediaContext.Tier; } } ////// TierChanged event - /// This event is raised when the Tier for a given Dispatcher changes. /// public static event EventHandler TierChanged { add { MediaContext mediaContext = MediaContext.CurrentMediaContext; // The Dispatcher auto-creates if there is no Dispatcher associated with this // thread, and the MediaContext does the same. Thus, mediaContext should never // be null. Debug.Assert(mediaContext != null); mediaContext.TierChanged += value; } remove { MediaContext mediaContext = MediaContext.CurrentMediaContext; // The Dispatcher auto-creates if there is no Dispatcher associated with this // thread, and the MediaContext does the same. Thus, mediaContext should never // be null. Debug.Assert(mediaContext != null); mediaContext.TierChanged -= value; } } } } // 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
- _AutoWebProxyScriptHelper.cs
- DynamicMethod.cs
- ApplyImportsAction.cs
- GroupItemAutomationPeer.cs
- SkipQueryOptionExpression.cs
- SelectionUIService.cs
- MergePropertyDescriptor.cs
- StylusTip.cs
- SqlMethodAttribute.cs
- WeakReferenceEnumerator.cs
- DesignerDataParameter.cs
- VarRefManager.cs
- SafeFileMappingHandle.cs
- HotSpotCollection.cs
- BuildProviderUtils.cs
- WsatServiceAddress.cs
- DocumentApplication.cs
- XMLDiffLoader.cs
- ClientProxyGenerator.cs
- TypeDescriptor.cs
- MediaEntryAttribute.cs
- SmtpReplyReaderFactory.cs
- ActivityExecutorOperation.cs
- LoginUtil.cs
- Globals.cs
- IResourceProvider.cs
- GroupItem.cs
- ChangeTracker.cs
- AspNetSynchronizationContext.cs
- DataControlButton.cs
- MasterPage.cs
- SqlInternalConnectionTds.cs
- XmlSchemaIdentityConstraint.cs
- XmlSerializationReader.cs
- GridToolTip.cs
- DependentList.cs
- AnnotationResourceCollection.cs
- InputDevice.cs
- XmlNodeReader.cs
- InArgumentConverter.cs
- FileDialogCustomPlacesCollection.cs
- Dictionary.cs
- LinkUtilities.cs
- ShadowGlyph.cs
- MatrixKeyFrameCollection.cs
- TimersDescriptionAttribute.cs
- XPathPatternParser.cs
- Evidence.cs
- XmlAnyAttributeAttribute.cs
- _LoggingObject.cs
- ReadOnlyDictionary.cs
- HandoffBehavior.cs
- DataGridTextBoxColumn.cs
- TraceHandlerErrorFormatter.cs
- EdmEntityTypeAttribute.cs
- AtomPub10ServiceDocumentFormatter.cs
- EnumDataContract.cs
- Nullable.cs
- BookmarkEventArgs.cs
- InvalidCommandTreeException.cs
- TargetFrameworkAttribute.cs
- _FtpDataStream.cs
- XPathSingletonIterator.cs
- TreeNode.cs
- StringToken.cs
- ScriptComponentDescriptor.cs
- Stack.cs
- FormView.cs
- FileInfo.cs
- OpenTypeLayout.cs
- CompareValidator.cs
- AdornerHitTestResult.cs
- PrintingPermissionAttribute.cs
- MenuStrip.cs
- ServiceObjectContainer.cs
- SelectionItemPattern.cs
- TextPointerBase.cs
- WebPartDeleteVerb.cs
- EntityCommandExecutionException.cs
- IDReferencePropertyAttribute.cs
- SrgsRulesCollection.cs
- SoapAttributes.cs
- DataFieldCollectionEditor.cs
- Crc32.cs
- TraceSection.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- WizardStepBase.cs
- AdPostCacheSubstitution.cs
- InstanceLockLostException.cs
- LayoutSettings.cs
- DataGridItem.cs
- EntityContainerAssociationSet.cs
- DataGridViewCellStyle.cs
- SamlDelegatingWriter.cs
- ButtonFlatAdapter.cs
- DataServiceRequestException.cs
- BamlMapTable.cs
- UICuesEvent.cs
- Point3DValueSerializer.cs
- ChangeProcessor.cs