Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Automation / Peers / GridSplitterAutomationPeer.cs / 1305600 / 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; else return base.GetPattern(patternInterface); } #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; else return base.GetPattern(patternInterface); } #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
- XPathChildIterator.cs
- Globals.cs
- ScriptReferenceEventArgs.cs
- ZoneMembershipCondition.cs
- ChannelServices.cs
- ResourceContainer.cs
- BCryptSafeHandles.cs
- Pool.cs
- WeakReference.cs
- SectionUpdates.cs
- ToolZoneDesigner.cs
- TextElementEnumerator.cs
- CodeVariableReferenceExpression.cs
- IOException.cs
- SocketAddress.cs
- RegexCaptureCollection.cs
- ResourceReader.cs
- BitmapPalette.cs
- WindowsFormsSynchronizationContext.cs
- RootProjectionNode.cs
- Rijndael.cs
- SoapReflectionImporter.cs
- ComponentRenameEvent.cs
- SystemFonts.cs
- FixedHighlight.cs
- RuleSettingsCollection.cs
- TabControl.cs
- HealthMonitoringSection.cs
- FunctionQuery.cs
- DataFormats.cs
- PerformanceCounterManager.cs
- MergablePropertyAttribute.cs
- MemberCollection.cs
- WpfSharedBamlSchemaContext.cs
- PermissionToken.cs
- HtmlImage.cs
- DisableDpiAwarenessAttribute.cs
- Cell.cs
- TabOrder.cs
- DefaultValueAttribute.cs
- GC.cs
- DataGridViewSelectedCellCollection.cs
- LoginUtil.cs
- PresentationAppDomainManager.cs
- DefaultAutoFieldGenerator.cs
- DrawingAttributesDefaultValueFactory.cs
- NativeMethods.cs
- WrappedIUnknown.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- EnumType.cs
- OdbcConnectionPoolProviderInfo.cs
- Model3DCollection.cs
- RegistryPermission.cs
- MeshGeometry3D.cs
- ControlPaint.cs
- WebOperationContext.cs
- VectorValueSerializer.cs
- SqlWorkflowInstanceStoreLock.cs
- ImplicitInputBrush.cs
- HeaderElement.cs
- RelationshipEnd.cs
- MembershipValidatePasswordEventArgs.cs
- Serializer.cs
- DesignerHelpers.cs
- BreakRecordTable.cs
- PeerConnector.cs
- Model3DGroup.cs
- StrongNameMembershipCondition.cs
- URL.cs
- InstanceValue.cs
- ValueQuery.cs
- HttpProtocolImporter.cs
- Queue.cs
- Int16AnimationBase.cs
- HtmlInputControl.cs
- SystemGatewayIPAddressInformation.cs
- PackagePartCollection.cs
- TextEffect.cs
- PropertyPathWorker.cs
- SimpleHandlerBuildProvider.cs
- SecurityKeyIdentifier.cs
- LinkButton.cs
- SoapEnumAttribute.cs
- GenericParameterDataContract.cs
- Input.cs
- _LoggingObject.cs
- OverlappedAsyncResult.cs
- TraceSection.cs
- CheckoutException.cs
- RuntimeArgumentHandle.cs
- StoreItemCollection.Loader.cs
- XmlLinkedNode.cs
- TemplatedMailWebEventProvider.cs
- TypeTypeConverter.cs
- XPathAncestorQuery.cs
- ScrollableControlDesigner.cs
- ScrollableControlDesigner.cs
- XsltLibrary.cs
- BaseCAMarshaler.cs
- FileDialog.cs