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
- ContextDataSource.cs
- XmlAttributeProperties.cs
- EncryptedData.cs
- DataTableExtensions.cs
- AutomationElement.cs
- ShellProvider.cs
- DesignerOptionService.cs
- SyndicationCategory.cs
- HtmlControl.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- IdentityHolder.cs
- HtmlTable.cs
- RawContentTypeMapper.cs
- Permission.cs
- RectangleConverter.cs
- FormViewPagerRow.cs
- ReflectionHelper.cs
- WorkflowStateRollbackService.cs
- CroppedBitmap.cs
- FtpWebResponse.cs
- ErrorLog.cs
- SourceLineInfo.cs
- GridViewColumnHeader.cs
- CodeDirectoryCompiler.cs
- Camera.cs
- ZipIOCentralDirectoryBlock.cs
- NetworkCredential.cs
- SafeMemoryMappedFileHandle.cs
- AutoFocusStyle.xaml.cs
- DataGridViewRow.cs
- _UncName.cs
- XmlDictionaryWriter.cs
- Timer.cs
- AutoGeneratedFieldProperties.cs
- DataGridViewCellPaintingEventArgs.cs
- Fonts.cs
- DesignConnectionCollection.cs
- RijndaelManagedTransform.cs
- ListViewItemEventArgs.cs
- Rotation3D.cs
- AuthenticationServiceManager.cs
- TransactionInformation.cs
- DllNotFoundException.cs
- GeometryGroup.cs
- StatusBarPanelClickEvent.cs
- EventDescriptor.cs
- BaseAppDomainProtocolHandler.cs
- CodeGenerationManager.cs
- ProcessHostMapPath.cs
- ToolStripMenuItem.cs
- BigInt.cs
- ChtmlFormAdapter.cs
- RtfNavigator.cs
- SoapCodeExporter.cs
- QueryContinueDragEvent.cs
- AppSettings.cs
- PasswordRecovery.cs
- SafeNativeMethods.cs
- XmlnsPrefixAttribute.cs
- Matrix3DConverter.cs
- SerializationObjectManager.cs
- ControlParameter.cs
- WebResponse.cs
- AnnotationComponentManager.cs
- ThrowHelper.cs
- UnsafeNativeMethodsTablet.cs
- SchemaNotation.cs
- WebPartVerb.cs
- TabItem.cs
- WorkBatch.cs
- DaylightTime.cs
- SafeRegistryKey.cs
- TextModifierScope.cs
- SoapObjectInfo.cs
- DataGridViewButtonColumn.cs
- LinkConverter.cs
- DataGridItem.cs
- Timer.cs
- PageSettings.cs
- Base64Stream.cs
- GCHandleCookieTable.cs
- TextFindEngine.cs
- EdmSchemaError.cs
- FileIOPermission.cs
- HGlobalSafeHandle.cs
- WsdlBuildProvider.cs
- ToolStripTextBox.cs
- VirtualDirectoryMapping.cs
- PropertyDescriptor.cs
- SortQuery.cs
- SqlNotificationEventArgs.cs
- IndexedGlyphRun.cs
- BrowserCapabilitiesCodeGenerator.cs
- PointCollection.cs
- SaveFileDialog.cs
- WebContext.cs
- TableRow.cs
- AspCompat.cs
- IncrementalHitTester.cs
- DesignerActionList.cs