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
- AuthenticatingEventArgs.cs
- MarkupCompilePass2.cs
- KeyNotFoundException.cs
- BmpBitmapEncoder.cs
- HebrewCalendar.cs
- TemplateApplicationHelper.cs
- GeometryHitTestResult.cs
- CryptoProvider.cs
- ComponentSerializationService.cs
- ObjectMemberMapping.cs
- CriticalExceptions.cs
- NativeMethods.cs
- TreeNodeCollectionEditorDialog.cs
- DrawingContextWalker.cs
- StringArrayConverter.cs
- SamlAuthorizationDecisionStatement.cs
- SspiSecurityTokenProvider.cs
- DependencyObjectValidator.cs
- SqlBooleanMismatchVisitor.cs
- HttpChannelBindingToken.cs
- NameValuePermission.cs
- TaskSchedulerException.cs
- ClassHandlersStore.cs
- ActivityDesignerResources.cs
- BmpBitmapEncoder.cs
- DataFormat.cs
- ToolboxItemWrapper.cs
- QueueAccessMode.cs
- GlobalEventManager.cs
- MatrixCamera.cs
- XmlQueryRuntime.cs
- CustomAttribute.cs
- SQLInt64.cs
- ReachNamespaceInfo.cs
- SetUserPreferenceRequest.cs
- NameGenerator.cs
- CursorInteropHelper.cs
- AsyncPostBackTrigger.cs
- EntityUtil.cs
- ToolBarTray.cs
- StrokeCollectionDefaultValueFactory.cs
- ColorBlend.cs
- PointKeyFrameCollection.cs
- DataGridViewRowConverter.cs
- PathGradientBrush.cs
- TemplateBindingExtension.cs
- Line.cs
- SoapMessage.cs
- TypeUsageBuilder.cs
- CapabilitiesRule.cs
- KeyBinding.cs
- Scene3D.cs
- PanningMessageFilter.cs
- XMLUtil.cs
- HttpApplication.cs
- DbExpressionVisitor_TResultType.cs
- TableCellCollection.cs
- JsonWriter.cs
- TdsValueSetter.cs
- ValidatingPropertiesEventArgs.cs
- DataGridViewColumnCollectionEditor.cs
- DeploymentSection.cs
- SByte.cs
- UInt64Converter.cs
- DataView.cs
- HttpCookieCollection.cs
- WmlTextViewAdapter.cs
- PartialArray.cs
- InputReportEventArgs.cs
- PropertySegmentSerializationProvider.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- SqlConnectionString.cs
- OutputCacheSettings.cs
- AdRotatorDesigner.cs
- MatchingStyle.cs
- TypeConverter.cs
- InputProcessorProfilesLoader.cs
- Grant.cs
- SubstitutionList.cs
- XPathBuilder.cs
- StreamInfo.cs
- BitArray.cs
- StandardTransformFactory.cs
- ExpressionNormalizer.cs
- XamlInt32CollectionSerializer.cs
- DeferredTextReference.cs
- TableProviderWrapper.cs
- FontStretches.cs
- ExpressionBuilderContext.cs
- PaginationProgressEventArgs.cs
- Int16Animation.cs
- AsyncPostBackTrigger.cs
- SafeFileMappingHandle.cs
- LayoutEvent.cs
- PrinterUnitConvert.cs
- ReadOnlyTernaryTree.cs
- Vector3DCollection.cs
- StylusSystemGestureEventArgs.cs
- HtmlHead.cs