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
- XmlILStorageConverter.cs
- XmlDomTextWriter.cs
- CrossSiteScriptingValidation.cs
- CollectionChangeEventArgs.cs
- Clock.cs
- BitHelper.cs
- HyperLinkColumn.cs
- EventHandlerList.cs
- PreloadedPackages.cs
- PersonalizableAttribute.cs
- MultiPageTextView.cs
- basecomparevalidator.cs
- Journaling.cs
- EmptyQuery.cs
- MULTI_QI.cs
- HtmlForm.cs
- RenderData.cs
- PageBreakRecord.cs
- SafeArrayRankMismatchException.cs
- DataBoundControlActionList.cs
- StateMachineSubscriptionManager.cs
- EdmSchemaError.cs
- GlobalItem.cs
- ReaderWriterLock.cs
- SqlServices.cs
- Context.cs
- InternalResources.cs
- LinkButton.cs
- SerializerWriterEventHandlers.cs
- MenuItemCollection.cs
- PartManifestEntry.cs
- _ProxyRegBlob.cs
- Mapping.cs
- Int32Rect.cs
- InkCanvasSelectionAdorner.cs
- OracleException.cs
- RadioButton.cs
- HideDisabledControlAdapter.cs
- XmlResolver.cs
- HtmlContainerControl.cs
- DataProtection.cs
- StreamInfo.cs
- TargetParameterCountException.cs
- RawMouseInputReport.cs
- ProtocolsSection.cs
- ChangeBlockUndoRecord.cs
- _UriTypeConverter.cs
- SortedList.cs
- FrameDimension.cs
- ConditionValidator.cs
- ObjRef.cs
- VectorConverter.cs
- ControlBuilder.cs
- IODescriptionAttribute.cs
- ToolStripHighContrastRenderer.cs
- TablePatternIdentifiers.cs
- SafeNativeMethods.cs
- StylusPoint.cs
- TempFiles.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- Itemizer.cs
- ActivityWithResultConverter.cs
- RelatedImageListAttribute.cs
- XmlTypeAttribute.cs
- SafeProcessHandle.cs
- StylusPointPropertyUnit.cs
- InheritanceContextHelper.cs
- CoreChannel.cs
- InternalControlCollection.cs
- ClaimTypeRequirement.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- ClientRuntimeConfig.cs
- Int32RectValueSerializer.cs
- InteropBitmapSource.cs
- DependencyObjectProvider.cs
- DefaultValueAttribute.cs
- RawAppCommandInputReport.cs
- EncodingTable.cs
- WebPartManagerInternals.cs
- Dictionary.cs
- Assert.cs
- DocobjHost.cs
- AssemblyResolver.cs
- Guid.cs
- GridViewColumnCollection.cs
- SqlCacheDependencyDatabaseCollection.cs
- ClientEventManager.cs
- SoundPlayerAction.cs
- Focus.cs
- DataKeyArray.cs
- FlowDocumentFormatter.cs
- WhereQueryOperator.cs
- WebBrowserSiteBase.cs
- UnsafeNativeMethods.cs
- DbSourceCommand.cs
- Optimizer.cs
- ScrollItemPattern.cs
- StaticExtension.cs
- VSDExceptions.cs