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
- InplaceBitmapMetadataWriter.cs
- GacUtil.cs
- FontDriver.cs
- BrowserDefinition.cs
- SelectionEditingBehavior.cs
- Soap.cs
- DataServiceProviderWrapper.cs
- Graph.cs
- PropertyDescriptor.cs
- StringUtil.cs
- StorageRoot.cs
- StreamReader.cs
- PagePropertiesChangingEventArgs.cs
- QilDataSource.cs
- TextureBrush.cs
- Color.cs
- DbConnectionStringCommon.cs
- EncryptedType.cs
- SmtpMail.cs
- FunctionMappingTranslator.cs
- SQLSingleStorage.cs
- TableCellAutomationPeer.cs
- SoapObjectWriter.cs
- Exception.cs
- RoleManagerModule.cs
- BufferAllocator.cs
- Main.cs
- ConfigXmlCDataSection.cs
- ProtocolsConfiguration.cs
- PresentationTraceSources.cs
- SecurityRequiresReviewAttribute.cs
- Speller.cs
- AnnotationResourceCollection.cs
- CultureInfoConverter.cs
- ServicePrincipalNameElement.cs
- DBConnectionString.cs
- ToolStripLocationCancelEventArgs.cs
- DiagnosticTraceSource.cs
- ArgumentOutOfRangeException.cs
- DateTime.cs
- WebServiceParameterData.cs
- ExpandCollapsePattern.cs
- PenLineJoinValidation.cs
- SharedPersonalizationStateInfo.cs
- HtmlPageAdapter.cs
- DocumentSignatureManager.cs
- CallTemplateAction.cs
- WindowsClientCredential.cs
- IndicShape.cs
- DependsOnAttribute.cs
- ElementProxy.cs
- ExtensionFile.cs
- DeclaredTypeElementCollection.cs
- Rectangle.cs
- AccessDataSource.cs
- ClassHandlersStore.cs
- WebPartCollection.cs
- MouseEventArgs.cs
- OleDbCommand.cs
- InternalPolicyElement.cs
- JsonQueryStringConverter.cs
- GiveFeedbackEvent.cs
- DocComment.cs
- MulticastOption.cs
- CodeAssignStatement.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- WorkflowInstanceExtensionProvider.cs
- TableCellAutomationPeer.cs
- processwaithandle.cs
- IndexedEnumerable.cs
- MaterializeFromAtom.cs
- TextFindEngine.cs
- GridItemPattern.cs
- SignerInfo.cs
- TypeDescriptionProviderAttribute.cs
- BitmapPalette.cs
- Exception.cs
- GridViewRowCollection.cs
- DefaultBindingPropertyAttribute.cs
- UseLicense.cs
- DataGridViewAccessibleObject.cs
- DynamicRendererThreadManager.cs
- WebBaseEventKeyComparer.cs
- DrawTreeNodeEventArgs.cs
- RemotingSurrogateSelector.cs
- ErrorHandler.cs
- BaseParaClient.cs
- ComponentCodeDomSerializer.cs
- ImageSource.cs
- ISCIIEncoding.cs
- DataRowView.cs
- BevelBitmapEffect.cs
- FileChangeNotifier.cs
- UncommonField.cs
- sitestring.cs
- AssociatedControlConverter.cs
- SystemInformation.cs
- SqlProvider.cs
- GraphicsContext.cs
- NumberFormatter.cs