Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- BufferBuilder.cs
- SchemaMapping.cs
- HostingPreferredMapPath.cs
- followingsibling.cs
- TcpTransportSecurityElement.cs
- AutomationEvent.cs
- FloaterParaClient.cs
- Composition.cs
- loginstatus.cs
- TrackingDataItem.cs
- TypeValidationEventArgs.cs
- CmsUtils.cs
- DeploymentSection.cs
- XmlSerializableReader.cs
- MdImport.cs
- BitmapSizeOptions.cs
- NestedContainer.cs
- RMEnrollmentPage2.cs
- XmlArrayAttribute.cs
- CursorConverter.cs
- ClientConfigPaths.cs
- PerfService.cs
- Rules.cs
- DragStartedEventArgs.cs
- CheckBox.cs
- AppearanceEditorPart.cs
- ActivityDesignerLayoutSerializers.cs
- ResponseStream.cs
- CommandPlan.cs
- MultiBindingExpression.cs
- ResourceExpressionBuilder.cs
- DictionarySurrogate.cs
- BackgroundFormatInfo.cs
- DSASignatureFormatter.cs
- SqlTriggerContext.cs
- NavigationWindow.cs
- MailAddress.cs
- SiteMapNodeCollection.cs
- NativeMethodsOther.cs
- SettingsAttributes.cs
- TextBlock.cs
- initElementDictionary.cs
- ItemDragEvent.cs
- CopyNamespacesAction.cs
- LabelAutomationPeer.cs
- SchemaConstraints.cs
- Utility.cs
- EventLogEntryCollection.cs
- BeginEvent.cs
- SqlProviderServices.cs
- NumberFormatInfo.cs
- DynamicMethod.cs
- KeyPressEvent.cs
- DbConnectionStringBuilder.cs
- SQLInt64Storage.cs
- manifestimages.cs
- SiteMapNodeItemEventArgs.cs
- DataErrorValidationRule.cs
- ArgumentNullException.cs
- MouseOverProperty.cs
- COSERVERINFO.cs
- HttpCachePolicyBase.cs
- Guid.cs
- CodeComment.cs
- DbExpressionBuilder.cs
- SwitchExpression.cs
- GenericTypeParameterBuilder.cs
- ContentPresenter.cs
- PauseStoryboard.cs
- FragmentNavigationEventArgs.cs
- XslAst.cs
- MatrixTransform3D.cs
- DetailsViewModeEventArgs.cs
- BrowserDefinition.cs
- baseaxisquery.cs
- ModelItemKeyValuePair.cs
- Bitmap.cs
- ReadOnlyDictionary.cs
- ProgressBarAutomationPeer.cs
- SessionPageStatePersister.cs
- NotificationContext.cs
- DBConnection.cs
- WindowsRegion.cs
- FastPropertyAccessor.cs
- TraceContext.cs
- DiscoveryRequestHandler.cs
- SizeFConverter.cs
- SendingRequestEventArgs.cs
- GlyphTypeface.cs
- TemplatePropertyEntry.cs
- XmlComplianceUtil.cs
- CompilerErrorCollection.cs
- Vertex.cs
- UpdateEventArgs.cs
- SystemIPGlobalProperties.cs
- RecordsAffectedEventArgs.cs
- WebBrowsableAttribute.cs
- XmlValidatingReader.cs
- PriorityQueue.cs
- ResourceReferenceExpression.cs