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
- ZoneMembershipCondition.cs
- ResourcesBuildProvider.cs
- NativeMethods.cs
- RepeatButtonAutomationPeer.cs
- SignatureToken.cs
- ReliableMessagingVersion.cs
- ControlDesigner.cs
- Properties.cs
- METAHEADER.cs
- CodeMemberField.cs
- OracleInfoMessageEventArgs.cs
- BufferModesCollection.cs
- XmlSchemaAll.cs
- IPEndPoint.cs
- XmlDataProvider.cs
- Memoizer.cs
- SweepDirectionValidation.cs
- DeviceSpecific.cs
- TreeViewEvent.cs
- ConnectionManagementElement.cs
- processwaithandle.cs
- CodeAttributeDeclaration.cs
- Enlistment.cs
- CodeTypeReferenceCollection.cs
- DeploymentExceptionMapper.cs
- StringKeyFrameCollection.cs
- DataGridViewCell.cs
- AnnotationDocumentPaginator.cs
- View.cs
- SiteMapHierarchicalDataSourceView.cs
- ImageCodecInfo.cs
- ResourceProviderFactory.cs
- LogicalCallContext.cs
- HTTPAPI_VERSION.cs
- WasHostedComPlusFactory.cs
- CharConverter.cs
- XmlILOptimizerVisitor.cs
- AuthenticationService.cs
- LambdaCompiler.Statements.cs
- UserInitiatedNavigationPermission.cs
- RoutingTable.cs
- ListBoxItem.cs
- JavaScriptString.cs
- TypedTableBaseExtensions.cs
- GroupQuery.cs
- AssemblyAssociatedContentFileAttribute.cs
- Timer.cs
- InvalidAsynchronousStateException.cs
- TextMetrics.cs
- XmlSchemaAppInfo.cs
- RepeaterItemCollection.cs
- InvalidWMPVersionException.cs
- StorageSetMapping.cs
- __FastResourceComparer.cs
- BitmapMetadataBlob.cs
- ImplicitInputBrush.cs
- XmlWriterTraceListener.cs
- GeneralTransform.cs
- TextWriter.cs
- DrawingBrush.cs
- EventHandlersDesigner.cs
- SizeConverter.cs
- WindowsFont.cs
- PointLight.cs
- Journal.cs
- SubstitutionResponseElement.cs
- ExtentCqlBlock.cs
- ColorPalette.cs
- StorageEndPropertyMapping.cs
- ConfigurationException.cs
- ChannelDispatcherBase.cs
- MatrixStack.cs
- PersistenceContext.cs
- XPathScanner.cs
- MdImport.cs
- SinglePageViewer.cs
- ModelVisual3D.cs
- ParameterSubsegment.cs
- ContainerParagraph.cs
- FixedSOMPageConstructor.cs
- COM2PropertyPageUITypeConverter.cs
- FormatterConverter.cs
- XmlQueryStaticData.cs
- PublishLicense.cs
- SapiRecognizer.cs
- TextRunProperties.cs
- DataObjectPastingEventArgs.cs
- MaterialGroup.cs
- PageResolution.cs
- CollectionBase.cs
- OletxCommittableTransaction.cs
- CodeValidator.cs
- DefaultMemberAttribute.cs
- DataGridViewColumnTypeEditor.cs
- DescendantQuery.cs
- SetIterators.cs
- DataViewManagerListItemTypeDescriptor.cs
- XmlSchemaChoice.cs
- EntryPointNotFoundException.cs
- RequestCacheValidator.cs