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
- SendMessageRecord.cs
- InvokeMemberBinder.cs
- DefaultBinder.cs
- InfocardClientCredentials.cs
- FlowDocumentScrollViewer.cs
- ProxyWebPart.cs
- ComAwareEventInfo.cs
- KnownTypesProvider.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- ObjectQueryExecutionPlan.cs
- ModelItemDictionary.cs
- ElapsedEventArgs.cs
- Regex.cs
- TypeDescriptionProvider.cs
- ButtonBaseDesigner.cs
- CompiledQuery.cs
- RangeValueProviderWrapper.cs
- SelectionRange.cs
- COAUTHINFO.cs
- DeviceSpecificChoice.cs
- JsonQNameDataContract.cs
- NestedContainer.cs
- MenuBindingsEditor.cs
- EditingCommands.cs
- ComponentManagerBroker.cs
- DispatcherSynchronizationContext.cs
- DependencyPropertyKind.cs
- SqlRemoveConstantOrderBy.cs
- RepeatBehaviorConverter.cs
- TakeQueryOptionExpression.cs
- ConfigurationValidatorAttribute.cs
- DocumentPage.cs
- SelfIssuedAuthProofToken.cs
- StringReader.cs
- EpmTargetPathSegment.cs
- ReferencedCollectionType.cs
- TranslateTransform3D.cs
- SchemaMerger.cs
- SoapServerProtocol.cs
- EntityDataSourceMemberPath.cs
- RegexMatch.cs
- WorkflowServiceBehavior.cs
- SqlDataSourceParameterParser.cs
- PaperSize.cs
- XmlAttributeAttribute.cs
- ProvidersHelper.cs
- LoginUtil.cs
- ToolStripSplitStackLayout.cs
- Fx.cs
- OracleParameter.cs
- EncodingTable.cs
- UnmanagedMarshal.cs
- ClientRoleProvider.cs
- PropertyTab.cs
- Parameter.cs
- BuilderInfo.cs
- SmtpDateTime.cs
- TableRowCollection.cs
- EnumerableRowCollectionExtensions.cs
- UniqueConstraint.cs
- AxisAngleRotation3D.cs
- ReadOnlyDataSourceView.cs
- GatewayDefinition.cs
- NativeMethodsCLR.cs
- PageCodeDomTreeGenerator.cs
- UserControlParser.cs
- SqlCharStream.cs
- UserControlParser.cs
- SqlUtils.cs
- SqlTypesSchemaImporter.cs
- HostProtectionException.cs
- CodeTypeParameterCollection.cs
- MSAAWinEventWrap.cs
- StaticExtension.cs
- DataListItemCollection.cs
- MsmqBindingMonitor.cs
- CalendarDataBindingHandler.cs
- ScriptReferenceEventArgs.cs
- HtmlControlPersistable.cs
- MSAAWinEventWrap.cs
- DynamicRenderer.cs
- GeometryDrawing.cs
- XmlElementList.cs
- QilFactory.cs
- StoragePropertyMapping.cs
- NullableFloatMinMaxAggregationOperator.cs
- SecurityHeader.cs
- ComplexBindingPropertiesAttribute.cs
- ReadWriteSpinLock.cs
- _TransmitFileOverlappedAsyncResult.cs
- ImportOptions.cs
- WebPageTraceListener.cs
- AssociationEndMember.cs
- RuntimeHandles.cs
- DbParameterCollection.cs
- DynamicResourceExtension.cs
- NumericUpDown.cs
- FilterElement.cs
- StandardCommands.cs
- SQLMembershipProvider.cs