Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- TreeViewEvent.cs
- ObjRef.cs
- ToolStripSplitButton.cs
- __ConsoleStream.cs
- ReachDocumentReferenceSerializerAsync.cs
- TypedElement.cs
- InputReportEventArgs.cs
- DbProviderFactoriesConfigurationHandler.cs
- TextElementEnumerator.cs
- CommonXSendMessage.cs
- StatusBarItem.cs
- HandlerFactoryWrapper.cs
- HttpListener.cs
- NativeMethods.cs
- serverconfig.cs
- SoapAttributeAttribute.cs
- StringResourceManager.cs
- PhysicalOps.cs
- AesManaged.cs
- CodeMemberMethod.cs
- TextEditor.cs
- XmlBinaryReader.cs
- ZipIOCentralDirectoryBlock.cs
- CredentialCache.cs
- StrokeNodeData.cs
- UrlMappingsModule.cs
- CipherData.cs
- CheckBox.cs
- CLRBindingWorker.cs
- AliasGenerator.cs
- CaseInsensitiveOrdinalStringComparer.cs
- XDeferredAxisSource.cs
- InheritablePropertyChangeInfo.cs
- ServerProtocol.cs
- _NativeSSPI.cs
- WebPartHeaderCloseVerb.cs
- Dump.cs
- BitmapEffectCollection.cs
- EventLogEntryCollection.cs
- SchemaImporterExtensionElement.cs
- WebPartHelpVerb.cs
- SoapInteropTypes.cs
- ExpressionList.cs
- PrinterUnitConvert.cs
- SqlCommandBuilder.cs
- IIS7WorkerRequest.cs
- EmptyEnumerable.cs
- TemplateControlParser.cs
- _ListenerAsyncResult.cs
- RootNamespaceAttribute.cs
- Brush.cs
- HashSet.cs
- ObjectQueryState.cs
- AmbientValueAttribute.cs
- entityreference_tresulttype.cs
- UIntPtr.cs
- Item.cs
- TabControlCancelEvent.cs
- WebPartConnectionsEventArgs.cs
- Frame.cs
- CalendarItem.cs
- IteratorDescriptor.cs
- Vector3DAnimationBase.cs
- WebPartConnectionsEventArgs.cs
- FloatUtil.cs
- DataGridRowClipboardEventArgs.cs
- RowParagraph.cs
- NonBatchDirectoryCompiler.cs
- XmlArrayAttribute.cs
- FilteredDataSetHelper.cs
- GridViewCommandEventArgs.cs
- hresults.cs
- FontDialog.cs
- BitmapEffectGroup.cs
- XhtmlBasicLinkAdapter.cs
- SpeechDetectedEventArgs.cs
- UniqueID.cs
- ISO2022Encoding.cs
- MatchSingleFxEngineOpcode.cs
- CatalogPartCollection.cs
- EntityDataSourceColumn.cs
- DataSvcMapFileSerializer.cs
- UnitySerializationHolder.cs
- MetaType.cs
- WindowsScroll.cs
- MemberMemberBinding.cs
- BezierSegment.cs
- ThreadExceptionDialog.cs
- Light.cs
- Exceptions.cs
- XamlVector3DCollectionSerializer.cs
- DataGridViewCellParsingEventArgs.cs
- Run.cs
- Debug.cs
- ChangePasswordDesigner.cs
- ClientBuildManagerCallback.cs
- TypeConstant.cs
- LocalizedNameDescriptionPair.cs
- DbException.cs
- OrderPreservingMergeHelper.cs