diff --git a/demo/Ursa.Demo/Models/MenuKeys.cs b/demo/Ursa.Demo/Models/MenuKeys.cs index 41b83a2..085be94 100644 --- a/demo/Ursa.Demo/Models/MenuKeys.cs +++ b/demo/Ursa.Demo/Models/MenuKeys.cs @@ -27,6 +27,7 @@ public static class MenuKeys public const string MenuKeyRangeSlider = "RangeSlider"; public const string MenuKeySelectionList = "SelectionList"; public const string MenuKeyTagInput = "TagInput"; + public const string MenuKeySkeleton = "Skeleton"; public const string MenuKeyTimeline = "Timeline"; public const string MenuKeyTwoTonePathIcon = "TwoTonePathIcon"; public const string MenuKeyThemeToggler = "ThemeToggler"; diff --git a/demo/Ursa.Demo/Pages/SkeletonDemo.axaml b/demo/Ursa.Demo/Pages/SkeletonDemo.axaml new file mode 100644 index 0000000..13198c0 --- /dev/null +++ b/demo/Ursa.Demo/Pages/SkeletonDemo.axaml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demo/Ursa.Demo/Pages/SkeletonDemo.axaml.cs b/demo/Ursa.Demo/Pages/SkeletonDemo.axaml.cs new file mode 100644 index 0000000..6d92de3 --- /dev/null +++ b/demo/Ursa.Demo/Pages/SkeletonDemo.axaml.cs @@ -0,0 +1,14 @@ +using Avalonia.Controls; +using Ursa.Demo.ViewModels; + +namespace Ursa.Demo.Pages +{ + public partial class SkeletonDemo : UserControl + { + public SkeletonDemo() + { + InitializeComponent(); + DataContext = new SkeletonDemoViewModel(); + } + } +} diff --git a/demo/Ursa.Demo/Ursa.Demo.csproj b/demo/Ursa.Demo/Ursa.Demo.csproj index 94a0b01..cdf1e1b 100644 --- a/demo/Ursa.Demo/Ursa.Demo.csproj +++ b/demo/Ursa.Demo/Ursa.Demo.csproj @@ -26,4 +26,10 @@ + + + + SkeletonDemo.axaml + + diff --git a/demo/Ursa.Demo/ViewModels/MainViewViewModel.cs b/demo/Ursa.Demo/ViewModels/MainViewViewModel.cs index 8f9f8c9..24d8d6e 100644 --- a/demo/Ursa.Demo/ViewModels/MainViewViewModel.cs +++ b/demo/Ursa.Demo/ViewModels/MainViewViewModel.cs @@ -48,8 +48,10 @@ public class MainViewViewModel : ViewModelBase MenuKeys.MenuKeyPagination => new PaginationDemoViewModel(), MenuKeys.MenuKeyRangeSlider => new RangeSliderDemoViewModel(), MenuKeys.MenuKeySelectionList => new SelectionListDemoViewModel(), + MenuKeys.MenuKeySkeleton => new SkeletonDemoViewModel(), MenuKeys.MenuKeyTagInput => new TagInputDemoViewModel(), MenuKeys.MenuKeyTimeline => new TimelineDemoViewModel(), + MenuKeys.MenuKeySkeleton => new SkeletonDemoViewModel(), MenuKeys.MenuKeyTwoTonePathIcon => new TwoTonePathIconDemoViewModel(), MenuKeys.MenuKeyThemeToggler => new ThemeTogglerDemoViewModel(), MenuKeys.MenuKeyToolBar => new ToolBarDemoViewModel(), diff --git a/demo/Ursa.Demo/ViewModels/MenuViewModel.cs b/demo/Ursa.Demo/ViewModels/MenuViewModel.cs index 61a0063..d50fa6f 100644 --- a/demo/Ursa.Demo/ViewModels/MenuViewModel.cs +++ b/demo/Ursa.Demo/ViewModels/MenuViewModel.cs @@ -35,6 +35,7 @@ public class MenuViewModel: ViewModelBase new() { MenuHeader = "Pagination", Key = MenuKeys.MenuKeyPagination }, new() { MenuHeader = "RangeSlider", Key = MenuKeys.MenuKeyRangeSlider }, new() { MenuHeader = "Selection List", Key = MenuKeys.MenuKeySelectionList, Status = "New" }, + new() { MenuHeader = "Skeleton", Key = MenuKeys.MenuKeySkeleton }, new() { MenuHeader = "TagInput", Key = MenuKeys.MenuKeyTagInput }, new() { MenuHeader = "Theme Toggler", Key = MenuKeys.MenuKeyThemeToggler, Status = "New" }, new() { MenuHeader = "Timeline", Key = MenuKeys.MenuKeyTimeline, Status = "WIP" }, diff --git a/demo/Ursa.Demo/ViewModels/SkeletonDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/SkeletonDemoViewModel.cs new file mode 100644 index 0000000..7ee4274 --- /dev/null +++ b/demo/Ursa.Demo/ViewModels/SkeletonDemoViewModel.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Ursa.Demo.ViewModels +{ + public class SkeletonDemoViewModel : ViewModelBase + { + } +} diff --git a/src/Ursa.Themes.Semi/Controls/Skeleton.axaml b/src/Ursa.Themes.Semi/Controls/Skeleton.axaml new file mode 100644 index 0000000..c7fe93b --- /dev/null +++ b/src/Ursa.Themes.Semi/Controls/Skeleton.axaml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Ursa.Themes.Semi/Controls/_index.axaml b/src/Ursa.Themes.Semi/Controls/_index.axaml index fbce535..21d3909 100644 --- a/src/Ursa.Themes.Semi/Controls/_index.axaml +++ b/src/Ursa.Themes.Semi/Controls/_index.axaml @@ -28,6 +28,7 @@ + diff --git a/src/Ursa.Themes.Semi/Themes/Dark/Skeleton.axaml b/src/Ursa.Themes.Semi/Themes/Dark/Skeleton.axaml new file mode 100644 index 0000000..96578f7 --- /dev/null +++ b/src/Ursa.Themes.Semi/Themes/Dark/Skeleton.axaml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/Ursa.Themes.Semi/Themes/Dark/_index.axaml b/src/Ursa.Themes.Semi/Themes/Dark/_index.axaml index f42dc2f..63d0c66 100644 --- a/src/Ursa.Themes.Semi/Themes/Dark/_index.axaml +++ b/src/Ursa.Themes.Semi/Themes/Dark/_index.axaml @@ -14,5 +14,6 @@ + diff --git a/src/Ursa.Themes.Semi/Themes/Light/Skeleton.axaml b/src/Ursa.Themes.Semi/Themes/Light/Skeleton.axaml new file mode 100644 index 0000000..7696f5a --- /dev/null +++ b/src/Ursa.Themes.Semi/Themes/Light/Skeleton.axaml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/Ursa.Themes.Semi/Themes/Light/_index.axaml b/src/Ursa.Themes.Semi/Themes/Light/_index.axaml index f42dc2f..63d0c66 100644 --- a/src/Ursa.Themes.Semi/Themes/Light/_index.axaml +++ b/src/Ursa.Themes.Semi/Themes/Light/_index.axaml @@ -14,5 +14,6 @@ + diff --git a/src/Ursa.Themes.Semi/Themes/Shared/Skeleton.axaml b/src/Ursa.Themes.Semi/Themes/Shared/Skeleton.axaml new file mode 100644 index 0000000..ee0bf19 --- /dev/null +++ b/src/Ursa.Themes.Semi/Themes/Shared/Skeleton.axaml @@ -0,0 +1,4 @@ + + + + diff --git a/src/Ursa.Themes.Semi/Themes/Shared/_index.axaml b/src/Ursa.Themes.Semi/Themes/Shared/_index.axaml index 481acde..5e43477 100644 --- a/src/Ursa.Themes.Semi/Themes/Shared/_index.axaml +++ b/src/Ursa.Themes.Semi/Themes/Shared/_index.axaml @@ -14,6 +14,7 @@ + diff --git a/src/Ursa.Themes.Semi/Ursa.Themes.Semi.csproj b/src/Ursa.Themes.Semi/Ursa.Themes.Semi.csproj index 11bf02b..e7eb473 100644 --- a/src/Ursa.Themes.Semi/Ursa.Themes.Semi.csproj +++ b/src/Ursa.Themes.Semi/Ursa.Themes.Semi.csproj @@ -20,4 +20,8 @@ + + + + diff --git a/src/Ursa/Controls/Skeleton.cs b/src/Ursa/Controls/Skeleton.cs new file mode 100644 index 0000000..6d9197f --- /dev/null +++ b/src/Ursa/Controls/Skeleton.cs @@ -0,0 +1,29 @@ +using Avalonia; +using Avalonia.Controls; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Ursa.Controls +{ + public class Skeleton : ContentControl + { + + public static readonly StyledProperty IsActiveProperty = + AvaloniaProperty.Register(nameof(IsActive)); + public bool IsActive + { + get { return GetValue(IsActiveProperty); } + set { SetValue(IsActiveProperty, value); } + } + + public static readonly StyledProperty LoadingProperty = + AvaloniaProperty.Register(nameof(Loading)); + + public bool Loading + { + get => GetValue(LoadingProperty); + set => SetValue(LoadingProperty, value); + } + } +}