Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- IriParsingElement.cs
- EmptyControlCollection.cs
- IInstanceContextProvider.cs
- DbBuffer.cs
- DotNetATv1WindowsLogEntrySerializer.cs
- InvalidOleVariantTypeException.cs
- SiteMap.cs
- ListControlConvertEventArgs.cs
- Assembly.cs
- PocoEntityKeyStrategy.cs
- BindingCollection.cs
- ListBindableAttribute.cs
- X509Chain.cs
- BypassElementCollection.cs
- DesignerAdapterAttribute.cs
- StringCollection.cs
- SiteMembershipCondition.cs
- AppDomainProtocolHandler.cs
- RemotingConfiguration.cs
- ProfileManager.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- Variant.cs
- DesignerAdRotatorAdapter.cs
- TextOptions.cs
- ConsoleEntryPoint.cs
- DbMetaDataCollectionNames.cs
- MetadataArtifactLoaderFile.cs
- ObjectStorage.cs
- XmlWrappingReader.cs
- PointAnimationUsingKeyFrames.cs
- PersonalizationEntry.cs
- ObjectResult.cs
- TextRangeBase.cs
- RequestCacheValidator.cs
- TemplateAction.cs
- SafeFileMappingHandle.cs
- CroppedBitmap.cs
- NativeObjectSecurity.cs
- OleServicesContext.cs
- CLRBindingWorker.cs
- Figure.cs
- DataControlLinkButton.cs
- APCustomTypeDescriptor.cs
- XmlChoiceIdentifierAttribute.cs
- _CookieModule.cs
- ReceiveContent.cs
- XmlArrayItemAttribute.cs
- SrgsSemanticInterpretationTag.cs
- EntityConnectionStringBuilder.cs
- Expander.cs
- DiscoveryReference.cs
- EventPropertyMap.cs
- UnsafeNativeMethods.cs
- HistoryEventArgs.cs
- SmuggledIUnknown.cs
- BaseCollection.cs
- ParamArrayAttribute.cs
- AspNetSynchronizationContext.cs
- RequestStatusBarUpdateEventArgs.cs
- CodeGotoStatement.cs
- ActiveXSite.cs
- WpfSharedXamlSchemaContext.cs
- SafePipeHandle.cs
- EntityClassGenerator.cs
- SchemaCollectionCompiler.cs
- TemplateColumn.cs
- ConsoleTraceListener.cs
- BasicViewGenerator.cs
- TreeChangeInfo.cs
- SqlBulkCopyColumnMappingCollection.cs
- XmlObjectSerializerContext.cs
- Barrier.cs
- ViewValidator.cs
- UpdateTranslator.cs
- SafeProcessHandle.cs
- DataGridRelationshipRow.cs
- SimpleTextLine.cs
- HotCommands.cs
- Int64Converter.cs
- OrderedDictionaryStateHelper.cs
- AppSecurityManager.cs
- TokenCreationException.cs
- SimpleHandlerFactory.cs
- StorageFunctionMapping.cs
- ConsoleCancelEventArgs.cs
- DragStartedEventArgs.cs
- FixedLineResult.cs
- ColorDialog.cs
- TypedDataSetSchemaImporterExtension.cs
- TransportBindingElementImporter.cs
- FileIOPermission.cs
- Manipulation.cs
- ToolboxComponentsCreatedEventArgs.cs
- Effect.cs
- XmlJsonWriter.cs
- RadialGradientBrush.cs
- SafeFileMappingHandle.cs
- WebPartMovingEventArgs.cs
- ASCIIEncoding.cs
- DbParameterHelper.cs