Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewSelectedCellsAccessibleObject.cs / 1305376 / DataGridViewSelectedCellsAccessibleObject.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Security.Permissions; namespace System.Windows.Forms { public partial class DataGridView { private class DataGridViewSelectedCellsAccessibleObject : AccessibleObject { DataGridView owner; public DataGridViewSelectedCellsAccessibleObject(DataGridView owner) { this.owner = owner; } public override string Name { get { return SR.GetString(SR.DataGridView_AccSelectedCellsName); } } public override AccessibleObject Parent { [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)] get { return this.owner.AccessibilityObject; } } public override AccessibleRole Role { get { return AccessibleRole.Grouping; } } public override AccessibleStates State { get { return AccessibleStates.Selected | AccessibleStates.Selectable; } } public override string Value { [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)] get { return this.Name; } } public override AccessibleObject GetChild(int index) { if (index >= 0 && index < this.owner.GetCellCount(DataGridViewElementStates.Selected)) { return this.owner.SelectedCell(index).AccessibilityObject; } else { return null; } } public override int GetChildCount() { return this.owner.GetCellCount(DataGridViewElementStates.Selected); } public override AccessibleObject GetSelected() { return this; } public override AccessibleObject GetFocused() { if (this.owner.CurrentCell != null && this.owner.CurrentCell.Selected) { return this.owner.CurrentCell.AccessibilityObject; } else { return null; } } [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)] public override AccessibleObject Navigate(AccessibleNavigation navigationDirection) { switch (navigationDirection) { case AccessibleNavigation.FirstChild: if (this.owner.GetCellCount(DataGridViewElementStates.Selected) > 0) { return this.owner.SelectedCell(0).AccessibilityObject; } else { return null; } case AccessibleNavigation.LastChild: if (this.owner.GetCellCount(DataGridViewElementStates.Selected) > 0) { return this.owner.SelectedCell(this.owner.GetCellCount(DataGridViewElementStates.Selected) - 1).AccessibilityObject; } else { return null; } default: { return null; } } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataSourceCache.cs
- columnmapkeybuilder.cs
- hresults.cs
- tooltip.cs
- StreamWriter.cs
- MemoryRecordBuffer.cs
- _OverlappedAsyncResult.cs
- DataListItem.cs
- BuildManagerHost.cs
- RegexCapture.cs
- AttachmentCollection.cs
- HttpProtocolReflector.cs
- TransportContext.cs
- DataSourceControlBuilder.cs
- TokenBasedSetEnumerator.cs
- CodeMemberProperty.cs
- HttpClientCertificate.cs
- UserControlDesigner.cs
- RuntimeVariableList.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- SchemaNames.cs
- LassoHelper.cs
- DomNameTable.cs
- ReflectEventDescriptor.cs
- ConfigurationManager.cs
- XamlSerializerUtil.cs
- BitmapFrame.cs
- FormViewInsertEventArgs.cs
- ThreadAbortException.cs
- HtmlTitle.cs
- GZipStream.cs
- SqlFlattener.cs
- HttpListenerException.cs
- SEHException.cs
- ErrorRuntimeConfig.cs
- ResourceExpression.cs
- BamlStream.cs
- CorrelationKey.cs
- StandardToolWindows.cs
- TypeViewSchema.cs
- Size3D.cs
- ChangeToolStripParentVerb.cs
- PreservationFileReader.cs
- IndexedString.cs
- CompositeControl.cs
- FileLogRecord.cs
- PrimitiveCodeDomSerializer.cs
- TemplatePartAttribute.cs
- Model3DGroup.cs
- LicFileLicenseProvider.cs
- Int16KeyFrameCollection.cs
- CssClassPropertyAttribute.cs
- TransformGroup.cs
- ParameterReplacerVisitor.cs
- PropertyChangedEventArgs.cs
- UpdateManifestForBrowserApplication.cs
- AutomationProperties.cs
- DataMisalignedException.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- StackOverflowException.cs
- UserCancellationException.cs
- ListView.cs
- RectAnimationUsingKeyFrames.cs
- SqlClientWrapperSmiStreamChars.cs
- DataGridViewRowPostPaintEventArgs.cs
- LicenseException.cs
- ComponentConverter.cs
- TextServicesCompartmentContext.cs
- PreDigestedSignedInfo.cs
- CompilerTypeWithParams.cs
- BitmapEncoder.cs
- TdsValueSetter.cs
- OleDbEnumerator.cs
- ObjectDisposedException.cs
- DataGridViewLinkCell.cs
- VisualStyleRenderer.cs
- XmlBinaryWriter.cs
- PolyQuadraticBezierSegment.cs
- RectangleF.cs
- ActiveXHost.cs
- InputBuffer.cs
- DataGridViewAccessibleObject.cs
- MaskDescriptors.cs
- Style.cs
- webclient.cs
- StrongNamePublicKeyBlob.cs
- XmlILTrace.cs
- HttpInputStream.cs
- ProcessHost.cs
- ADMembershipUser.cs
- TranslateTransform.cs
- VisualProxy.cs
- DispatchChannelSink.cs
- PropertyValueChangedEvent.cs
- DPTypeDescriptorContext.cs
- SerializationEventsCache.cs
- ParallelLoopState.cs
- Configuration.cs
- FrameworkElementFactoryMarkupObject.cs
- EmptyEnumerable.cs