Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- NonSerializedAttribute.cs
- TableRowGroup.cs
- QilPatternVisitor.cs
- XsltLoader.cs
- SqlDataSourceCustomCommandEditor.cs
- StringAnimationBase.cs
- ShortcutKeysEditor.cs
- DockingAttribute.cs
- Native.cs
- SymmetricSecurityBindingElement.cs
- DataGridViewIntLinkedList.cs
- ExitEventArgs.cs
- CTreeGenerator.cs
- OptimizedTemplateContent.cs
- DataSourceCacheDurationConverter.cs
- RowCache.cs
- ProgressBarRenderer.cs
- UInt16.cs
- VariableElement.cs
- HttpInputStream.cs
- ShapeTypeface.cs
- ApplicationManager.cs
- SchemaInfo.cs
- ActivityDelegate.cs
- AspProxy.cs
- TextEditorCopyPaste.cs
- CodeGroup.cs
- TextTreePropertyUndoUnit.cs
- sortedlist.cs
- MenuItemBinding.cs
- ServicesExceptionNotHandledEventArgs.cs
- ViewSimplifier.cs
- TokenBasedSet.cs
- PopupControlService.cs
- LogExtentCollection.cs
- BinaryFormatterWriter.cs
- _IPv6Address.cs
- _FixedSizeReader.cs
- WpfKnownMemberInvoker.cs
- RelationshipDetailsCollection.cs
- XamlParser.cs
- MessageQueuePermissionAttribute.cs
- InputScopeNameConverter.cs
- CursorConverter.cs
- LoginDesigner.cs
- ButtonRenderer.cs
- SqlDependency.cs
- XmlNavigatorFilter.cs
- MyContact.cs
- oledbconnectionstring.cs
- UdpDuplexChannel.cs
- LayoutInformation.cs
- WindowsComboBox.cs
- SdlChannelSink.cs
- SessionStateItemCollection.cs
- ipaddressinformationcollection.cs
- ImageAnimator.cs
- RangeValuePatternIdentifiers.cs
- WebBrowserSiteBase.cs
- uribuilder.cs
- ExceptQueryOperator.cs
- WindowsTokenRoleProvider.cs
- WhereaboutsReader.cs
- ReadOnlyCollectionBase.cs
- BaseTypeViewSchema.cs
- TableColumn.cs
- MarkedHighlightComponent.cs
- PasswordRecovery.cs
- HelpKeywordAttribute.cs
- RenderOptions.cs
- DesignTimeVisibleAttribute.cs
- SurrogateDataContract.cs
- TimeoutException.cs
- Socket.cs
- ExeConfigurationFileMap.cs
- LayoutTableCell.cs
- XmlTextReader.cs
- HtmlImage.cs
- ToolStripCollectionEditor.cs
- FunctionDetailsReader.cs
- EarlyBoundInfo.cs
- TypeUtil.cs
- CommentEmitter.cs
- CircleHotSpot.cs
- BitmapSourceSafeMILHandle.cs
- ArrayHelper.cs
- AbandonedMutexException.cs
- ApplicationServiceHelper.cs
- XmlJsonReader.cs
- DataGridViewRowEventArgs.cs
- CryptoApi.cs
- StateMachineTimers.cs
- ControlBuilder.cs
- SchemaDeclBase.cs
- ImageMapEventArgs.cs
- EntityClientCacheEntry.cs
- OdbcException.cs
- WriteableBitmap.cs
- DetailsViewDeletedEventArgs.cs
- MobileTemplatedControlDesigner.cs