Multi-Platform Package Manager for Stable Diffusion
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.

65 lines
2.9 KiB

<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:StabilityMatrix.Avalonia.Controls"
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
xmlns:inference="clr-namespace:StabilityMatrix.Avalonia.ViewModels.Inference"
xmlns:mocks="clr-namespace:StabilityMatrix.Avalonia.DesignData"
x:DataType="inference:ModelCardViewModel">
<Design.PreviewWith>
<StackPanel MinWidth="300">
<controls:ModelCard DataContext="{x:Static mocks:DesignData.ModelCardViewModel}"/>
</StackPanel>
</Design.PreviewWith>
<Style Selector="controls|ModelCard">
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="Template">
<ControlTemplate>
<controls:Card Padding="8">
<Grid Margin="8" RowDefinitions="*,*" ColumnDefinitions="Auto,*,Auto">
<!-- Model -->
<TextBlock
Grid.Column="0"
VerticalAlignment="Center"
HorizontalAlignment="Left"
MinWidth="60"
Text="Model" />
<ui:FAComboBox
Grid.Row="0"
Grid.Column="1"
HorizontalAlignment="Stretch"
ItemsSource="{Binding ClientManager.ModelNames}"
SelectedItem="{Binding SelectedModelName, Mode=TwoWay}" />
<Button
Grid.Row="0"
Grid.Column="2"
Margin="8,0,0,0">
<ui:SymbolIcon FontSize="16" Symbol="Setting" />
</Button>
<!-- VAE -->
<TextBlock
Grid.Column="0"
Grid.Row="1"
MinWidth="60"
Margin="0,8,0,0"
VerticalAlignment="Center"
Text="VAE" />
<ui:FAComboBox
Grid.Row="1"
Grid.Column="1"
Grid.ColumnSpan="2"
Margin="0,8,0,0"
HorizontalAlignment="Stretch"
ItemsSource="{Binding ClientManager.ModelNames}"
SelectedItem="{Binding SelectedModelName, Mode=TwoWay}" />
</Grid>
</controls:Card>
</ControlTemplate>
</Setter>
</Style>
</Styles>