Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / Automation / Peers / GridSplitterAutomationPeer.cs / 1 / GridSplitterAutomationPeer.cs
using System;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
using System.Windows;
using System.Windows.Automation.Provider;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Interop;
using System.Windows.Media;
using MS.Internal;
using MS.Win32;
namespace System.Windows.Automation.Peers
{
///
public class GridSplitterAutomationPeer : ThumbAutomationPeer, ITransformProvider
{
///
public GridSplitterAutomationPeer(GridSplitter owner): base(owner)
{}
///
override protected string GetClassNameCore()
{
return "GridSplitter";
}
///
override public object GetPattern(PatternInterface patternInterface)
{
if (patternInterface == PatternInterface.Transform)
return this;
return null;
}
#region ITransformProvider
bool ITransformProvider.CanMove { get { return true; } }
bool ITransformProvider.CanResize { get { return false; } }
bool ITransformProvider.CanRotate { get { return false; } }
void ITransformProvider.Move(double x, double y)
{
if (!IsEnabled())
throw new ElementNotEnabledException();
if (double.IsInfinity(x) || double.IsNaN(x))
throw new ArgumentOutOfRangeException("x");
if (double.IsInfinity(y) || double.IsNaN(y))
throw new ArgumentOutOfRangeException("y");
((GridSplitter)Owner).KeyboardMoveSplitter(x, y);
}
void ITransformProvider.Resize(double width, double height)
{
throw new InvalidOperationException(SR.Get(SRID.UIA_OperationCannotBePerformed));
}
void ITransformProvider.Rotate(double degrees)
{
throw new InvalidOperationException(SR.Get(SRID.UIA_OperationCannotBePerformed));
}
#endregion
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
using System.Windows;
using System.Windows.Automation.Provider;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Interop;
using System.Windows.Media;
using MS.Internal;
using MS.Win32;
namespace System.Windows.Automation.Peers
{
///
public class GridSplitterAutomationPeer : ThumbAutomationPeer, ITransformProvider
{
///
public GridSplitterAutomationPeer(GridSplitter owner): base(owner)
{}
///
override protected string GetClassNameCore()
{
return "GridSplitter";
}
///
override public object GetPattern(PatternInterface patternInterface)
{
if (patternInterface == PatternInterface.Transform)
return this;
return null;
}
#region ITransformProvider
bool ITransformProvider.CanMove { get { return true; } }
bool ITransformProvider.CanResize { get { return false; } }
bool ITransformProvider.CanRotate { get { return false; } }
void ITransformProvider.Move(double x, double y)
{
if (!IsEnabled())
throw new ElementNotEnabledException();
if (double.IsInfinity(x) || double.IsNaN(x))
throw new ArgumentOutOfRangeException("x");
if (double.IsInfinity(y) || double.IsNaN(y))
throw new ArgumentOutOfRangeException("y");
((GridSplitter)Owner).KeyboardMoveSplitter(x, y);
}
void ITransformProvider.Resize(double width, double height)
{
throw new InvalidOperationException(SR.Get(SRID.UIA_OperationCannotBePerformed));
}
void ITransformProvider.Rotate(double degrees)
{
throw new InvalidOperationException(SR.Get(SRID.UIA_OperationCannotBePerformed));
}
#endregion
}
}
// 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
- NamespaceCollection.cs
- TextMarkerSource.cs
- MetaTable.cs
- cookieexception.cs
- StylusOverProperty.cs
- WindowsStartMenu.cs
- WindowsAuthenticationEventArgs.cs
- WinCategoryAttribute.cs
- DbReferenceCollection.cs
- ProfilePropertySettingsCollection.cs
- MulticastDelegate.cs
- SimpleApplicationHost.cs
- RegistryPermission.cs
- Model3D.cs
- SoapFault.cs
- NodeLabelEditEvent.cs
- XmlEntity.cs
- SafeViewOfFileHandle.cs
- Delegate.cs
- UdpMessageProperty.cs
- DesignColumn.cs
- HScrollBar.cs
- RsaSecurityTokenAuthenticator.cs
- AssertFilter.cs
- StateDesignerConnector.cs
- LoginView.cs
- Console.cs
- ActivityUtilities.cs
- LightweightCodeGenerator.cs
- PeerResolverSettings.cs
- GetImportedCardRequest.cs
- File.cs
- PointAnimationBase.cs
- OneOfTypeConst.cs
- InternalsVisibleToAttribute.cs
- FillErrorEventArgs.cs
- TableCellsCollectionEditor.cs
- XamlTreeBuilderBamlRecordWriter.cs
- HorizontalAlignConverter.cs
- MatrixCamera.cs
- TrackingServices.cs
- EntryWrittenEventArgs.cs
- DataListCommandEventArgs.cs
- GeneralTransformCollection.cs
- DataGridViewSortCompareEventArgs.cs
- WebHeaderCollection.cs
- CardSpaceShim.cs
- HttpVersion.cs
- OutKeywords.cs
- ResXBuildProvider.cs
- CompositeDataBoundControl.cs
- OutOfMemoryException.cs
- SecurityDocument.cs
- CompositeFontParser.cs
- ProxyHwnd.cs
- ProtocolsConfigurationHandler.cs
- PrinterUnitConvert.cs
- FacetValues.cs
- VarInfo.cs
- objectresult_tresulttype.cs
- Memoizer.cs
- UniqueConstraint.cs
- ModelItem.cs
- WindowsRichEditRange.cs
- AppLevelCompilationSectionCache.cs
- TableCellCollection.cs
- InterleavedZipPartStream.cs
- BrowserTree.cs
- LockRecursionException.cs
- EllipseGeometry.cs
- TileModeValidation.cs
- TimeZone.cs
- KerberosSecurityTokenAuthenticator.cs
- MethodBuilder.cs
- PartManifestEntry.cs
- SafeHandles.cs
- JumpItem.cs
- FlagsAttribute.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- SplitterEvent.cs
- ServiceNameElementCollection.cs
- ProviderConnectionPoint.cs
- DataGridViewCell.cs
- EventEntry.cs
- GenericWebPart.cs
- ProfileModule.cs
- DataBoundControl.cs
- SqlAliasesReferenced.cs
- sortedlist.cs
- WebReferencesBuildProvider.cs
- StorageModelBuildProvider.cs
- ViewEventArgs.cs
- BufferModesCollection.cs
- IPAddress.cs
- AssemblyUtil.cs
- EntityChangedParams.cs
- PartitionedStreamMerger.cs
- ICspAsymmetricAlgorithm.cs
- MenuEventArgs.cs
- RemotingSurrogateSelector.cs