Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Automation / Peers / NavigationWindowAutomationPeer.cs / 1305600 / 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
- SerializationStore.cs
- ClientSideQueueItem.cs
- PropertyGeneratedEventArgs.cs
- EntityDataSourceUtil.cs
- _ChunkParse.cs
- SqlDataSourceFilteringEventArgs.cs
- HwndSource.cs
- SafeCryptoHandles.cs
- BaseTemplateCodeDomTreeGenerator.cs
- PagedDataSource.cs
- PersonalizablePropertyEntry.cs
- RelationshipType.cs
- ToolStripStatusLabel.cs
- HtmlTernaryTree.cs
- ActivityInfo.cs
- FilterEventArgs.cs
- Attribute.cs
- ReadOnlyState.cs
- OdbcCommandBuilder.cs
- ToolboxComponentsCreatedEventArgs.cs
- PermissionAttributes.cs
- ColumnHeader.cs
- RegisteredScript.cs
- SspiHelper.cs
- Accessible.cs
- TextDecorationCollection.cs
- ToolStripSplitButton.cs
- MaskInputRejectedEventArgs.cs
- ResXResourceReader.cs
- XmlCountingReader.cs
- UserControl.cs
- AutomationPeer.cs
- PropertyChangedEventManager.cs
- CustomErrorCollection.cs
- ShaperBuffers.cs
- SessionIDManager.cs
- DataGridViewCellCollection.cs
- AppSettingsExpressionEditor.cs
- InstanceOwnerQueryResult.cs
- PersonalizationProviderHelper.cs
- DataRelationPropertyDescriptor.cs
- ExpressionContext.cs
- EmptyEnumerable.cs
- ArglessEventHandlerProxy.cs
- Crc32.cs
- WindowsScrollBarBits.cs
- ComponentEditorForm.cs
- SizeAnimationUsingKeyFrames.cs
- XmlCodeExporter.cs
- DataServiceRequestOfT.cs
- EditCommandColumn.cs
- StatusBarItem.cs
- Vector3dCollection.cs
- DtrList.cs
- loginstatus.cs
- XmlSchemaComplexContentExtension.cs
- IImplicitResourceProvider.cs
- BuiltInPermissionSets.cs
- TabletDevice.cs
- SqlReferenceCollection.cs
- BuildManagerHost.cs
- CharacterBuffer.cs
- UserControlParser.cs
- DbReferenceCollection.cs
- COM2ComponentEditor.cs
- SqlGenerator.cs
- WebPartZone.cs
- BufferedGraphicsManager.cs
- HtmlControlDesigner.cs
- Message.cs
- Header.cs
- HttpHandlerAction.cs
- Size3DValueSerializer.cs
- DataTemplateSelector.cs
- ObjectStateFormatter.cs
- DocumentScope.cs
- ImageSource.cs
- ColumnWidthChangingEvent.cs
- CryptoKeySecurity.cs
- Font.cs
- VScrollProperties.cs
- TriggerCollection.cs
- TimelineGroup.cs
- ProcessHostConfigUtils.cs
- Sql8ExpressionRewriter.cs
- XmlSerializationWriter.cs
- DataGridColumnCollectionEditor.cs
- LocalFileSettingsProvider.cs
- ViewGenerator.cs
- Typography.cs
- SqlMethodAttribute.cs
- CheckBox.cs
- TableDetailsCollection.cs
- GridViewDeletedEventArgs.cs
- XmlTextEncoder.cs
- DefaultCompensation.cs
- TimeSpanMinutesConverter.cs
- clipboard.cs
- CheckBoxField.cs
- validation.cs