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
- GridViewDeleteEventArgs.cs
- TreeNodeStyle.cs
- DrawingContextDrawingContextWalker.cs
- X500Name.cs
- HashSetDebugView.cs
- PassportAuthenticationEventArgs.cs
- ReceiveContext.cs
- ListCollectionView.cs
- FontDifferentiator.cs
- DataSourceXmlSerializationAttribute.cs
- SystemUdpStatistics.cs
- XmlEncodedRawTextWriter.cs
- PropertyPath.cs
- WebPartConnectionsCloseVerb.cs
- SkipStoryboardToFill.cs
- BookmarkList.cs
- FederatedMessageSecurityOverHttp.cs
- HeaderUtility.cs
- XmlSchemaSimpleTypeList.cs
- HtmlTextViewAdapter.cs
- ScriptResourceDefinition.cs
- CircleHotSpot.cs
- SamlSerializer.cs
- X509CertificateCollection.cs
- ListBindableAttribute.cs
- LinearQuaternionKeyFrame.cs
- BitmapDownload.cs
- GroupItem.cs
- DataBindingCollection.cs
- ToolboxItemFilterAttribute.cs
- ActiveXHelper.cs
- BooleanSwitch.cs
- ParserStreamGeometryContext.cs
- DirectoryObjectSecurity.cs
- HostingPreferredMapPath.cs
- AllMembershipCondition.cs
- RawKeyboardInputReport.cs
- CachedFontFamily.cs
- PnrpPeerResolverBindingElement.cs
- CmsUtils.cs
- BatchServiceHost.cs
- CustomError.cs
- AssemblyHelper.cs
- ConfigurationManagerInternal.cs
- PathData.cs
- RoutedEventConverter.cs
- DrawingContext.cs
- TemplateNameScope.cs
- TextProviderWrapper.cs
- XpsLiterals.cs
- XmlName.cs
- Stopwatch.cs
- TextEditorDragDrop.cs
- BaseCodePageEncoding.cs
- AppDomainFactory.cs
- ListItemParagraph.cs
- CodeThrowExceptionStatement.cs
- ExceptionValidationRule.cs
- WebServiceData.cs
- ValidatingReaderNodeData.cs
- RemotingServices.cs
- _NtlmClient.cs
- GridViewColumnCollectionChangedEventArgs.cs
- ScriptingWebServicesSectionGroup.cs
- TablePatternIdentifiers.cs
- SqlResolver.cs
- ProjectionCamera.cs
- XmlSchemaAll.cs
- OutputScopeManager.cs
- SingleResultAttribute.cs
- TemplateXamlParser.cs
- SelectionRange.cs
- ToolTipService.cs
- Button.cs
- KerberosSecurityTokenAuthenticator.cs
- SqlDelegatedTransaction.cs
- StyleSheet.cs
- _ConnectionGroup.cs
- BaseValidatorDesigner.cs
- GeneralTransform3DTo2DTo3D.cs
- BmpBitmapEncoder.cs
- TriggerActionCollection.cs
- PerformanceCounterScope.cs
- CommentAction.cs
- CuspData.cs
- Collection.cs
- WeakEventManager.cs
- SecurityTokenProvider.cs
- TraceSource.cs
- QilBinary.cs
- DummyDataSource.cs
- EditableTreeList.cs
- ReadOnlyCollection.cs
- SqlBooleanizer.cs
- ListBoxAutomationPeer.cs
- EventRoute.cs
- FileSecurity.cs
- SvcMapFileLoader.cs
- CapabilitiesAssignment.cs
- IsolatedStorageFile.cs