Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- AutoSizeComboBox.cs
- SectionRecord.cs
- XXXOnTypeBuilderInstantiation.cs
- XpsS0ValidatingLoader.cs
- ToolStripDropDownMenu.cs
- CodeArrayCreateExpression.cs
- DelayDesigner.cs
- DataControlImageButton.cs
- CachedPathData.cs
- LazyLoadBehavior.cs
- SqlResolver.cs
- MemoryFailPoint.cs
- Compiler.cs
- AccessibleObject.cs
- ProfileSettings.cs
- CommittableTransaction.cs
- XComponentModel.cs
- NetworkCredential.cs
- DesignerRegionMouseEventArgs.cs
- HyperLinkField.cs
- Win32Native.cs
- XamlFilter.cs
- CapabilitiesPattern.cs
- ButtonFieldBase.cs
- MobileUITypeEditor.cs
- WindowInteropHelper.cs
- ReadWriteControlDesigner.cs
- OracleInternalConnection.cs
- ConfigurationSchemaErrors.cs
- Byte.cs
- GridViewColumnCollectionChangedEventArgs.cs
- OracleRowUpdatingEventArgs.cs
- EmptyCollection.cs
- ByteStack.cs
- SqlError.cs
- SourceSwitch.cs
- OletxResourceManager.cs
- XmlDocumentType.cs
- TypeNameParser.cs
- Message.cs
- ChannelEndpointElement.cs
- Statements.cs
- SmiMetaData.cs
- MethodBuilderInstantiation.cs
- Expression.DebuggerProxy.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- ConstraintManager.cs
- GridViewColumnHeaderAutomationPeer.cs
- MessageCredentialType.cs
- StaticDataManager.cs
- DbConnectionPoolIdentity.cs
- TypeSource.cs
- ConnectionStringSettingsCollection.cs
- WorkflowInstanceUnhandledExceptionRecord.cs
- VersionUtil.cs
- DataControlField.cs
- CheckedListBox.cs
- XmlSchemaSequence.cs
- ObjectQueryProvider.cs
- ChannelBinding.cs
- HtmlEmptyTagControlBuilder.cs
- HtmlTableRow.cs
- MarkedHighlightComponent.cs
- OleDbException.cs
- NegotiateStream.cs
- ScopelessEnumAttribute.cs
- TerminatorSinks.cs
- CollectionViewGroupInternal.cs
- ContractCodeDomInfo.cs
- VisualBrush.cs
- SourceItem.cs
- RichListBox.cs
- SelectionItemProviderWrapper.cs
- ResetableIterator.cs
- Calendar.cs
- FixUpCollection.cs
- MarkupExtensionReturnTypeAttribute.cs
- ItemMap.cs
- DebugHandleTracker.cs
- WizardPanelChangingEventArgs.cs
- WindowsFormsLinkLabel.cs
- ChtmlTextWriter.cs
- DriveNotFoundException.cs
- NativeObjectSecurity.cs
- URLBuilder.cs
- KeyedHashAlgorithm.cs
- IdentityHolder.cs
- DbgUtil.cs
- DataGridViewRowHeaderCell.cs
- RegexMatchCollection.cs
- XPathPatternBuilder.cs
- DataPagerFieldCommandEventArgs.cs
- RelatedCurrencyManager.cs
- UInt16Converter.cs
- DrawingGroupDrawingContext.cs
- ProxyFragment.cs
- NativeMethods.cs
- PasswordTextNavigator.cs
- ProcessHost.cs
- Dictionary.cs