feat: fix various issues.
This commit is contained in:
@@ -25,7 +25,7 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
CornerRadius="2"
|
CornerRadius="2"
|
||||||
IsActive="{Binding #active.IsChecked}"
|
IsActive="{Binding #active.IsChecked}"
|
||||||
Loading="{Binding #loading.IsChecked}">
|
IsLoading="{Binding #loading.IsChecked}">
|
||||||
<Image RenderOptions.BitmapInterpolationMode="HighQuality" Source="../Assets/Ursa.ico" />
|
<Image RenderOptions.BitmapInterpolationMode="HighQuality" Source="../Assets/Ursa.ico" />
|
||||||
</u:Skeleton>
|
</u:Skeleton>
|
||||||
<UniformGrid
|
<UniformGrid
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
CornerRadius="2"
|
CornerRadius="2"
|
||||||
IsActive="{Binding #active.IsChecked}"
|
IsActive="{Binding #active.IsChecked}"
|
||||||
Loading="{Binding #loading.IsChecked}">
|
IsLoading="{Binding #loading.IsChecked}">
|
||||||
<SelectableTextBlock Margin="0,2" Text="是先有鸡还是先有蛋" />
|
<SelectableTextBlock Margin="0,2" Text="是先有鸡还是先有蛋" />
|
||||||
</u:Skeleton>
|
</u:Skeleton>
|
||||||
<u:Skeleton
|
<u:Skeleton
|
||||||
@@ -46,14 +46,14 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
CornerRadius="2"
|
CornerRadius="2"
|
||||||
IsActive="{Binding #active.IsChecked}"
|
IsActive="{Binding #active.IsChecked}"
|
||||||
Loading="{Binding #loading.IsChecked}">
|
IsLoading="{Binding #loading.IsChecked}">
|
||||||
<SelectableTextBlock Margin="0,2" Text="什么是工匠精神" />
|
<SelectableTextBlock Margin="0,2" Text="什么是工匠精神" />
|
||||||
</u:Skeleton>
|
</u:Skeleton>
|
||||||
<u:Skeleton
|
<u:Skeleton
|
||||||
VerticalAlignment="Bottom"
|
VerticalAlignment="Bottom"
|
||||||
CornerRadius="2"
|
CornerRadius="2"
|
||||||
IsActive="{Binding #active.IsChecked}"
|
IsActive="{Binding #active.IsChecked}"
|
||||||
Loading="{Binding #loading.IsChecked}">
|
IsLoading="{Binding #loading.IsChecked}">
|
||||||
<SelectableTextBlock Margin="0,2" Text="看山不是山,看水不是水,看山还是山,看水还是水" />
|
<SelectableTextBlock Margin="0,2" Text="看山不是山,看水不是水,看山还是山,看水还是水" />
|
||||||
</u:Skeleton>
|
</u:Skeleton>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ public class MainViewViewModel : ViewModelBase
|
|||||||
MenuKeys.MenuKeySkeleton => new SkeletonDemoViewModel(),
|
MenuKeys.MenuKeySkeleton => new SkeletonDemoViewModel(),
|
||||||
MenuKeys.MenuKeyTagInput => new TagInputDemoViewModel(),
|
MenuKeys.MenuKeyTagInput => new TagInputDemoViewModel(),
|
||||||
MenuKeys.MenuKeyTimeline => new TimelineDemoViewModel(),
|
MenuKeys.MenuKeyTimeline => new TimelineDemoViewModel(),
|
||||||
MenuKeys.MenuKeySkeleton => new SkeletonDemoViewModel(),
|
|
||||||
MenuKeys.MenuKeyTwoTonePathIcon => new TwoTonePathIconDemoViewModel(),
|
MenuKeys.MenuKeyTwoTonePathIcon => new TwoTonePathIconDemoViewModel(),
|
||||||
MenuKeys.MenuKeyThemeToggler => new ThemeTogglerDemoViewModel(),
|
MenuKeys.MenuKeyThemeToggler => new ThemeTogglerDemoViewModel(),
|
||||||
MenuKeys.MenuKeyToolBar => new ToolBarDemoViewModel(),
|
MenuKeys.MenuKeyToolBar => new ToolBarDemoViewModel(),
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class MenuViewModel: ViewModelBase
|
|||||||
new() { MenuHeader = "Pagination", Key = MenuKeys.MenuKeyPagination },
|
new() { MenuHeader = "Pagination", Key = MenuKeys.MenuKeyPagination },
|
||||||
new() { MenuHeader = "RangeSlider", Key = MenuKeys.MenuKeyRangeSlider },
|
new() { MenuHeader = "RangeSlider", Key = MenuKeys.MenuKeyRangeSlider },
|
||||||
new() { MenuHeader = "Selection List", Key = MenuKeys.MenuKeySelectionList, Status = "New" },
|
new() { MenuHeader = "Selection List", Key = MenuKeys.MenuKeySelectionList, Status = "New" },
|
||||||
new() { MenuHeader = "Skeleton", Key = MenuKeys.MenuKeySkeleton },
|
new() { MenuHeader = "Skeleton", Key = MenuKeys.MenuKeySkeleton, Status = "New" },
|
||||||
new() { MenuHeader = "TagInput", Key = MenuKeys.MenuKeyTagInput },
|
new() { MenuHeader = "TagInput", Key = MenuKeys.MenuKeyTagInput },
|
||||||
new() { MenuHeader = "Theme Toggler", Key = MenuKeys.MenuKeyThemeToggler, Status = "New" },
|
new() { MenuHeader = "Theme Toggler", Key = MenuKeys.MenuKeyThemeToggler, Status = "New" },
|
||||||
new() { MenuHeader = "Timeline", Key = MenuKeys.MenuKeyTimeline, Status = "WIP" },
|
new() { MenuHeader = "Timeline", Key = MenuKeys.MenuKeyTimeline, Status = "WIP" },
|
||||||
|
|||||||
@@ -27,14 +27,14 @@
|
|||||||
<Border
|
<Border
|
||||||
x:Name="PART_LoadingBorder"
|
x:Name="PART_LoadingBorder"
|
||||||
Classes.Active="{Binding Path= IsActive, RelativeSource={RelativeSource TemplatedParent}}"
|
Classes.Active="{Binding Path= IsActive, RelativeSource={RelativeSource TemplatedParent}}"
|
||||||
IsHitTestVisible="{TemplateBinding Loading}"
|
IsHitTestVisible="{TemplateBinding IsLoading}"
|
||||||
Background="{DynamicResource SkeletonDefaultBackground}"
|
Background="{DynamicResource SkeletonDefaultBackground}"
|
||||||
IsVisible="{TemplateBinding Loading}">
|
IsVisible="{TemplateBinding IsLoading}">
|
||||||
</Border>
|
</Border>
|
||||||
<Border
|
<Border
|
||||||
x:Name="PART_ActiveBorder"
|
x:Name="PART_ActiveBorder"
|
||||||
IsHitTestVisible="{TemplateBinding Loading}"
|
IsHitTestVisible="{TemplateBinding IsLoading}"
|
||||||
IsVisible="{TemplateBinding Loading}"
|
IsVisible="{TemplateBinding IsLoading}"
|
||||||
>
|
>
|
||||||
</Border>
|
</Border>
|
||||||
</Panel>
|
</Panel>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</Design.PreviewWith>
|
</Design.PreviewWith>
|
||||||
|
|
||||||
<!-- Add Styles Here -->
|
<!-- Add Styles Here -->
|
||||||
<Style Selector="u|Skeleton[IsActive=True][Loading=True] /template/ Border#PART_ActiveBorder">
|
<Style Selector="u|Skeleton[IsActive=True][IsLoading=True] /template/ Border#PART_ActiveBorder">
|
||||||
<Style.Animations>
|
<Style.Animations>
|
||||||
<Animation
|
<Animation
|
||||||
FillMode="None"
|
FillMode="None"
|
||||||
|
|||||||
@@ -17,13 +17,13 @@ namespace Ursa.Controls
|
|||||||
set { SetValue(IsActiveProperty, value); }
|
set { SetValue(IsActiveProperty, value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public static readonly StyledProperty<bool> LoadingProperty =
|
public static readonly StyledProperty<bool> IsLoadingProperty =
|
||||||
AvaloniaProperty.Register<Skeleton, bool>(nameof(Loading));
|
AvaloniaProperty.Register<Skeleton, bool>(nameof(IsLoading));
|
||||||
|
|
||||||
public bool Loading
|
public bool IsLoading
|
||||||
{
|
{
|
||||||
get => GetValue(LoadingProperty);
|
get => GetValue(IsLoadingProperty);
|
||||||
set => SetValue(LoadingProperty, value);
|
set => SetValue(IsLoadingProperty, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user