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
- InputBindingCollection.cs
- SafePointer.cs
- CommentEmitter.cs
- TabRenderer.cs
- StreamUpgradeInitiator.cs
- TextServicesDisplayAttributePropertyRanges.cs
- XmlNullResolver.cs
- ProcessDesigner.cs
- FixedDocument.cs
- FirewallWrapper.cs
- TileModeValidation.cs
- ToolStripItemGlyph.cs
- Version.cs
- PlainXmlWriter.cs
- ServiceDescriptionImporter.cs
- RadialGradientBrush.cs
- CornerRadiusConverter.cs
- NetNamedPipeBinding.cs
- mongolianshape.cs
- FontSourceCollection.cs
- Vector3dCollection.cs
- keycontainerpermission.cs
- Pen.cs
- XmlUtil.cs
- SqlDataAdapter.cs
- DocumentsTrace.cs
- BypassElementCollection.cs
- XPathSingletonIterator.cs
- DbDataSourceEnumerator.cs
- RoutedEventValueSerializer.cs
- ToolStripContainerActionList.cs
- UIAgentAsyncParams.cs
- EventMappingSettings.cs
- Normalization.cs
- FillBehavior.cs
- JsonReader.cs
- BuildResultCache.cs
- MarkupProperty.cs
- ProjectionCamera.cs
- ArraySegment.cs
- Int16KeyFrameCollection.cs
- SelectionItemPattern.cs
- XmlSchemaChoice.cs
- OAVariantLib.cs
- TreeNodeCollection.cs
- DataGridCommandEventArgs.cs
- PlatformCulture.cs
- VirtualDirectoryMappingCollection.cs
- ChangeToolStripParentVerb.cs
- TextDecorationCollection.cs
- AnalyzedTree.cs
- InstanceDescriptor.cs
- SqlDataSourceCommandEventArgs.cs
- DbConnectionPoolGroupProviderInfo.cs
- RecognitionResult.cs
- ClientScriptManagerWrapper.cs
- Error.cs
- BrowserDefinition.cs
- EntityDataSourceDataSelectionPanel.cs
- DrawingGroup.cs
- Trace.cs
- XmlElementCollection.cs
- MediaEntryAttribute.cs
- GregorianCalendarHelper.cs
- WebPartDisplayModeEventArgs.cs
- DataChangedEventManager.cs
- ItemList.cs
- DateTimeConverter.cs
- AutomationPropertyInfo.cs
- PnrpPeerResolverBindingElement.cs
- OperandQuery.cs
- WebPartDisplayMode.cs
- GeneralTransform3DTo2D.cs
- IdnElement.cs
- BrowserDefinition.cs
- DateTimeSerializationSection.cs
- ClusterRegistryConfigurationProvider.cs
- SmtpFailedRecipientsException.cs
- PartitionResolver.cs
- CodeComment.cs
- DataServiceException.cs
- SessionStateSection.cs
- Win32KeyboardDevice.cs
- Misc.cs
- BulletedListDesigner.cs
- IdentityElement.cs
- ScriptControl.cs
- DataGridPageChangedEventArgs.cs
- WpfPayload.cs
- ThreadPool.cs
- CircleHotSpot.cs
- EventLogEntry.cs
- PrivilegeNotHeldException.cs
- SchemaSetCompiler.cs
- UriTemplatePathSegment.cs
- AttachedAnnotationChangedEventArgs.cs
- ServiceHttpHandlerFactory.cs
- DocumentReference.cs
- SurrogateSelector.cs
- FormClosedEvent.cs