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
- WebConfigurationManager.cs
- X509PeerCertificateAuthentication.cs
- Command.cs
- WindowsScrollBarBits.cs
- BinaryReader.cs
- BamlBinaryReader.cs
- CustomErrorCollection.cs
- ThrowOnMultipleAssignment.cs
- SqlDataSourceSummaryPanel.cs
- ArraySet.cs
- FaultReason.cs
- MailAddressCollection.cs
- TcpAppDomainProtocolHandler.cs
- ColorConverter.cs
- DateTimeFormatInfoScanner.cs
- TemplateKey.cs
- Popup.cs
- SiteMapSection.cs
- BrushProxy.cs
- BinaryObjectWriter.cs
- WindowsStatusBar.cs
- RowVisual.cs
- UriWriter.cs
- WorkflowMarkupElementEventArgs.cs
- EditorPart.cs
- RNGCryptoServiceProvider.cs
- ProgressBarRenderer.cs
- WindowVisualStateTracker.cs
- ToolboxComponentsCreatedEventArgs.cs
- VirtualPathProvider.cs
- RotateTransform3D.cs
- ClientEventManager.cs
- WorkflowViewElement.cs
- SemanticValue.cs
- FileEnumerator.cs
- Int16AnimationUsingKeyFrames.cs
- KnownTypeDataContractResolver.cs
- PostBackOptions.cs
- PageCatalogPartDesigner.cs
- Rect3D.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- UnionExpr.cs
- SQlBooleanStorage.cs
- SoapObjectWriter.cs
- RowTypeElement.cs
- X509CertificateCollection.cs
- CachedCompositeFamily.cs
- XamlSerializationHelper.cs
- PerformanceCounterLib.cs
- ValidatingPropertiesEventArgs.cs
- HtmlElementEventArgs.cs
- XmlTextEncoder.cs
- EntityDataSourceDesigner.cs
- ApplicationInfo.cs
- AvTrace.cs
- CodeFieldReferenceExpression.cs
- ClientOptions.cs
- codemethodreferenceexpression.cs
- AsymmetricKeyExchangeDeformatter.cs
- FormViewDeletedEventArgs.cs
- StrokeNodeData.cs
- SR.cs
- FlowLayoutPanel.cs
- SqlClientMetaDataCollectionNames.cs
- SafeBitVector32.cs
- ClassHandlersStore.cs
- OperationValidationEventArgs.cs
- OneToOneMappingSerializer.cs
- TextSelectionHelper.cs
- SynchronizationLockException.cs
- EntityViewGenerator.cs
- DataServiceHostWrapper.cs
- BrowserCapabilitiesCodeGenerator.cs
- SqlGenericUtil.cs
- ApplicationId.cs
- EventMap.cs
- SqlEnums.cs
- X509Certificate.cs
- SqlRowUpdatingEvent.cs
- SafeTokenHandle.cs
- DataControlFieldsEditor.cs
- InvokeBinder.cs
- _AutoWebProxyScriptWrapper.cs
- Models.cs
- InvalidBodyAccessException.cs
- WorkflowInstanceContextProvider.cs
- PolicyUnit.cs
- ClientData.cs
- ProtocolViolationException.cs
- StringSource.cs
- MouseButton.cs
- HttpListenerContext.cs
- TaiwanCalendar.cs
- IntranetCredentialPolicy.cs
- LambdaCompiler.Logical.cs
- FontConverter.cs
- FileVersionInfo.cs
- TreeNodeBindingCollection.cs
- CheckBox.cs
- XPathDocumentNavigator.cs