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
- ILGenerator.cs
- StringExpressionSet.cs
- TypeUsageBuilder.cs
- NumberFormatInfo.cs
- CodeMethodInvokeExpression.cs
- ThemeDictionaryExtension.cs
- WebBrowserUriTypeConverter.cs
- ValueQuery.cs
- BackoffTimeoutHelper.cs
- LassoSelectionBehavior.cs
- CombinedGeometry.cs
- CoordinationService.cs
- DropShadowBitmapEffect.cs
- PropertyEmitter.cs
- UrlAuthorizationModule.cs
- KoreanLunisolarCalendar.cs
- ADConnectionHelper.cs
- OutputWindow.cs
- GuidelineSet.cs
- LocationSectionRecord.cs
- PageRouteHandler.cs
- SqlDataSourceParameterParser.cs
- Point3DIndependentAnimationStorage.cs
- ScriptDescriptor.cs
- MailMessageEventArgs.cs
- Stopwatch.cs
- SerialPort.cs
- TransformCollection.cs
- WebReferencesBuildProvider.cs
- SqlCachedBuffer.cs
- URLMembershipCondition.cs
- ExpandCollapseProviderWrapper.cs
- MsmqTransportBindingElement.cs
- StringConcat.cs
- MessageQueueConverter.cs
- SubtreeProcessor.cs
- PageCanvasSize.cs
- PreservationFileReader.cs
- FontStyle.cs
- Geometry.cs
- Base64Decoder.cs
- odbcmetadatafactory.cs
- FrameworkElement.cs
- ChannelFactoryRefCache.cs
- ChangeDirector.cs
- Speller.cs
- CodePropertyReferenceExpression.cs
- HttpClientChannel.cs
- QilReference.cs
- StyleTypedPropertyAttribute.cs
- WindowPatternIdentifiers.cs
- WaitHandle.cs
- GACIdentityPermission.cs
- EventProvider.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- PagerSettings.cs
- RegexCaptureCollection.cs
- VirtualizingPanel.cs
- FormatterServices.cs
- BlurBitmapEffect.cs
- NavigationCommands.cs
- BamlBinaryReader.cs
- Variant.cs
- EdmProviderManifest.cs
- RichTextBoxDesigner.cs
- BrowserDefinitionCollection.cs
- ServiceEndpointElementCollection.cs
- TextPointer.cs
- XhtmlTextWriter.cs
- OrderedDictionaryStateHelper.cs
- CornerRadiusConverter.cs
- MenuAdapter.cs
- XmlSchemaComplexContent.cs
- SafeHandles.cs
- GridViewRowEventArgs.cs
- BinaryObjectInfo.cs
- IPEndPoint.cs
- mil_commands.cs
- DuplicateDetector.cs
- HotCommands.cs
- FixedSOMPage.cs
- SettingsPropertyValue.cs
- StringFunctions.cs
- OpenFileDialog.cs
- MouseGestureConverter.cs
- WebPartZoneBase.cs
- SmiTypedGetterSetter.cs
- ChineseLunisolarCalendar.cs
- IntegerValidatorAttribute.cs
- SortedList.cs
- CollectionsUtil.cs
- UIAgentAsyncEndRequest.cs
- SimpleExpression.cs
- DetailsViewPageEventArgs.cs
- TemplateBindingExtension.cs
- CodeVariableReferenceExpression.cs
- LocatorPart.cs
- SqlCacheDependency.cs
- PolicyValidationException.cs
- RelationshipEndMember.cs