You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
3.5 KiB
67 lines
3.5 KiB
<Styles xmlns="https://github.com/avaloniaui" |
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|
xmlns:controls="using:StabilityMatrix.Avalonia.Controls" |
|
xmlns:vmInference="using:StabilityMatrix.Avalonia.ViewModels.Inference" |
|
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" |
|
xmlns:icons="clr-namespace:Projektanker.Icons.Avalonia;assembly=Projektanker.Icons.Avalonia" |
|
x:DataType="vmInference:SeedCardViewModel" |
|
xmlns:mocks="clr-namespace:StabilityMatrix.Avalonia.DesignData"> |
|
<Design.PreviewWith> |
|
<Grid MinWidth="400"> |
|
<controls:SeedCard DataContext="{x:Static mocks:DesignData.SeedCardViewModel}"/> |
|
</Grid> |
|
</Design.PreviewWith> |
|
|
|
<Style Selector="controls|SeedCard"> |
|
<!-- Set Defaults --> |
|
<Setter Property="HorizontalAlignment" Value="Stretch"/> |
|
<Setter Property="Template"> |
|
<ControlTemplate> |
|
<controls:Card Padding="8" HorizontalAlignment="{TemplateBinding HorizontalAlignment}"> |
|
<Grid Margin="4" RowDefinitions="Auto,*"> |
|
<Grid Grid.Row="1" ColumnDefinitions="Auto,*,Auto,Auto"> |
|
<TextBlock |
|
Grid.Column="0" |
|
Margin="0,0,8,0" |
|
VerticalAlignment="Center" |
|
Text="Seed" /> |
|
<NumericUpDown |
|
Grid.Column="1" |
|
Name="SeedNumberBox" |
|
IsReadOnly="{Binding !#RandomizeToggleButton.IsChecked}" |
|
FormatString="F0" |
|
ParsingNumberStyle="Integer" |
|
Value="{Binding Seed, Mode=TwoWay}" |
|
HorizontalAlignment="Stretch" /> |
|
<RepeatButton |
|
Grid.Column="2" |
|
Name="GenerateRandomSeedButton" |
|
Command="{Binding GenerateNewSeedCommand}" |
|
IsVisible="{Binding #RandomizeToggleButton.IsChecked}" |
|
Margin="8,0,0,0"> |
|
<icons:Icon Margin="1" Value="fa-solid fa-rotate" /> |
|
</RepeatButton> |
|
<ToggleButton |
|
Name="RandomizeToggleButton" |
|
ToolTip.Tip="{Binding RandomizeButtonToolTip}" |
|
IsChecked="{Binding !IsRandomizeEnabled}" |
|
Grid.Column="3" Margin="8,0,0,0"> |
|
<Panel> |
|
<icons:Icon |
|
Margin="1" |
|
Value="fa-solid fa-lock" |
|
IsVisible="{Binding #RandomizeToggleButton.IsChecked}"/> |
|
<icons:Icon |
|
Margin="1" |
|
Value="fa-solid fa-dice-d20" |
|
IsVisible="{Binding !#RandomizeToggleButton.IsChecked}"/> |
|
</Panel> |
|
</ToggleButton> |
|
</Grid> |
|
</Grid> |
|
</controls:Card> |
|
</ControlTemplate> |
|
</Setter> |
|
</Style> |
|
</Styles>
|
|
|