Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / Automation / Peers / NavigationWindowAutomationPeer.cs / 1 / NavigationWindowAutomationPeer.cs
using System; using System.Windows; using System.Windows.Automation; using System.Windows.Navigation; using System.Windows.Interop; using System.Windows.Media; using System.ComponentModel; namespace System.Windows.Automation.Peers { /// public class NavigationWindowAutomationPeer : WindowAutomationPeer { /// public NavigationWindowAutomationPeer(NavigationWindow owner): base(owner) {} /// override protected string GetClassNameCore() { return "NavigationWindow"; } // [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] internal static void RaiseAsyncContentLoadedEvent(AutomationPeer peer, long bytesRead, long maxBytes) { double percentComplete = 0d; AsyncContentLoadedState asyncContentState = AsyncContentLoadedState.Beginning; if (bytesRead > 0) { if (bytesRead < maxBytes) { percentComplete = maxBytes > 0 ? (bytesRead * 100d / maxBytes) : 0; asyncContentState = AsyncContentLoadedState.Progress; } else { percentComplete = 100d; asyncContentState = AsyncContentLoadedState.Completed; } } peer.RaiseAsyncContentLoadedEvent(new AsyncContentLoadedEventArgs(asyncContentState, percentComplete)); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Windows; using System.Windows.Automation; using System.Windows.Navigation; using System.Windows.Interop; using System.Windows.Media; using System.ComponentModel; namespace System.Windows.Automation.Peers { /// public class NavigationWindowAutomationPeer : WindowAutomationPeer { /// public NavigationWindowAutomationPeer(NavigationWindow owner): base(owner) {} /// override protected string GetClassNameCore() { return "NavigationWindow"; } // [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] internal static void RaiseAsyncContentLoadedEvent(AutomationPeer peer, long bytesRead, long maxBytes) { double percentComplete = 0d; AsyncContentLoadedState asyncContentState = AsyncContentLoadedState.Beginning; if (bytesRead > 0) { if (bytesRead < maxBytes) { percentComplete = maxBytes > 0 ? (bytesRead * 100d / maxBytes) : 0; asyncContentState = AsyncContentLoadedState.Progress; } else { percentComplete = 100d; asyncContentState = AsyncContentLoadedState.Completed; } } peer.RaiseAsyncContentLoadedEvent(new AsyncContentLoadedEventArgs(asyncContentState, percentComplete)); } } } // 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
- AnnotationElement.cs
- ArraySortHelper.cs
- GridViewColumn.cs
- ToolStripStatusLabel.cs
- ExpressionBuilderContext.cs
- BamlBinaryReader.cs
- ModuleBuilderData.cs
- TablePatternIdentifiers.cs
- FormsAuthenticationUser.cs
- EntityFrameworkVersions.cs
- ProfileParameter.cs
- BulletChrome.cs
- TemplateParser.cs
- UndoManager.cs
- IndentedWriter.cs
- BrowserDefinitionCollection.cs
- DataException.cs
- SByteConverter.cs
- InfiniteTimeSpanConverter.cs
- ScrollChangedEventArgs.cs
- AuthenticationModuleElement.cs
- SelectionProcessor.cs
- WindowsGraphicsWrapper.cs
- HMACSHA1.cs
- SqlNode.cs
- Matrix3D.cs
- QueryHandler.cs
- RoutedEventValueSerializer.cs
- Registry.cs
- DrawListViewColumnHeaderEventArgs.cs
- XsdBuilder.cs
- ResourceProperty.cs
- StatusInfoItem.cs
- NumericUpDown.cs
- MimeObjectFactory.cs
- PageAdapter.cs
- BlurEffect.cs
- MatrixTransform.cs
- TextEncodedRawTextWriter.cs
- SystemTcpStatistics.cs
- EdmRelationshipRoleAttribute.cs
- ObfuscationAttribute.cs
- CommandTreeTypeHelper.cs
- PageThemeBuildProvider.cs
- DefaultBinder.cs
- DataConnectionHelper.cs
- XmlDataDocument.cs
- VirtualPathProvider.cs
- ScaleTransform3D.cs
- Splitter.cs
- UIHelper.cs
- WindowsFormsSectionHandler.cs
- Transform.cs
- MediaTimeline.cs
- TextDecorationCollectionConverter.cs
- ToolTipAutomationPeer.cs
- ReaderWriterLockSlim.cs
- PointConverter.cs
- WebPartAuthorizationEventArgs.cs
- Viewport3DVisual.cs
- PipeSecurity.cs
- FrameworkContentElement.cs
- WebPartDescriptionCollection.cs
- StreamSecurityUpgradeInitiatorAsyncResult.cs
- ImplicitInputBrush.cs
- QilGenerator.cs
- GraphicsPath.cs
- SerializationException.cs
- dataprotectionpermission.cs
- WinFormsComponentEditor.cs
- Duration.cs
- MulticastOption.cs
- IgnorePropertiesAttribute.cs
- FormsAuthenticationEventArgs.cs
- XmlArrayAttribute.cs
- LZCodec.cs
- AttributeParameterInfo.cs
- BuildResult.cs
- TabControlEvent.cs
- EventToken.cs
- StandardOleMarshalObject.cs
- DateTimeStorage.cs
- DoubleKeyFrameCollection.cs
- EditorZoneBase.cs
- BaseProcessor.cs
- Perspective.cs
- FixedSOMLineCollection.cs
- MessageSecurityVersion.cs
- Certificate.cs
- InternalTransaction.cs
- PrintPageEvent.cs
- DirectoryGroupQuery.cs
- DataControlField.cs
- OdbcInfoMessageEvent.cs
- MetadataItemCollectionFactory.cs
- SchemaImporterExtension.cs
- CrossAppDomainChannel.cs
- RemoteWebConfigurationHost.cs
- EventHandlersStore.cs
- FloatUtil.cs