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
- CompilerCollection.cs
- ControllableStoryboardAction.cs
- XmlConvert.cs
- UiaCoreApi.cs
- WpfGeneratedKnownProperties.cs
- Cursor.cs
- TimeSpanValidatorAttribute.cs
- IsolatedStorageFileStream.cs
- WSDualHttpBindingCollectionElement.cs
- CacheChildrenQuery.cs
- SmiEventStream.cs
- Literal.cs
- RegexGroupCollection.cs
- AnimationClockResource.cs
- PolygonHotSpot.cs
- AlphaSortedEnumConverter.cs
- CorrelationTokenTypeConvertor.cs
- WorkflowRuntimeSection.cs
- HideDisabledControlAdapter.cs
- WebPartEditorOkVerb.cs
- FrameworkEventSource.cs
- ParameterReplacerVisitor.cs
- FileDataSourceCache.cs
- SimpleWorkerRequest.cs
- EditBehavior.cs
- IERequestCache.cs
- ContentControl.cs
- XmlValidatingReader.cs
- Point3DCollection.cs
- AppDomainUnloadedException.cs
- AnnotationDocumentPaginator.cs
- DragDrop.cs
- TransactionException.cs
- SecureConversationVersion.cs
- GeneralTransform3D.cs
- TreeNodeStyleCollection.cs
- SafeEventLogWriteHandle.cs
- SchemaMapping.cs
- Graphics.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- DnsPermission.cs
- Debug.cs
- XhtmlConformanceSection.cs
- EditorPart.cs
- EdmToObjectNamespaceMap.cs
- ScriptControl.cs
- JulianCalendar.cs
- SymmetricKeyWrap.cs
- Wow64ConfigurationLoader.cs
- UnsafeNativeMethods.cs
- WebPartCloseVerb.cs
- EntityCommandDefinition.cs
- SHA512.cs
- FileDialogCustomPlace.cs
- JumpList.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- AliasExpr.cs
- IPHostEntry.cs
- IntSecurity.cs
- Vector3DIndependentAnimationStorage.cs
- ScrollBarRenderer.cs
- BitSet.cs
- KeyToListMap.cs
- SqlConnectionPoolGroupProviderInfo.cs
- HandledEventArgs.cs
- Fault.cs
- Main.cs
- DispatchWrapper.cs
- ContractUtils.cs
- ActiveXMessageFormatter.cs
- CurrencyManager.cs
- OracleFactory.cs
- GenericRootAutomationPeer.cs
- RoutedEventHandlerInfo.cs
- CheckBox.cs
- ByeMessage11.cs
- DocumentSequence.cs
- SQLDateTime.cs
- HtmlForm.cs
- SystemInfo.cs
- CursorInteropHelper.cs
- COM2PictureConverter.cs
- WeakReference.cs
- DataGridViewButtonColumn.cs
- DbProviderConfigurationHandler.cs
- ClipboardData.cs
- OleDbMetaDataFactory.cs
- AsymmetricSignatureDeformatter.cs
- WebPartsSection.cs
- DirectoryNotFoundException.cs
- DBPropSet.cs
- MSHTMLHostUtil.cs
- WpfPayload.cs
- SeekStoryboard.cs
- MediaScriptCommandRoutedEventArgs.cs
- TemplateControlCodeDomTreeGenerator.cs
- _IPv4Address.cs
- Formatter.cs
- SelectionPatternIdentifiers.cs
- ActivityExecutionFilter.cs