Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / UIAutomation / UIAutomationClient / System / Windows / Automation / ScrollItemPattern.cs / 1 / 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
- GeneralTransform2DTo3DTo2D.cs
- RpcCryptoRequest.cs
- ActivityCodeGenerator.cs
- LassoHelper.cs
- TimerElapsedEvenArgs.cs
- ContainerVisual.cs
- CreateParams.cs
- HTMLTagNameToTypeMapper.cs
- SQLStringStorage.cs
- StrongNameKeyPair.cs
- DebuggerService.cs
- CompositionAdorner.cs
- ListParagraph.cs
- TreeViewHitTestInfo.cs
- GroupBoxAutomationPeer.cs
- CommonObjectSecurity.cs
- TTSEvent.cs
- StringValidator.cs
- Profiler.cs
- HttpStaticObjectsCollectionWrapper.cs
- ObjectIDGenerator.cs
- TypeSchema.cs
- CompilerResults.cs
- CodeMemberProperty.cs
- Fonts.cs
- ComponentResourceKey.cs
- Transform3DCollection.cs
- HttpHandlerActionCollection.cs
- PointAnimationBase.cs
- ConnectionConsumerAttribute.cs
- RenderingBiasValidation.cs
- XPathNavigatorKeyComparer.cs
- Signature.cs
- SqlClientWrapperSmiStream.cs
- ConvertTextFrag.cs
- Screen.cs
- RoutedEventValueSerializer.cs
- WSSecurityOneDotOneSendSecurityHeader.cs
- WindowsImpersonationContext.cs
- TagNameToTypeMapper.cs
- MetaType.cs
- TaskFormBase.cs
- ReaderContextStackData.cs
- Metafile.cs
- DateTimeUtil.cs
- TextEndOfLine.cs
- TextEndOfParagraph.cs
- ListViewUpdatedEventArgs.cs
- EncryptedXml.cs
- itemelement.cs
- ConstraintStruct.cs
- AnimationException.cs
- InterleavedZipPartStream.cs
- DecoratedNameAttribute.cs
- CodeTypeDelegate.cs
- IPEndPoint.cs
- Internal.cs
- UserUseLicenseDictionaryLoader.cs
- OdbcDataReader.cs
- CheckBoxList.cs
- NetworkInformationPermission.cs
- ImageUrlEditor.cs
- XmlTypeMapping.cs
- SqlGenericUtil.cs
- ClassDataContract.cs
- ChooseAction.cs
- x509store.cs
- UnsafeNativeMethodsPenimc.cs
- SafeHandles.cs
- SymbolEqualComparer.cs
- TypeSystem.cs
- Int16KeyFrameCollection.cs
- FieldToken.cs
- MailWriter.cs
- SelectionEditingBehavior.cs
- ImagingCache.cs
- Binding.cs
- SortedDictionary.cs
- LocalValueEnumerator.cs
- InternalsVisibleToAttribute.cs
- PhysicalOps.cs
- ToolstripProfessionalRenderer.cs
- ImageCreator.cs
- CleanUpVirtualizedItemEventArgs.cs
- CodeAccessPermission.cs
- ControlBuilderAttribute.cs
- SocketElement.cs
- TextPatternIdentifiers.cs
- ADMembershipUser.cs
- ProfileService.cs
- ReturnEventArgs.cs
- WeakEventManager.cs
- Stylesheet.cs
- AsyncDataRequest.cs
- TableRow.cs
- DecoderReplacementFallback.cs
- DataGridViewEditingControlShowingEventArgs.cs
- FormatConvertedBitmap.cs
- Context.cs
- SmiRecordBuffer.cs