Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Automation / Peers / NavigationWindowAutomationPeer.cs / 1305600 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DesignBindingPicker.cs
- CharacterHit.cs
- WarningException.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- TextChangedEventArgs.cs
- HostedElements.cs
- EventLog.cs
- SegmentInfo.cs
- SectionUpdates.cs
- XmlSerializer.cs
- KeySplineConverter.cs
- UmAlQuraCalendar.cs
- NodeInfo.cs
- ToolStripContentPanel.cs
- XmlHierarchicalEnumerable.cs
- BindingExpressionBase.cs
- ProfilePropertyNameValidator.cs
- SqlUnionizer.cs
- MetafileEditor.cs
- AsymmetricSignatureFormatter.cs
- DynamicDocumentPaginator.cs
- SmtpClient.cs
- UndoUnit.cs
- LocatorBase.cs
- FeedUtils.cs
- ConfigXmlSignificantWhitespace.cs
- __Error.cs
- FontFamily.cs
- FunctionImportMapping.cs
- Debug.cs
- XmlHierarchicalDataSourceView.cs
- DataTableMapping.cs
- WCFModelStrings.Designer.cs
- KeysConverter.cs
- MobileFormsAuthentication.cs
- SamlSubjectStatement.cs
- PasswordDeriveBytes.cs
- ComponentSerializationService.cs
- UpdateManifestForBrowserApplication.cs
- DbXmlEnabledProviderManifest.cs
- HMACSHA384.cs
- OdbcEnvironmentHandle.cs
- Random.cs
- NoneExcludedImageIndexConverter.cs
- DateTimeFormatInfoScanner.cs
- HostingEnvironment.cs
- DispatcherEventArgs.cs
- WorkflowItemsPresenter.cs
- AssociationTypeEmitter.cs
- EntityContainerAssociationSet.cs
- PreservationFileReader.cs
- PersonalizationStateInfoCollection.cs
- streamingZipPartStream.cs
- XmlILModule.cs
- Bitmap.cs
- WebPartTracker.cs
- ScriptReference.cs
- Win32KeyboardDevice.cs
- X509SecurityTokenProvider.cs
- AnnotationService.cs
- TextEditorContextMenu.cs
- SequenceFullException.cs
- SchemaSetCompiler.cs
- ValidationRuleCollection.cs
- FamilyCollection.cs
- MemberDescriptor.cs
- XsltContext.cs
- XmlDocumentSerializer.cs
- ImageCodecInfo.cs
- ContentPlaceHolder.cs
- XPathAncestorQuery.cs
- ClonableStack.cs
- SqlSelectStatement.cs
- LateBoundBitmapDecoder.cs
- Transactions.cs
- Group.cs
- SolidBrush.cs
- CodeSpit.cs
- XmlSerializerAssemblyAttribute.cs
- CubicEase.cs
- TextFormatter.cs
- ServiceModelExtensionCollectionElement.cs
- HttpWebRequestElement.cs
- ListControlActionList.cs
- SiteOfOriginPart.cs
- ProcessInfo.cs
- AssemblyResourceLoader.cs
- PerformanceCountersElement.cs
- GetPageCompletedEventArgs.cs
- XmlnsPrefixAttribute.cs
- SystemFonts.cs
- AttributeParameterInfo.cs
- ClientFactory.cs
- DispatcherExceptionFilterEventArgs.cs
- DataBindingExpressionBuilder.cs
- IdentifierCollection.cs
- BaseDataBoundControl.cs
- ManagedWndProcTracker.cs
- WindowHideOrCloseTracker.cs
- BuildResult.cs