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
- ParameterBuilder.cs
- KeyedHashAlgorithm.cs
- OracleConnection.cs
- IssuanceLicense.cs
- TypeCodeDomSerializer.cs
- SourceLineInfo.cs
- X509Chain.cs
- PersonalizationProviderCollection.cs
- ToggleButtonAutomationPeer.cs
- HostingEnvironmentWrapper.cs
- Logging.cs
- SamlAuthenticationStatement.cs
- EnumValAlphaComparer.cs
- NaturalLanguageHyphenator.cs
- TextPattern.cs
- ElementProxy.cs
- XmlSchemaType.cs
- DataRelationCollection.cs
- ToolStripMenuItemCodeDomSerializer.cs
- GraphicsPathIterator.cs
- DirectoryNotFoundException.cs
- TdsParameterSetter.cs
- EnumerableRowCollectionExtensions.cs
- DesignerOptions.cs
- CheckBoxStandardAdapter.cs
- BulletDecorator.cs
- XAMLParseException.cs
- ConnectionPoolManager.cs
- RepeatButtonAutomationPeer.cs
- ZoomPercentageConverter.cs
- DataBindingExpressionBuilder.cs
- AuthenticationModuleElement.cs
- WebPartDescriptionCollection.cs
- DataColumnCollection.cs
- MessageQueueException.cs
- InputProviderSite.cs
- DefaultObjectMappingItemCollection.cs
- CodeAccessSecurityEngine.cs
- JapaneseCalendar.cs
- Metadata.cs
- GiveFeedbackEvent.cs
- BufferedResponseStream.cs
- assertwrapper.cs
- TreeNodeConverter.cs
- ErasingStroke.cs
- RowVisual.cs
- CodeSnippetExpression.cs
- CodeCompileUnit.cs
- StorageEntityTypeMapping.cs
- EntityCollection.cs
- ParsedRoute.cs
- DataControlFieldHeaderCell.cs
- DeferredReference.cs
- SchemaUtility.cs
- SelfIssuedAuthProofToken.cs
- CssStyleCollection.cs
- EnumUnknown.cs
- RectAnimation.cs
- WebPartExportVerb.cs
- TextParentUndoUnit.cs
- HostSecurityManager.cs
- Misc.cs
- CollectionExtensions.cs
- DataGridItemCollection.cs
- DocComment.cs
- EventWaitHandle.cs
- WriteLineDesigner.xaml.cs
- SecurityCapabilities.cs
- ListDictionary.cs
- DataSetSchema.cs
- CodeRemoveEventStatement.cs
- XmlIgnoreAttribute.cs
- PerformanceCounterPermissionEntry.cs
- ExpressionHelper.cs
- SchemaElement.cs
- JapaneseCalendar.cs
- SiteMapProvider.cs
- TemplateKeyConverter.cs
- RepeaterItemCollection.cs
- DiscoveryServerProtocol.cs
- XDeferredAxisSource.cs
- LayoutEngine.cs
- ButtonField.cs
- Rules.cs
- UIElement3D.cs
- DataSourceControlBuilder.cs
- TextEditorLists.cs
- ResourceProviderFactory.cs
- TreeSet.cs
- ErrorRuntimeConfig.cs
- DateTimePickerDesigner.cs
- ValueConversionAttribute.cs
- BezierSegment.cs
- BamlLocalizabilityResolver.cs
- RepeatInfo.cs
- XmlUrlResolver.cs
- TypeHelper.cs
- CountAggregationOperator.cs
- SystemNetworkInterface.cs
- CodeDelegateCreateExpression.cs