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
- ConvertTextFrag.cs
- DbMetaDataColumnNames.cs
- OperatorExpressions.cs
- BrowserCapabilitiesCompiler.cs
- StyleHelper.cs
- AdRotator.cs
- ScrollProperties.cs
- SchemaDeclBase.cs
- ConfigXmlWhitespace.cs
- QilLoop.cs
- DrawingVisualDrawingContext.cs
- PrintDialogException.cs
- XmlCustomFormatter.cs
- BitmapEffectInputData.cs
- ImportedPolicyConversionContext.cs
- XmlSchemaInferenceException.cs
- LinearGradientBrush.cs
- OuterGlowBitmapEffect.cs
- AssemblyNameProxy.cs
- StrongName.cs
- ScriptManagerProxy.cs
- PolicyStatement.cs
- securestring.cs
- LambdaCompiler.Statements.cs
- UnlockInstanceAsyncResult.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- XmlDocumentType.cs
- Frame.cs
- RichTextBox.cs
- ControlBuilderAttribute.cs
- DeploymentSectionCache.cs
- Panel.cs
- TriggerCollection.cs
- WinEventQueueItem.cs
- CapabilitiesPattern.cs
- AsyncOperationManager.cs
- CompensationParticipant.cs
- InstanceOwnerQueryResult.cs
- DbBuffer.cs
- ReaderOutput.cs
- BitStream.cs
- TemplateParser.cs
- EmptyEnumerator.cs
- CollectionBase.cs
- SortDescriptionCollection.cs
- AssertSection.cs
- TreeNodeCollection.cs
- Composition.cs
- WebPartConnection.cs
- ActiveXHelper.cs
- MarshalByRefObject.cs
- CapabilitiesRule.cs
- HttpCookieCollection.cs
- URI.cs
- TimeZone.cs
- BuildProviderCollection.cs
- GlobalizationAssembly.cs
- RuleInfoComparer.cs
- SynchronizationFilter.cs
- HtmlUtf8RawTextWriter.cs
- CellQuery.cs
- FileLoadException.cs
- WebPartMovingEventArgs.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- AccessViolationException.cs
- MiniConstructorInfo.cs
- TimeManager.cs
- MetadataUtil.cs
- ViewGenResults.cs
- ComponentResourceManager.cs
- IItemProperties.cs
- DbConnectionFactory.cs
- FileDialog_Vista_Interop.cs
- LoadedEvent.cs
- CodeExporter.cs
- RoleServiceManager.cs
- ViewKeyConstraint.cs
- SqlServer2KCompatibilityCheck.cs
- NamespaceCollection.cs
- DbProviderFactoriesConfigurationHandler.cs
- PbrsForward.cs
- Keyboard.cs
- TabControl.cs
- CodeDOMProvider.cs
- BitmapScalingModeValidation.cs
- StrongNameKeyPair.cs
- CommonObjectSecurity.cs
- AnimationLayer.cs
- CodePageUtils.cs
- ByteArrayHelperWithString.cs
- ArraySegment.cs
- TemplateNameScope.cs
- WebConfigurationFileMap.cs
- ImageIndexConverter.cs
- ResourceDisplayNameAttribute.cs
- TableCellCollection.cs
- DataControlPagerLinkButton.cs
- XmlSchemaInfo.cs
- TransactionManager.cs
- InternalConfigHost.cs