Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ButtonEx.cs « Xamarin.PropertyEditing.Windows - github.com/xamarin/Xamarin.PropertyEditing.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 474043f303e93f5bd01b83cf3ece94a3521daf76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System.Windows;
using System.Windows.Automation.Peers;
using System.Windows.Controls;

namespace Xamarin.PropertyEditing.Windows
{
	internal class ButtonEx
		: Button
	{
		protected override AutomationPeer OnCreateAutomationPeer ()
		{
			return new ButtonExAutomationPeer (this);
		}

		private class ButtonExAutomationPeer
			: ButtonAutomationPeer
		{
			public ButtonExAutomationPeer (Button owner)
				: base (owner)
			{
			}

			protected override bool IsControlElementCore ()
			{
				return base.IsControlElementCore () && Owner.IsVisible;
			}
		}
	}
}