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
- ConstructorNeedsTagAttribute.cs
- Oid.cs
- SspiSafeHandles.cs
- PerformanceCounterPermission.cs
- Attributes.cs
- AnonymousIdentificationModule.cs
- NegatedCellConstant.cs
- RoutedEventValueSerializer.cs
- ContextMenuService.cs
- WinFormsComponentEditor.cs
- AnnotationAuthorChangedEventArgs.cs
- ManipulationDeltaEventArgs.cs
- TargetControlTypeCache.cs
- TraceHandler.cs
- ErrorEventArgs.cs
- Convert.cs
- SkinIDTypeConverter.cs
- CreateUserWizardStep.cs
- DrawingContextDrawingContextWalker.cs
- DynamicExpression.cs
- RootNamespaceAttribute.cs
- _FtpControlStream.cs
- LineSegment.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- MailDefinition.cs
- ObjectDataSourceMethodEditor.cs
- ActivationArguments.cs
- WebBrowserUriTypeConverter.cs
- EntityKeyElement.cs
- RealizedColumnsBlock.cs
- SystemWebSectionGroup.cs
- GradientBrush.cs
- ToolStripItemCollection.cs
- AdapterDictionary.cs
- SQLBoolean.cs
- XmlException.cs
- ActivityWithResult.cs
- ConstrainedDataObject.cs
- ServicesUtilities.cs
- ConditionalDesigner.cs
- QueryStringParameter.cs
- IsolatedStorage.cs
- VariantWrapper.cs
- FlowDocumentFormatter.cs
- RpcCryptoContext.cs
- RecognizeCompletedEventArgs.cs
- DBSchemaTable.cs
- JsonQNameDataContract.cs
- WebPartUtil.cs
- DataServiceQueryException.cs
- GridViewSelectEventArgs.cs
- StringInfo.cs
- FontCollection.cs
- ConditionCollection.cs
- DataGridCell.cs
- MachinePropertyVariants.cs
- XmlNodeReader.cs
- PersonalizationStateInfoCollection.cs
- WindowsTitleBar.cs
- OleDbEnumerator.cs
- ObjectFullSpanRewriter.cs
- SecurityRequiresReviewAttribute.cs
- RelationshipDetailsRow.cs
- ISessionStateStore.cs
- InternalControlCollection.cs
- LocalizableAttribute.cs
- X509SecurityToken.cs
- DataSourceHelper.cs
- AuthorizationSection.cs
- HttpCacheVary.cs
- Rotation3DAnimation.cs
- QilFactory.cs
- XslAstAnalyzer.cs
- FormCollection.cs
- PersianCalendar.cs
- SectionUpdates.cs
- XMLSchema.cs
- ColorContext.cs
- RelationalExpressions.cs
- WorkflowApplicationTerminatedException.cs
- AssemblyUtil.cs
- XmlDictionaryReaderQuotas.cs
- XPathDocumentBuilder.cs
- MetadataCache.cs
- ViewService.cs
- Baml2006KnownTypes.cs
- MenuItem.cs
- PrincipalPermission.cs
- FaultDesigner.cs
- _ConnectionGroup.cs
- RowCache.cs
- HtmlTableRow.cs
- CustomTokenProvider.cs
- ConfigurationManagerInternalFactory.cs
- XmlCharCheckingWriter.cs
- ProviderConnectionPointCollection.cs
- QuadraticBezierSegment.cs
- ButtonRenderer.cs
- PenCursorManager.cs
- UnmanagedMemoryStream.cs