Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Automation / Peers / ProgressBarAutomationPeer.cs / 1305600 / ProgressBarAutomationPeer.cs
using System; using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Interop; using MS.Internal; using MS.Win32; namespace System.Windows.Automation.Peers { /// public class ProgressBarAutomationPeer : RangeBaseAutomationPeer, IRangeValueProvider { /// public ProgressBarAutomationPeer(ProgressBar owner): base(owner) { } /// override protected string GetClassNameCore() { return "ProgressBar"; } /// override protected AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.ProgressBar; } /// override public object GetPattern(PatternInterface patternInterface) { // Indeterminate ProgressBar should not support RangeValue pattern if (patternInterface == PatternInterface.RangeValue && ((ProgressBar)Owner).IsIndeterminate) return null; return base.GetPattern(patternInterface); } ////// Request to set the value that this UI element is representing /// /// Value to set the UI to, as an object ///true if the UI element was successfully set to the specified value //[CodeAnalysis("AptcaMethodsShouldOnlyCallAptcaMethods")] //Tracking Bug: 29647 void IRangeValueProvider.SetValue(double val) { throw new InvalidOperationException(SR.Get(SRID.ProgressBarReadOnly)); } ///Indicates that the value can only be read, not modified. ///returns True if the control is read-only bool IRangeValueProvider.IsReadOnly { get { return true; } } ///Value of a Large Change double IRangeValueProvider.LargeChange { get { return double.NaN; } } ///Value of a Small Change double IRangeValueProvider.SmallChange { get { return double.NaN; } } } } // 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.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Interop; using MS.Internal; using MS.Win32; namespace System.Windows.Automation.Peers { /// public class ProgressBarAutomationPeer : RangeBaseAutomationPeer, IRangeValueProvider { /// public ProgressBarAutomationPeer(ProgressBar owner): base(owner) { } /// override protected string GetClassNameCore() { return "ProgressBar"; } /// override protected AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.ProgressBar; } /// override public object GetPattern(PatternInterface patternInterface) { // Indeterminate ProgressBar should not support RangeValue pattern if (patternInterface == PatternInterface.RangeValue && ((ProgressBar)Owner).IsIndeterminate) return null; return base.GetPattern(patternInterface); } ////// Request to set the value that this UI element is representing /// /// Value to set the UI to, as an object ///true if the UI element was successfully set to the specified value //[CodeAnalysis("AptcaMethodsShouldOnlyCallAptcaMethods")] //Tracking Bug: 29647 void IRangeValueProvider.SetValue(double val) { throw new InvalidOperationException(SR.Get(SRID.ProgressBarReadOnly)); } ///Indicates that the value can only be read, not modified. ///returns True if the control is read-only bool IRangeValueProvider.IsReadOnly { get { return true; } } ///Value of a Large Change double IRangeValueProvider.LargeChange { get { return double.NaN; } } ///Value of a Small Change double IRangeValueProvider.SmallChange { get { return double.NaN; } } } } // 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
- HttpModulesSection.cs
- AdornerLayer.cs
- ITreeGenerator.cs
- RealizedColumnsBlock.cs
- Subset.cs
- PersonalizationDictionary.cs
- ConfigViewGenerator.cs
- AspNetRouteServiceHttpHandler.cs
- SafeHandle.cs
- PartialTrustVisibleAssembliesSection.cs
- UpdateProgress.cs
- Graphics.cs
- BaseValidator.cs
- XpsFont.cs
- DBSqlParserColumn.cs
- ZipIOModeEnforcingStream.cs
- FlowLayoutSettings.cs
- DbDataRecord.cs
- PasswordTextNavigator.cs
- DesignerResources.cs
- WindowPattern.cs
- FolderBrowserDialog.cs
- ScriptManagerProxy.cs
- Documentation.cs
- ContentPropertyAttribute.cs
- SmtpException.cs
- CodeDOMProvider.cs
- QueryStringParameter.cs
- CultureSpecificStringDictionary.cs
- ProcessModule.cs
- AutomationInteropProvider.cs
- NotifyIcon.cs
- HtmlInputSubmit.cs
- UpdatePanelTriggerCollection.cs
- DBPropSet.cs
- SynchronizingStream.cs
- ItemCheckedEvent.cs
- CornerRadius.cs
- XmlNodeList.cs
- HTMLTagNameToTypeMapper.cs
- ValuePattern.cs
- TextEditorParagraphs.cs
- PropertyConverter.cs
- StatusBarItemAutomationPeer.cs
- TeredoHelper.cs
- PtsHelper.cs
- BitmapData.cs
- TimelineGroup.cs
- PerspectiveCamera.cs
- CompositeScriptReference.cs
- ELinqQueryState.cs
- handlecollector.cs
- BuildProvider.cs
- AssertUtility.cs
- DataViewListener.cs
- WebScriptEndpoint.cs
- XmlLoader.cs
- InfoCard.cs
- GuidelineCollection.cs
- BackoffTimeoutHelper.cs
- StorageTypeMapping.cs
- StrokeIntersection.cs
- RSACryptoServiceProvider.cs
- UIHelper.cs
- TypedReference.cs
- WorkflowServiceBehavior.cs
- HttpConfigurationSystem.cs
- CompressedStack.cs
- SelectionBorderGlyph.cs
- ObjectQuery_EntitySqlExtensions.cs
- WebDescriptionAttribute.cs
- VoiceObjectToken.cs
- CollectionContainer.cs
- HtmlHead.cs
- BinaryUtilClasses.cs
- CommandLibraryHelper.cs
- GroupBox.cs
- CommunicationObjectFaultedException.cs
- DataTablePropertyDescriptor.cs
- SoapAttributeAttribute.cs
- RefreshPropertiesAttribute.cs
- XmlJsonWriter.cs
- SiteMembershipCondition.cs
- PipeException.cs
- WindowsAltTab.cs
- DataGridViewTopRowAccessibleObject.cs
- EncodingNLS.cs
- CommandDesigner.cs
- DriveInfo.cs
- ExceptionHelpers.cs
- SemanticAnalyzer.cs
- Deflater.cs
- WeakEventManager.cs
- BaseTemplateParser.cs
- Environment.cs
- XmlCodeExporter.cs
- AttributeSetAction.cs
- StreamGeometry.cs
- DrawListViewItemEventArgs.cs
- AuthenticodeSignatureInformation.cs