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
- BaseConfigurationRecord.cs
- DataConnectionHelper.cs
- Compiler.cs
- ColumnResult.cs
- UriParserTemplates.cs
- OpenTypeLayoutCache.cs
- WindowsScrollBarBits.cs
- InternalConfigConfigurationFactory.cs
- ListSourceHelper.cs
- DataList.cs
- ContentPlaceHolder.cs
- ColumnResult.cs
- VectorCollectionValueSerializer.cs
- BidPrivateBase.cs
- DodSequenceMerge.cs
- ChtmlTextWriter.cs
- SQLMoney.cs
- KnownIds.cs
- InternalSendMessage.cs
- RegexCharClass.cs
- MatrixCamera.cs
- CredentialCache.cs
- FileClassifier.cs
- DbParameterCollectionHelper.cs
- TextDecorationCollectionConverter.cs
- ObjectStateFormatter.cs
- BinaryMethodMessage.cs
- TypeNameHelper.cs
- Selector.cs
- HttpContext.cs
- SqlProfileProvider.cs
- WrappedReader.cs
- PointLight.cs
- CacheDependency.cs
- LingerOption.cs
- WindowsPen.cs
- WindowsGraphicsCacheManager.cs
- ObjectMaterializedEventArgs.cs
- DES.cs
- WorkflowLayouts.cs
- TransformedBitmap.cs
- CheckedListBox.cs
- Propagator.JoinPropagator.cs
- PropertyStore.cs
- SafeFileMappingHandle.cs
- CounterSet.cs
- ConnectionManagementElement.cs
- CompositeDataBoundControl.cs
- GridLengthConverter.cs
- DiffuseMaterial.cs
- XmlILOptimizerVisitor.cs
- ValidatorCollection.cs
- MediaScriptCommandRoutedEventArgs.cs
- DataTableReaderListener.cs
- OleStrCAMarshaler.cs
- UnsafeNativeMethods.cs
- RoleService.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- NamespaceMapping.cs
- Types.cs
- PropertyMapper.cs
- MatchingStyle.cs
- DataReaderContainer.cs
- FusionWrap.cs
- TransactionInformation.cs
- ProfileProvider.cs
- EntityKeyElement.cs
- VariableBinder.cs
- SQLBinaryStorage.cs
- IntranetCredentialPolicy.cs
- WebPartConnectionsCancelEventArgs.cs
- HtmlInputButton.cs
- BaseConfigurationRecord.cs
- XmlReflectionMember.cs
- MemoryStream.cs
- CDSCollectionETWBCLProvider.cs
- ImageMap.cs
- WorkflowElementDialogWindow.xaml.cs
- DataServiceContext.cs
- Trace.cs
- Rotation3D.cs
- UITypeEditor.cs
- MailHeaderInfo.cs
- NamespaceEmitter.cs
- TreeViewEvent.cs
- SqlParameterCollection.cs
- EmptyCollection.cs
- Converter.cs
- DecoderReplacementFallback.cs
- LabelLiteral.cs
- ColorContext.cs
- SharedUtils.cs
- InternalConfigRoot.cs
- ToolStripProgressBar.cs
- TimeoutException.cs
- ControlAdapter.cs
- MonitoringDescriptionAttribute.cs
- UpdatePanel.cs
- ComponentResourceKeyConverter.cs
- HttpMethodConstraint.cs