4 changed files with 85 additions and 0 deletions
@ -0,0 +1,64 @@ |
|||
<UserControl xmlns="https://github.com/avaloniaui" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" |
|||
x:Class="ControlCatalog.Pages.AcrylicPage"> |
|||
<UserControl.Background> |
|||
<ExperimentalAcrylicBrush |
|||
TintColor="Black" |
|||
TintOpacity="{Binding #TintOpacitySlider.Value}" |
|||
TintLuminosityOpacity="{Binding #TintLuminositySlider.Value}" |
|||
BackgroundSource="Digger" /> |
|||
</UserControl.Background> |
|||
<Border Padding="20" HorizontalAlignment="Center"> |
|||
<StackPanel Spacing="20"> |
|||
<Slider Name="TintOpacitySlider" Minimum="0" Maximum="1" Value="0.5" /> |
|||
<Slider Name="TintLuminositySlider" Minimum="0" Maximum="1" Value="0.5" /> |
|||
|
|||
<StackPanel Orientation="Horizontal" Spacing="20"> |
|||
<Border Height="200" Width="200" CornerRadius="5" BoxShadow="2 2 16 0 Black"> |
|||
<Border.Background> |
|||
<ExperimentalAcrylicBrush |
|||
TintColor="Red" |
|||
TintOpacity="{Binding #TintOpacitySlider.Value}" |
|||
TintLuminosityOpacity="{Binding #TintLuminositySlider.Value}" |
|||
BackgroundSource="Digger" /> |
|||
</Border.Background> |
|||
</Border> |
|||
|
|||
<Border Height="200" Width="200" CornerRadius="5" BoxShadow="2 2 16 0 Black"> |
|||
<Border.Background> |
|||
<ExperimentalAcrylicBrush |
|||
TintColor="Green" |
|||
TintOpacity="{Binding #TintOpacitySlider.Value}" |
|||
TintLuminosityOpacity="{Binding #TintLuminositySlider.Value}" |
|||
BackgroundSource="Digger" /> |
|||
</Border.Background> |
|||
</Border> |
|||
</StackPanel> |
|||
|
|||
<StackPanel Orientation="Horizontal" Spacing="20"> |
|||
<Border Height="200" Width="200" CornerRadius="5" BoxShadow="2 2 16 0 Black"> |
|||
<Border.Background> |
|||
<ExperimentalAcrylicBrush |
|||
TintColor="Blue" |
|||
TintOpacity="{Binding #TintOpacitySlider.Value}" |
|||
TintLuminosityOpacity="{Binding #TintLuminositySlider.Value}" |
|||
BackgroundSource="Digger" /> |
|||
</Border.Background> |
|||
</Border> |
|||
|
|||
<Border Height="200" Width="200" CornerRadius="5" BoxShadow="2 2 16 0 Black"> |
|||
<Border.Background> |
|||
<ExperimentalAcrylicBrush |
|||
TintColor="Yellow" |
|||
TintOpacity="{Binding #TintOpacitySlider.Value}" |
|||
TintLuminosityOpacity="{Binding #TintLuminositySlider.Value}" |
|||
BackgroundSource="Digger" /> |
|||
</Border.Background> |
|||
</Border> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</Border> |
|||
</UserControl> |
|||
@ -0,0 +1,19 @@ |
|||
using Avalonia; |
|||
using Avalonia.Controls; |
|||
using Avalonia.Markup.Xaml; |
|||
|
|||
namespace ControlCatalog.Pages |
|||
{ |
|||
public class AcrylicPage : UserControl |
|||
{ |
|||
public AcrylicPage() |
|||
{ |
|||
this.InitializeComponent(); |
|||
} |
|||
|
|||
private void InitializeComponent() |
|||
{ |
|||
AvaloniaXamlLoader.Load(this); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue