|
| 1 | +<Styles |
| 2 | + xmlns="https://github.com/avaloniaui" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + xmlns:controls="using:StabilityMatrix.Avalonia.Controls" |
| 5 | + xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" |
| 6 | + xmlns:inference="clr-namespace:StabilityMatrix.Avalonia.ViewModels.Inference" |
| 7 | + xmlns:lang="clr-namespace:StabilityMatrix.Avalonia.Languages" |
| 8 | + xmlns:mocks="clr-namespace:StabilityMatrix.Avalonia.DesignData" |
| 9 | + x:DataType="inference:UnetModelCardViewModel"> |
| 10 | + <Design.PreviewWith> |
| 11 | + <Panel Width="400" Height="400"> |
| 12 | + <StackPanel Width="300" VerticalAlignment="Center" Spacing="32"> |
| 13 | + <controls:UnetModelCard /> |
| 14 | + </StackPanel> |
| 15 | + </Panel> |
| 16 | + </Design.PreviewWith> |
| 17 | + |
| 18 | + <Style Selector="controls|UnetModelCard"> |
| 19 | + <Setter Property="HorizontalAlignment" Value="Stretch" /> |
| 20 | + <Setter Property="Template"> |
| 21 | + <ControlTemplate> |
| 22 | + <controls:Card Padding="8"> |
| 23 | + <Grid |
| 24 | + ColumnDefinitions="Auto,*" |
| 25 | + RowDefinitions="*,*,*,*,*"> |
| 26 | + <!-- Model --> |
| 27 | + <TextBlock |
| 28 | + Grid.Row="0" |
| 29 | + Grid.Column="0" |
| 30 | + VerticalAlignment="Center" |
| 31 | + Margin="4" |
| 32 | + Text="{x:Static lang:Resources.Label_Model}" |
| 33 | + TextAlignment="Left" /> |
| 34 | + |
| 35 | + <controls:BetterComboBox |
| 36 | + Grid.Row="0" |
| 37 | + Grid.Column="1" |
| 38 | + Margin="4" |
| 39 | + HorizontalAlignment="Stretch" |
| 40 | + ItemsSource="{Binding ClientManager.UnetModels}" |
| 41 | + SelectedItem="{Binding SelectedModel}" |
| 42 | + Theme="{StaticResource BetterComboBoxHybridModelTheme}"/> |
| 43 | + |
| 44 | + <!-- Model --> |
| 45 | + <TextBlock |
| 46 | + Grid.Row="1" |
| 47 | + Grid.Column="0" |
| 48 | + VerticalAlignment="Center" |
| 49 | + Margin="4" |
| 50 | + Text="Precision" |
| 51 | + TextAlignment="Left" /> |
| 52 | + |
| 53 | + <controls:BetterComboBox |
| 54 | + Grid.Row="1" |
| 55 | + Grid.Column="1" |
| 56 | + Margin="4" |
| 57 | + HorizontalAlignment="Stretch" |
| 58 | + ItemsSource="{Binding WeightDTypes}" |
| 59 | + SelectedItem="{Binding SelectedDType}" /> |
| 60 | + |
| 61 | + <!-- VAE --> |
| 62 | + <TextBlock |
| 63 | + Grid.Row="2" |
| 64 | + Grid.Column="0" |
| 65 | + Margin="4" |
| 66 | + VerticalAlignment="Center" |
| 67 | + Text="{x:Static lang:Resources.Label_VAE}" |
| 68 | + TextAlignment="Left" /> |
| 69 | + |
| 70 | + <ui:FAComboBox |
| 71 | + Grid.Row="2" |
| 72 | + Grid.Column="1" |
| 73 | + Margin="4" |
| 74 | + HorizontalAlignment="Stretch" |
| 75 | + DisplayMemberBinding="{Binding ShortDisplayName}" |
| 76 | + IsTextSearchEnabled="True" |
| 77 | + ItemsSource="{Binding ClientManager.VaeModels}" |
| 78 | + SelectedItem="{Binding SelectedVae}" /> |
| 79 | + |
| 80 | + <!-- CLIP Selection 1 --> |
| 81 | + <TextBlock |
| 82 | + Grid.Row="3" |
| 83 | + Grid.Column="0" |
| 84 | + Margin="4" |
| 85 | + VerticalAlignment="Center" |
| 86 | + Text="CLIP 1" |
| 87 | + TextAlignment="Left" /> |
| 88 | + |
| 89 | + <ui:FAComboBox |
| 90 | + Grid.Row="3" |
| 91 | + Grid.Column="1" |
| 92 | + Margin="4" |
| 93 | + HorizontalAlignment="Stretch" |
| 94 | + DisplayMemberBinding="{Binding ShortDisplayName}" |
| 95 | + IsTextSearchEnabled="True" |
| 96 | + ItemsSource="{Binding ClientManager.ClipModels}" |
| 97 | + SelectedItem="{Binding SelectedClip1}" /> |
| 98 | + |
| 99 | + <!-- CLIP Selection 2 --> |
| 100 | + <TextBlock |
| 101 | + Grid.Row="4" |
| 102 | + Grid.Column="0" |
| 103 | + Margin="4" |
| 104 | + VerticalAlignment="Center" |
| 105 | + Text="CLIP 2" |
| 106 | + TextAlignment="Left" /> |
| 107 | + |
| 108 | + <ui:FAComboBox |
| 109 | + Grid.Row="4" |
| 110 | + Grid.Column="1" |
| 111 | + Margin="4" |
| 112 | + HorizontalAlignment="Stretch" |
| 113 | + DisplayMemberBinding="{Binding ShortDisplayName}" |
| 114 | + IsTextSearchEnabled="True" |
| 115 | + ItemsSource="{Binding ClientManager.ClipModels}" |
| 116 | + SelectedItem="{Binding SelectedClip2}" /> |
| 117 | + </Grid> |
| 118 | + </controls:Card> |
| 119 | + </ControlTemplate> |
| 120 | + </Setter> |
| 121 | + </Style> |
| 122 | +</Styles> |
0 commit comments