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
- MimeTypePropertyAttribute.cs
- PointAnimationUsingKeyFrames.cs
- GridItemProviderWrapper.cs
- HMACRIPEMD160.cs
- CheckBox.cs
- SafeNativeMethods.cs
- Win32KeyboardDevice.cs
- MsmqReceiveParameters.cs
- RankException.cs
- ObjectTag.cs
- ModelService.cs
- SimpleMailWebEventProvider.cs
- DesignerHelpers.cs
- RadioButton.cs
- XmlILIndex.cs
- AttributeSetAction.cs
- ClientTarget.cs
- IdentityReference.cs
- SafeWaitHandle.cs
- PeerEndPoint.cs
- SemanticBasicElement.cs
- WindowsGraphicsWrapper.cs
- HealthMonitoringSectionHelper.cs
- WebBrowserEvent.cs
- altserialization.cs
- TextRange.cs
- DurationConverter.cs
- WebExceptionStatus.cs
- XmlSchema.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- ChtmlImageAdapter.cs
- _AutoWebProxyScriptEngine.cs
- TemplatedWizardStep.cs
- TextRunProperties.cs
- ListViewItem.cs
- panel.cs
- isolationinterop.cs
- StylusShape.cs
- XmlIterators.cs
- NamespaceList.cs
- SqlDeflator.cs
- BookmarkScopeInfo.cs
- DesignerAutoFormatStyle.cs
- ZoneIdentityPermission.cs
- AuthorizationRule.cs
- CodeCommentStatement.cs
- CheckBoxAutomationPeer.cs
- OleDbFactory.cs
- TcpClientCredentialType.cs
- RotationValidation.cs
- Pair.cs
- SqlInternalConnectionSmi.cs
- TransactionManager.cs
- XmlKeywords.cs
- AssemblyBuilder.cs
- Main.cs
- IImplicitResourceProvider.cs
- XamlSerializerUtil.cs
- WorkingDirectoryEditor.cs
- ControlTemplate.cs
- WsdlBuildProvider.cs
- CustomAttribute.cs
- TransformerTypeCollection.cs
- WarningException.cs
- ConfigurationValidatorAttribute.cs
- ProfileGroupSettings.cs
- IPAddressCollection.cs
- TypeToken.cs
- DetailsViewPageEventArgs.cs
- SeparatorAutomationPeer.cs
- Main.cs
- CreateParams.cs
- TextRenderer.cs
- WebHttpElement.cs
- FontNameEditor.cs
- DelegateBodyWriter.cs
- ToolStrip.cs
- DataList.cs
- BitStream.cs
- sqlinternaltransaction.cs
- NeutralResourcesLanguageAttribute.cs
- DataGridViewCellStyle.cs
- DataColumnMappingCollection.cs
- PolyQuadraticBezierSegment.cs
- XmlDocumentViewSchema.cs
- ObjectNotFoundException.cs
- XmlDocument.cs
- XmlDictionaryString.cs
- DocumentViewerAutomationPeer.cs
- RandomNumberGenerator.cs
- ImpersonationContext.cs
- DataTable.cs
- Win32.cs
- PrinterUnitConvert.cs
- assemblycache.cs
- HtmlInputHidden.cs
- CodeGeneratorAttribute.cs
- XmlBinaryReader.cs
- WebEventTraceProvider.cs
- DeploymentExceptionMapper.cs