Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / UIAutomation / UIAutomationClient / System / Windows / Automation / ScrollItemPattern.cs / 1305600 / ScrollItemPattern.cs
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
//
// Description: Client-side wrapper for ScrollItem Pattern
//
// History:
// 05/04/2004 : MKarr Wrote
//
//---------------------------------------------------------------------------
using System;
using System.Windows.Automation.Provider;
using MS.Internal.Automation;
using System.Runtime.InteropServices;
namespace System.Windows.Automation
{
///
/// Represents UI elements in a scrollable area that can be scrolled to.
///
#if (INTERNAL_COMPILE)
internal class ScrollItemPattern: BasePattern
#else
public class ScrollItemPattern: BasePattern
#endif
{
//-----------------------------------------------------
//
// Constructors
//
//-----------------------------------------------------
#region Constructors
private ScrollItemPattern(AutomationElement el, SafePatternHandle hPattern)
: base(el, hPattern)
{
_hPattern = hPattern;
}
#endregion Constructors
//------------------------------------------------------
//
// Public Constants / Readonly Fields
//
//-----------------------------------------------------
#region Public Constants and Readonly Fields
/// Scroll pattern
public static readonly AutomationPattern Pattern = ScrollItemPatternIdentifiers.Pattern;
#endregion Public Constants and Readonly Fields
//------------------------------------------------------
//
// Public Methods
//
//------------------------------------------------------
#region Public Methods
///
/// Scrolls the windows containing this automation element to make this element visible.
/// InvalidOperationException should be thrown if item becomes unable to be scrolled. Makes
/// no guarantees about where the item will be in the scrolled window.
///
public void ScrollIntoView()
{
UiaCoreApi.ScrollItemPattern_ScrollIntoView(_hPattern);
}
#endregion Public Methods
//-----------------------------------------------------
//
// Internal Methods
//
//------------------------------------------------------
#region Internal Methods
static internal object Wrap(AutomationElement el, SafePatternHandle hPattern, bool cached)
{
return new ScrollItemPattern(el, hPattern);
}
#endregion Internal Methods
//-----------------------------------------------------
//
// Private Fields
//
//-----------------------------------------------------
#region Private Fields
private SafePatternHandle _hPattern;
#endregion Private Fields
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
//
// Description: Client-side wrapper for ScrollItem Pattern
//
// History:
// 05/04/2004 : MKarr Wrote
//
//---------------------------------------------------------------------------
using System;
using System.Windows.Automation.Provider;
using MS.Internal.Automation;
using System.Runtime.InteropServices;
namespace System.Windows.Automation
{
///
/// Represents UI elements in a scrollable area that can be scrolled to.
///
#if (INTERNAL_COMPILE)
internal class ScrollItemPattern: BasePattern
#else
public class ScrollItemPattern: BasePattern
#endif
{
//-----------------------------------------------------
//
// Constructors
//
//-----------------------------------------------------
#region Constructors
private ScrollItemPattern(AutomationElement el, SafePatternHandle hPattern)
: base(el, hPattern)
{
_hPattern = hPattern;
}
#endregion Constructors
//------------------------------------------------------
//
// Public Constants / Readonly Fields
//
//-----------------------------------------------------
#region Public Constants and Readonly Fields
/// Scroll pattern
public static readonly AutomationPattern Pattern = ScrollItemPatternIdentifiers.Pattern;
#endregion Public Constants and Readonly Fields
//------------------------------------------------------
//
// Public Methods
//
//------------------------------------------------------
#region Public Methods
///
/// Scrolls the windows containing this automation element to make this element visible.
/// InvalidOperationException should be thrown if item becomes unable to be scrolled. Makes
/// no guarantees about where the item will be in the scrolled window.
///
public void ScrollIntoView()
{
UiaCoreApi.ScrollItemPattern_ScrollIntoView(_hPattern);
}
#endregion Public Methods
//-----------------------------------------------------
//
// Internal Methods
//
//------------------------------------------------------
#region Internal Methods
static internal object Wrap(AutomationElement el, SafePatternHandle hPattern, bool cached)
{
return new ScrollItemPattern(el, hPattern);
}
#endregion Internal Methods
//-----------------------------------------------------
//
// Private Fields
//
//-----------------------------------------------------
#region Private Fields
private SafePatternHandle _hPattern;
#endregion Private Fields
}
}
// 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
- ProxyWebPartConnectionCollection.cs
- DataGridViewDesigner.cs
- XmlSchemaComplexContentExtension.cs
- OciEnlistContext.cs
- CollectionBase.cs
- FontCollection.cs
- InlinedLocationReference.cs
- UserControlParser.cs
- UpDownEvent.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- BufferAllocator.cs
- IPHostEntry.cs
- ToolbarAUtomationPeer.cs
- HttpListenerPrefixCollection.cs
- DataObjectCopyingEventArgs.cs
- DataService.cs
- WmiPutTraceRecord.cs
- TextParaClient.cs
- HtmlTextBoxAdapter.cs
- RadialGradientBrush.cs
- Compiler.cs
- ResourceDisplayNameAttribute.cs
- ValidatorCompatibilityHelper.cs
- FrameDimension.cs
- RoleManagerModule.cs
- SubMenuStyleCollection.cs
- TripleDESCryptoServiceProvider.cs
- EdgeProfileValidation.cs
- QueryOutputWriterV1.cs
- Form.cs
- CompositeTypefaceMetrics.cs
- ServiceBehaviorElement.cs
- EntryWrittenEventArgs.cs
- SQLString.cs
- GridProviderWrapper.cs
- CommonDialog.cs
- XmlRawWriter.cs
- DateTimePicker.cs
- FileIOPermission.cs
- SystemIcmpV4Statistics.cs
- XmlSchemaComplexContent.cs
- DiagnosticsConfigurationHandler.cs
- DateTimeConstantAttribute.cs
- SByteStorage.cs
- CheckoutException.cs
- AnimationStorage.cs
- PriorityQueue.cs
- WebPartManager.cs
- DebugView.cs
- BindingMAnagerBase.cs
- WebErrorHandler.cs
- UnsafeNativeMethods.cs
- LexicalChunk.cs
- WebEventCodes.cs
- Ops.cs
- ConnectionManagementElement.cs
- FloaterBaseParaClient.cs
- DataGridAutoFormatDialog.cs
- RemotingServices.cs
- PolicyFactory.cs
- Serializer.cs
- PlanCompilerUtil.cs
- HttpCacheParams.cs
- X509ServiceCertificateAuthenticationElement.cs
- PathFigureCollectionValueSerializer.cs
- _Connection.cs
- SymbolType.cs
- ExpanderAutomationPeer.cs
- UseLicense.cs
- Int16Animation.cs
- DataGridViewToolTip.cs
- _OverlappedAsyncResult.cs
- ControlPaint.cs
- GeometryConverter.cs
- LocalizationComments.cs
- MonikerProxyAttribute.cs
- EdmError.cs
- ObjectStateEntry.cs
- TextSelectionHighlightLayer.cs
- TagNameToTypeMapper.cs
- XmlSchemaCollection.cs
- WCFModelStrings.Designer.cs
- RootBrowserWindow.cs
- TdsValueSetter.cs
- SqlFacetAttribute.cs
- XPathBinder.cs
- AnnotationDocumentPaginator.cs
- PreviewKeyDownEventArgs.cs
- ControlValuePropertyAttribute.cs
- DropSourceBehavior.cs
- XamlDebuggerXmlReader.cs
- WeakReadOnlyCollection.cs
- SafeBitVector32.cs
- DateTimeFormat.cs
- ElementNotAvailableException.cs
- StrokeCollection.cs
- XmlSchemaCollection.cs
- MULTI_QI.cs
- DesignBindingPicker.cs
- ResourceExpressionBuilder.cs