diff options
author | Mario Carrion <mario@carrion.mx> | 2009-01-17 01:42:14 +0300 |
---|---|---|
committer | Mario Carrion <mario@carrion.mx> | 2009-01-17 01:42:14 +0300 |
commit | 9482fb95df654f027f38a4710a95a0598b56c4d7 (patch) | |
tree | 3bae7730aef843bc61857c1f21ac01bead060fb4 /mcs/class/Managed.Windows.Forms/System.Windows.Forms | |
parent | 3511f3f78de8647651ef2953bf0d9c08517a6054 (diff) |
2009-01-16 Mario Carrion <mcarrion@novell.com>
* ColumnHeader.cs: UIA Support: raising internal event
UIATextChanged when changing Text.
svn path=/trunk/mcs/; revision=123665
Diffstat (limited to 'mcs/class/Managed.Windows.Forms/System.Windows.Forms')
-rw-r--r-- | mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs | 35 |
2 files changed, 37 insertions, 3 deletions
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog index fe429c03a9e..07ae8139d13 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog @@ -1,3 +1,8 @@ +2009-01-16 Mario Carrion <mcarrion@novell.com> + + * ColumnHeader.cs: UIA Support: raising internal event UIATextChanged + when changing Text. + 2009-01-16 Carlos Alberto Cortez <calberto.cortez@ggmail.com> * X11Structs.cs: diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs index 2edaa99d010..db6170ecc2f 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs @@ -293,9 +293,16 @@ namespace System.Windows.Forms public string Text { get { return text; } set { - text = value; - if (owner != null) - owner.Redraw (true); + if (text != value) { + text = value; + if (owner != null) + owner.Redraw (true); + +#if NET_2_0 + // UIA Framework: Raising Value changed event + OnUIATextChanged (); +#endif + } } } @@ -366,5 +373,27 @@ namespace System.Windows.Forms base.Dispose (disposing); } #endregion // Protected Methods + +#if NET_2_0 + + #region UIA Framework: Methods, Properties and Events + + static object UIATextChangedEvent = new object (); + + internal event EventHandler UIATextChanged { + add { Events.AddHandler (UIATextChangedEvent, value); } + remove { Events.RemoveHandler (UIATextChangedEvent, value); } + } + + private void OnUIATextChanged () + { + EventHandler eh = (EventHandler) Events [UIATextChangedEvent]; + if (eh != null) + eh (this, EventArgs.Empty); + } + + #endregion + +#endif } } |