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.
 
 
 

61 lines
2.5 KiB

<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:StabilityMatrix.Avalonia.Controls"
xmlns:mocks="clr-namespace:StabilityMatrix.Avalonia.DesignData"
xmlns:vmInference="clr-namespace:StabilityMatrix.Avalonia.ViewModels.Inference"
xmlns:local="clr-namespace:StabilityMatrix.Avalonia"
x:DataType="vmInference:StackExpanderViewModel">
<Design.PreviewWith>
<Grid Width="600" Height="800">
<controls:StackExpander
DataContext="{x:Static mocks:DesignData.StackExpanderViewModel}"/>
</Grid>
</Design.PreviewWith>
<Style Selector="controls|StackExpander">
<!-- Set Defaults -->
<Setter Property="Template">
<ControlTemplate>
<Expander
VerticalContentAlignment="Top"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="{TemplateBinding VerticalAlignment}">
<Expander.Header>
<StackPanel Orientation="Horizontal">
<ToggleSwitch
Margin="2,0,0,2"
VerticalContentAlignment="Center"
OnContent=""
OffContent=""/>
<TextBlock
VerticalAlignment="Center"
Text="{Binding Title}"/>
</StackPanel>
</Expander.Header>
<ItemsControl
VerticalAlignment="Top"
ItemsSource="{Binding ConfigCards}">
<ItemsControl.DataTemplates>
<local:ViewLocator/>
</ItemsControl.DataTemplates>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel
VerticalAlignment="Top"
Spacing="{TemplateBinding Spacing}"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</Expander>
</ControlTemplate>
</Setter>
</Style>
</Styles>