LinearOrientation = LinearLayout.Orientation.Horizontal,
}
};
- view.Add(new View()
+
+ var progress = new View()
{
Margin = new Extents(0, 0, 1, 0),
BackgroundImage = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "12_icon_scanning.png"),
- });
+ };
+ view.Add(progress);
+
+ Animation animation = null;
+ progress.VisibilityChanged += (s, e) =>
+ {
+ if (e.Visibility == false)
+ {
+ animation?.Stop();
+ animation?.Clear();
+ animation?.Dispose();
+ animation = null;
+ progress.Orientation = new Rotation(new Radian(new Degree(0)), new Vector3(0, 0, -1));
+ }
+ else if (animation == null)
+ {
+ animation = new Animation(1_000);
+ animation.Looping = true;
+ animation.AnimateTo(progress, "Orientation", new Rotation(new Radian(new Degree(180)), new Vector3(0, 0, -1)), new AlphaFunction(AlphaFunction.BuiltinFunctions.Linear));
+ animation.Play();
+ }
+ };
+
view.Add(new TextLabel()
{
TranslatableText = "WIFI_SCANNING",