2 * Copyright(c) 2021 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 using System.ComponentModel;
20 using System.Runtime.InteropServices;
23 namespace Tizen.NUI.BaseComponents
26 /// View is the base class for all views.
28 /// <since_tizen> 3 </since_tizen>
29 public partial class View
32 /// Gets or sets accessibility name.
34 [EditorBrowsable(EditorBrowsableState.Never)]
35 public string AccessibilityName
39 if (NUIApplication.IsUsingXaml)
41 return (string)GetValue(AccessibilityNameProperty);
45 return (string)GetInternalAccessibilityNameProperty(this);
50 if (NUIApplication.IsUsingXaml)
52 SetValue(AccessibilityNameProperty, value);
56 SetInternalAccessibilityNameProperty(this, null, value);
58 NotifyPropertyChanged();
63 /// Gets or sets accessibility description.
65 [EditorBrowsable(EditorBrowsableState.Never)]
66 public string AccessibilityDescription
70 if (NUIApplication.IsUsingXaml)
72 return (string)GetValue(AccessibilityDescriptionProperty);
76 return (string)GetInternalAccessibilityDescriptionProperty(this);
81 if (NUIApplication.IsUsingXaml)
83 SetValue(AccessibilityDescriptionProperty, value);
87 SetInternalAccessibilityDescriptionProperty(this, null, value);
89 NotifyPropertyChanged();
94 /// Gets or sets accessibility translation domain.
96 [EditorBrowsable(EditorBrowsableState.Never)]
97 public string AccessibilityTranslationDomain
101 if (NUIApplication.IsUsingXaml)
103 return (string)GetValue(AccessibilityTranslationDomainProperty);
107 return (string)GetInternalAccessibilityTranslationDomainProperty(this);
112 if (NUIApplication.IsUsingXaml)
114 SetValue(AccessibilityTranslationDomainProperty, value);
118 SetInternalAccessibilityTranslationDomainProperty(this, null, value);
120 NotifyPropertyChanged();
125 /// Gets or sets accessibility role.
127 [EditorBrowsable(EditorBrowsableState.Never)]
128 public Role AccessibilityRole
132 if (NUIApplication.IsUsingXaml)
134 return (Role)GetValue(AccessibilityRoleProperty);
138 return (Role)GetInternalAccessibilityRoleProperty(this);
143 if (NUIApplication.IsUsingXaml)
145 SetValue(AccessibilityRoleProperty, value);
149 SetInternalAccessibilityRoleProperty(this, null, value);
151 NotifyPropertyChanged();
156 /// Gets or sets whether the view is highlightable for accessibility or not.
159 /// For views, which intend to receive accessibility highlight focus, this value should be set as true.
160 /// Otherwise it is set to false by default and the object is omitted in AT-SPI2 navigation.
162 [EditorBrowsable(EditorBrowsableState.Never)]
163 public bool AccessibilityHighlightable
167 if (NUIApplication.IsUsingXaml)
169 return (bool)GetValue(AccessibilityHighlightableProperty);
173 return (bool)GetInternalAccessibilityHighlightableProperty(this);
178 if (NUIApplication.IsUsingXaml)
180 SetValue(AccessibilityHighlightableProperty, value);
184 SetInternalAccessibilityHighlightableProperty(this, null, value);
186 NotifyPropertyChanged();
191 /// Controls whether the view is hidden from the AT-SPI tree.
194 /// False by default. Hiding an object means that any AT-SPI clients are not able to see it.
196 [EditorBrowsable(EditorBrowsableState.Never)]
197 public bool AccessibilityHidden
201 if (NUIApplication.IsUsingXaml)
203 return (bool)GetValue(AccessibilityHiddenProperty);
207 return (bool)GetInternalAccessibilityHiddenProperty(this);
212 if (NUIApplication.IsUsingXaml)
214 SetValue(AccessibilityHiddenProperty, value);
218 SetInternalAccessibilityHiddenProperty(this, null, value);
220 NotifyPropertyChanged();
225 /// Gets or sets a value that allows the automation framework to find and interact with this element.
227 [EditorBrowsable(EditorBrowsableState.Never)]
228 public new string AutomationId
232 if (NUIApplication.IsUsingXaml)
234 return GetValue(AutomationIdProperty) as string;
238 return GetInternalAutomationIdProperty(this) as string;
243 if (NUIApplication.IsUsingXaml)
245 SetValue(AutomationIdProperty, value);
249 SetInternalAutomationIdProperty(this, null, value);
251 NotifyPropertyChanged();