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 / 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
- Exception.cs
- StandardTransformFactory.cs
- StubHelpers.cs
- LayoutDump.cs
- PriorityRange.cs
- ModifierKeysValueSerializer.cs
- LineServicesRun.cs
- DataContractSet.cs
- Quaternion.cs
- PrimitiveCodeDomSerializer.cs
- AliasedExpr.cs
- FontFamily.cs
- ComponentConverter.cs
- BitmapEffectOutputConnector.cs
- Buffer.cs
- Operators.cs
- PropertyMapper.cs
- QuaternionKeyFrameCollection.cs
- DefaultValidator.cs
- OledbConnectionStringbuilder.cs
- DoubleIndependentAnimationStorage.cs
- X509ChainElement.cs
- BinaryMethodMessage.cs
- WpfKnownMemberInvoker.cs
- LazyInitializer.cs
- ZoomPercentageConverter.cs
- ExternalDataExchangeClient.cs
- SmiEventSink_Default.cs
- TraceShell.cs
- SeverityFilter.cs
- AdPostCacheSubstitution.cs
- HostedNamedPipeTransportManager.cs
- WebPartAuthorizationEventArgs.cs
- DataSourceCacheDurationConverter.cs
- SqlMethodCallConverter.cs
- WorkflowOperationContext.cs
- Accessible.cs
- SessionPageStatePersister.cs
- DataQuery.cs
- ClassicBorderDecorator.cs
- BigInt.cs
- ServiceOperationParameter.cs
- Constants.cs
- DrawListViewColumnHeaderEventArgs.cs
- HiddenField.cs
- TextStore.cs
- ComplusTypeValidator.cs
- DataMisalignedException.cs
- DomainUpDown.cs
- RuleDefinitions.cs
- Parser.cs
- Evidence.cs
- WindowsTokenRoleProvider.cs
- ErrorCodes.cs
- TextDpi.cs
- Grant.cs
- BitmapEffectGroup.cs
- PageContentAsyncResult.cs
- IsolatedStorage.cs
- LinkArea.cs
- LambdaCompiler.ControlFlow.cs
- Image.cs
- BlobPersonalizationState.cs
- TypeReference.cs
- DbgUtil.cs
- IisTraceListener.cs
- remotingproxy.cs
- CompositionTarget.cs
- CustomDictionarySources.cs
- EllipseGeometry.cs
- OrderByQueryOptionExpression.cs
- ConfigDefinitionUpdates.cs
- ComIntegrationManifestGenerator.cs
- CodeGeneratorOptions.cs
- EventLogRecord.cs
- DbConnectionPoolGroup.cs
- DataGridViewAutoSizeModeEventArgs.cs
- EncoderParameter.cs
- SignedXml.cs
- SQLGuid.cs
- CompoundFileStreamReference.cs
- IntSecurity.cs
- Int32CollectionConverter.cs
- ActionFrame.cs
- FixedSOMLineRanges.cs
- CellPartitioner.cs
- PackageRelationshipCollection.cs
- _SecureChannel.cs
- AmbientValueAttribute.cs
- ValidationSummary.cs
- CapabilitiesRule.cs
- LogExtent.cs
- Literal.cs
- unsafeIndexingFilterStream.cs
- IriParsingElement.cs
- WebPartMenu.cs
- IndexerNameAttribute.cs
- ExportException.cs
- ConsumerConnectionPoint.cs
- cookie.cs