Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / Automation / Peers / ProgressBarAutomationPeer.cs / 1 / 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
- SourceChangedEventArgs.cs
- LowerCaseStringConverter.cs
- OracleException.cs
- ClientType.cs
- JsonFormatReaderGenerator.cs
- BindingNavigatorDesigner.cs
- CodeTypeReferenceExpression.cs
- ObjectDataSourceChooseTypePanel.cs
- ColorAnimationBase.cs
- MemberInitExpression.cs
- CodeValidator.cs
- DependencyPropertyValueSerializer.cs
- loginstatus.cs
- OdbcRowUpdatingEvent.cs
- GeneralTransform3DTo2DTo3D.cs
- PlatformNotSupportedException.cs
- KeyValueSerializer.cs
- InfoCardArgumentException.cs
- RichTextBox.cs
- ObjectCache.cs
- CalendarDay.cs
- Span.cs
- EventHandlersStore.cs
- LifetimeServices.cs
- UnsafeNativeMethods.cs
- LocalizationComments.cs
- StylusPointPropertyId.cs
- WindowsTreeView.cs
- AbstractSvcMapFileLoader.cs
- Column.cs
- ContextDataSourceView.cs
- CodeObjectCreateExpression.cs
- GuidConverter.cs
- SafeUserTokenHandle.cs
- XmlSerializationReader.cs
- TitleStyle.cs
- ComplexBindingPropertiesAttribute.cs
- BooleanProjectedSlot.cs
- ComboBox.cs
- DiagnosticsConfigurationHandler.cs
- TraceData.cs
- EventTrigger.cs
- BoundField.cs
- ParamArrayAttribute.cs
- AppDomainGrammarProxy.cs
- QilPatternVisitor.cs
- SafeFileMappingHandle.cs
- objectresult_tresulttype.cs
- ValidationSettings.cs
- LoaderAllocator.cs
- PerformanceCounterPermissionEntryCollection.cs
- XComponentModel.cs
- Hyperlink.cs
- KeyBinding.cs
- FlowDocumentView.cs
- MsmqBindingElementBase.cs
- ProviderUtil.cs
- RIPEMD160Managed.cs
- UIElement.cs
- HTTPNotFoundHandler.cs
- XmlNodeChangedEventArgs.cs
- HeaderedContentControl.cs
- ScriptResourceInfo.cs
- ObjectDataSourceChooseTypePanel.cs
- ObsoleteAttribute.cs
- WindowsScrollBarBits.cs
- QueryExpr.cs
- SQLMoneyStorage.cs
- SqlInternalConnectionSmi.cs
- CommandBinding.cs
- ContainerUtilities.cs
- Positioning.cs
- RecognizerInfo.cs
- PriorityBindingExpression.cs
- OleTxTransaction.cs
- Base64Decoder.cs
- BlurEffect.cs
- SqlCommandBuilder.cs
- UserUseLicenseDictionaryLoader.cs
- TimersDescriptionAttribute.cs
- NumberSubstitution.cs
- BamlLocalizableResourceKey.cs
- DefaultPrintController.cs
- RelatedView.cs
- recordstatescratchpad.cs
- SpellerInterop.cs
- objectquery_tresulttype.cs
- GroupBox.cs
- BitmapEffectDrawing.cs
- PerformanceCounterLib.cs
- RepeaterItemEventArgs.cs
- ToolboxDataAttribute.cs
- Cursor.cs
- XmlParserContext.cs
- cache.cs
- COM2FontConverter.cs
- SqlInfoMessageEvent.cs
- SmiEventSink_Default.cs
- RoleGroup.cs
- RegistryPermission.cs