/// <since_tizen> 6 </since_tizen>
public Progress() : base()
{
+ Initialize();
}
/// <summary>
/// <since_tizen> 8 </since_tizen>
public Progress(string style) : base(style)
{
+ Initialize();
}
/// <summary>
/// <since_tizen> 8 </since_tizen>
public Progress(ProgressStyle progressStyle) : base(progressStyle)
{
+ Initialize();
+ }
+
+ /// <summary>
+ /// Prevents from showing child widgets in AT-SPI tree.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override bool AccessibilityShouldReportZeroChildren()
+ {
+ return true;
+ }
+
+ /// <summary>
+ /// Minimum value.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override double AccessibilityGetMinimum()
+ {
+ if (this.ProgressState == Components.Progress.ProgressStatusType.Determinate)
+ return (double)MinValue;
+ else return 0.0;
+ }
+
+ /// <summary>
+ /// Current value.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override double AccessibilityGetCurrent()
+ {
+ if (this.ProgressState == Components.Progress.ProgressStatusType.Determinate)
+ return (double)CurrentValue;
+ else return 0.0;
+ }
+
+ /// <summary>
+ /// Maximum value.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override double AccessibilityGetMaximum()
+ {
+ if (this.ProgressState == Components.Progress.ProgressStatusType.Determinate)
+ return (double)MaxValue;
+ else return 0.0;
}
/// <summary>
set
{
SetValue(CurrentValueProperty, value);
+ if (IsHighlighted)
+ {
+ EmitAccessibilityEvent(ObjectPropertyChangeEvent.Value);
+ }
}
}
public override void OnInitialize()
{
base.OnInitialize();
+ SetAccessibilityConstructor(Role.ProgressBar, AccessibilityInterface.Value);
// create necessary components
InitializeTrack();
InitializeBuffer();
}
}
+ private void Initialize()
+ {
+ AccessibilityHighlightable = true;
+ }
+
private void InitializeTrack()
{
if (null == trackImage)