-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixing button and busyarea loading embedding
- Loading branch information
1 parent
da9b61c
commit fae64e5
Showing
5 changed files
with
74 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.Globalization; | ||
using Avalonia.Controls; | ||
using Avalonia.Data; | ||
using Avalonia.Data.Converters; | ||
using SukiUI.Controls; | ||
|
||
namespace SukiUI.Converters | ||
{ | ||
public class ProgressToContentCOnverter : IValueConverter | ||
{ | ||
public static readonly ProgressToContentCOnverter Instance = new ProgressToContentCOnverter(); | ||
|
||
|
||
public object? Convert(object? value, Type targetType, object? parameter, | ||
CultureInfo culture) | ||
{ | ||
if ((bool)value) | ||
return new Loading() { LoadingStyle = LoadingStyle.Simple }; | ||
|
||
return new Panel(); | ||
} | ||
|
||
public object ConvertBack(object? value, Type targetType, | ||
object? parameter, CultureInfo culture) | ||
{ | ||
throw new NotSupportedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<Styles xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:suki="https://github.com/kikipoulet/SukiUI"> | ||
<Design.PreviewWith> | ||
<Border Padding="20"> | ||
<!-- Add Controls for Previewer Here --> | ||
</Border> | ||
</Design.PreviewWith> | ||
|
||
<Style Selector="Button suki|Loading"> | ||
<Setter Property="Foreground" Value="{DynamicResource SukiText}"></Setter> | ||
</Style> | ||
|
||
<Style Selector="Button.Outlined suki|Loading"> | ||
<Setter Property="Foreground" Value="{DynamicResource SukiPrimaryColor}"></Setter> | ||
</Style> | ||
|
||
<Style Selector="Button.Basic suki|Loading"> | ||
<Setter Property="Foreground" Value="{DynamicResource SukiPrimaryColor}"></Setter> | ||
</Style> | ||
|
||
<Style Selector="Button.Accent suki|Loading"> | ||
<Setter Property="Foreground" Value="{DynamicResource SukiAccentColor}"></Setter> | ||
</Style> | ||
|
||
|
||
<Style Selector="Button.Flat suki|Loading"> | ||
<Setter Property="Foreground" Value="White"></Setter> | ||
</Style> | ||
|
||
|
||
</Styles> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters