-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
219 additions
and
100 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
Source/LibationWinForms/AccessibleDataGridViewButtonCell.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using System.Windows.Forms; | ||
|
||
namespace LibationWinForms | ||
{ | ||
public class AccessibleDataGridViewButtonCell : DataGridViewButtonCell | ||
{ | ||
protected string AccessibilityName | ||
{ | ||
get => MyAccessibilityObject.AccessibilityName; | ||
set => MyAccessibilityObject.AccessibilityName = value; | ||
} | ||
|
||
/// <summary> | ||
/// Get or set description for accessibility. eg: screen readers. Also sets the ToolTipText | ||
/// </summary> | ||
protected string AccessibilityDescription | ||
{ | ||
get => MyAccessibilityObject.AccessibilityDescription; | ||
set | ||
{ | ||
MyAccessibilityObject.AccessibilityDescription = value; | ||
MyAccessibilityObject.Owner.ToolTipText = value; | ||
} | ||
} | ||
|
||
protected ButtonCellAccessibilityObject MyAccessibilityObject { get; set; } | ||
protected override AccessibleObject CreateAccessibilityInstance() => MyAccessibilityObject; | ||
|
||
public AccessibleDataGridViewButtonCell(string accessibilityName) : base() | ||
{ | ||
MyAccessibilityObject = new(this, name: accessibilityName, description: ""); | ||
} | ||
|
||
protected class ButtonCellAccessibilityObject : DataGridViewButtonCellAccessibleObject | ||
{ | ||
public string AccessibilityName { get; set; } | ||
public string AccessibilityDescription { get; set; } | ||
|
||
public override string Name => AccessibilityName; | ||
public override string Description => AccessibilityDescription; | ||
|
||
public ButtonCellAccessibilityObject(DataGridViewCell owner, string name, string description) : base(owner) | ||
{ | ||
AccessibilityName = name; | ||
AccessibilityDescription = description; | ||
} | ||
} | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
Source/LibationWinForms/AccessibleDataGridViewTextBoxCell.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using System.Windows.Forms; | ||
|
||
namespace LibationWinForms | ||
{ | ||
internal class AccessibleDataGridViewTextBoxCell : DataGridViewTextBoxCell | ||
{ | ||
protected virtual string AccessibilityName | ||
{ | ||
get => MyAccessibilityObject.AccessibilityName; | ||
set => MyAccessibilityObject.AccessibilityName = value; | ||
} | ||
|
||
/// <summary> | ||
/// Get or set description for accessibility. eg: screen readers. Also sets the ToolTipText | ||
/// </summary> | ||
protected string AccessibilityDescription | ||
{ | ||
get => MyAccessibilityObject.AccessibilityDescription; | ||
set | ||
{ | ||
MyAccessibilityObject.AccessibilityDescription = value; | ||
MyAccessibilityObject.Owner.ToolTipText = value; | ||
} | ||
} | ||
|
||
protected ButtonCellAccessibilityObject MyAccessibilityObject { get; set; } | ||
protected override AccessibleObject CreateAccessibilityInstance() => MyAccessibilityObject; | ||
|
||
public AccessibleDataGridViewTextBoxCell(string accessibilityName) : base() | ||
{ | ||
MyAccessibilityObject = new(this, name: accessibilityName, description: ""); | ||
} | ||
|
||
protected class ButtonCellAccessibilityObject : DataGridViewTextBoxCellAccessibleObject | ||
{ | ||
public string AccessibilityName { get; set; } | ||
public string AccessibilityDescription { get; set; } | ||
|
||
public override string Name => AccessibilityName; | ||
public override string Description => AccessibilityDescription; | ||
|
||
public ButtonCellAccessibilityObject(DataGridViewCell owner, string name, string description) : base(owner) | ||
{ | ||
AccessibilityName = name; | ||
AccessibilityDescription = description; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 5 additions & 4 deletions
9
Source/LibationWinForms/GridView/DataGridViewImageButtonCell.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.