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
- SynchronizingStream.cs
- SecurityUtils.cs
- MeasureItemEvent.cs
- PanelStyle.cs
- StrongNameUtility.cs
- OleDbInfoMessageEvent.cs
- MetadataItemEmitter.cs
- ReadOnlyHierarchicalDataSourceView.cs
- WindowAutomationPeer.cs
- ResourcePool.cs
- AsymmetricSecurityProtocol.cs
- PasswordBoxAutomationPeer.cs
- TextInfo.cs
- Duration.cs
- WCFModelStrings.Designer.cs
- ArrayTypeMismatchException.cs
- HtmlSelect.cs
- UserNamePasswordValidationMode.cs
- AttributeTableBuilder.cs
- ToolBar.cs
- RichTextBox.cs
- ComponentDispatcherThread.cs
- PageRanges.cs
- ExpandedProjectionNode.cs
- WindowsBrush.cs
- DataBinding.cs
- ValidatorCollection.cs
- CodeTypeDeclaration.cs
- BinaryCommonClasses.cs
- AdjustableArrowCap.cs
- TimersDescriptionAttribute.cs
- MyContact.cs
- TemplatedControlDesigner.cs
- Item.cs
- DateTimePickerDesigner.cs
- RedistVersionInfo.cs
- X509ChainElement.cs
- DataRelation.cs
- TraceHandlerErrorFormatter.cs
- DataPagerCommandEventArgs.cs
- ValidationError.cs
- PerfCounterSection.cs
- HtmlUtf8RawTextWriter.cs
- _ProxyRegBlob.cs
- XmlElement.cs
- _NegotiateClient.cs
- TextTreeInsertElementUndoUnit.cs
- ISessionStateStore.cs
- CompilationUnit.cs
- TypeExtensionConverter.cs
- FontStretches.cs
- regiisutil.cs
- WorkflowMessageEventHandler.cs
- StylusButton.cs
- odbcmetadatacollectionnames.cs
- EntitySqlException.cs
- HttpHeaderCollection.cs
- OperationCanceledException.cs
- WpfSharedXamlSchemaContext.cs
- Repeater.cs
- ClickablePoint.cs
- XmlSchemaImporter.cs
- JoinTreeSlot.cs
- TableLayoutSettings.cs
- StatusBarItemAutomationPeer.cs
- MDIWindowDialog.cs
- StringConverter.cs
- UnsafeNativeMethodsMilCoreApi.cs
- TrackingCondition.cs
- counter.cs
- AudioFileOut.cs
- ValueUnavailableException.cs
- EdmComplexPropertyAttribute.cs
- NonSerializedAttribute.cs
- WebBrowserDocumentCompletedEventHandler.cs
- WebFormsRootDesigner.cs
- HtmlInputButton.cs
- SQLDoubleStorage.cs
- HtmlElementErrorEventArgs.cs
- DataGridColumnReorderingEventArgs.cs
- Pkcs9Attribute.cs
- RouteParametersHelper.cs
- GeometryConverter.cs
- Literal.cs
- StylusDownEventArgs.cs
- followingquery.cs
- PropertyTabAttribute.cs
- MissingSatelliteAssemblyException.cs
- InlineUIContainer.cs
- GatewayDefinition.cs
- ConfigurationStrings.cs
- ResourceProviderFactory.cs
- LinearGradientBrush.cs
- XPathExpr.cs
- SqlRowUpdatedEvent.cs
- WorkflowRuntimeService.cs
- DataRelation.cs
- RegularExpressionValidator.cs
- DataGridViewColumnCollectionDialog.cs
- CodeMemberMethod.cs