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
- ValidatingPropertiesEventArgs.cs
- CollectionViewGroupRoot.cs
- SqlWebEventProvider.cs
- DiscoveryClientOutputChannel.cs
- DescendantBaseQuery.cs
- ValidationSummary.cs
- DrawingContextWalker.cs
- FrugalList.cs
- Repeater.cs
- TheQuery.cs
- InfoCardAsymmetricCrypto.cs
- XNodeSchemaApplier.cs
- WebControl.cs
- CallbackValidator.cs
- XmlByteStreamWriter.cs
- PropertyChangedEventArgs.cs
- TextEndOfSegment.cs
- contentDescriptor.cs
- MultiPropertyDescriptorGridEntry.cs
- BaseCodeDomTreeGenerator.cs
- SimpleFieldTemplateFactory.cs
- CodeDomLoader.cs
- WaitingCursor.cs
- SqlDataSourceTableQuery.cs
- PolyQuadraticBezierSegment.cs
- HttpHandlerActionCollection.cs
- WebPartCatalogAddVerb.cs
- dataprotectionpermissionattribute.cs
- TableHeaderCell.cs
- XmlSerializerAssemblyAttribute.cs
- RegistrationServices.cs
- ValidationErrorEventArgs.cs
- Behavior.cs
- HeaderedItemsControl.cs
- CommonDialog.cs
- EmptyElement.cs
- ImageList.cs
- HttpConfigurationContext.cs
- TransactionChannel.cs
- AutomationPatternInfo.cs
- AncillaryOps.cs
- SrgsToken.cs
- Window.cs
- PageHandlerFactory.cs
- SqlInternalConnection.cs
- WindowsStatusBar.cs
- ExpandedWrapper.cs
- MarkupObject.cs
- XmlSerializerFormatAttribute.cs
- SubstitutionList.cs
- PageVisual.cs
- FormatterConverter.cs
- NativeMethods.cs
- DataGridViewLinkColumn.cs
- AssociativeAggregationOperator.cs
- BevelBitmapEffect.cs
- Vertex.cs
- WsatConfiguration.cs
- XNameConverter.cs
- AppearanceEditorPart.cs
- EntityContainerAssociationSet.cs
- IProvider.cs
- WindowsFormsHost.cs
- SecurityPolicySection.cs
- SafeWaitHandle.cs
- IisTraceListener.cs
- Flattener.cs
- ReadOnlyCollection.cs
- DataObjectFieldAttribute.cs
- ManagementExtension.cs
- WebPartTransformer.cs
- PasswordBox.cs
- IncrementalHitTester.cs
- ProtectedConfigurationSection.cs
- FamilyTypeface.cs
- Error.cs
- WsatConfiguration.cs
- EditorAttributeInfo.cs
- ClassicBorderDecorator.cs
- ScrollableControl.cs
- StrokeNode.cs
- Point4D.cs
- ExtensionWindowHeader.cs
- TemplateApplicationHelper.cs
- _DisconnectOverlappedAsyncResult.cs
- EntityCommand.cs
- LinkDescriptor.cs
- SiteMap.cs
- SetterBase.cs
- User.cs
- EnvelopedPkcs7.cs
- NativeWrapper.cs
- DataViewManager.cs
- ContextStaticAttribute.cs
- DataRowChangeEvent.cs
- SchemaImporter.cs
- IRCollection.cs
- GridViewCancelEditEventArgs.cs
- GenericPrincipal.cs
- MaskedTextProvider.cs