|
|
|
<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="500" Height="800">
|
|
|
|
<StackPanel>
|
|
|
|
<controls:StackExpander
|
|
|
|
DataContext="{x:Static mocks:DesignData.StackExpanderViewModel}"/>
|
|
|
|
</StackPanel>
|
|
|
|
</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"
|
|
|
|
IsChecked="{Binding IsEnabled}"
|
|
|
|
VerticalContentAlignment="Center"
|
|
|
|
OnContent=""
|
|
|
|
OffContent=""/>
|
|
|
|
<TextBlock
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Text="{Binding Title}"/>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
</Expander.Header>
|
|
|
|
|
|
|
|
<ItemsControl
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
ItemsSource="{Binding Cards}">
|
|
|
|
|
|
|
|
<ItemsControl.Styles>
|
|
|
|
<Style Selector="controls|Card">
|
|
|
|
<Setter Property="IsCardVisualsEnabled" Value="False"/>
|
|
|
|
</Style>
|
|
|
|
</ItemsControl.Styles>
|
|
|
|
|
|
|
|
<ItemsControl.DataTemplates>
|
|
|
|
<local:ViewLocator/>
|
|
|
|
</ItemsControl.DataTemplates>
|
|
|
|
|
|
|
|
<ItemsControl.ItemsPanel>
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
<StackPanel
|
|
|
|
x:Name="PART_ItemsPanel"
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
Spacing="{TemplateBinding Spacing}" />
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
|
|
|
|
</ItemsControl>
|
|
|
|
|
|
|
|
</Expander>
|
|
|
|
</ControlTemplate>
|
|
|
|
</Setter>
|
|
|
|
</Style>
|
|
|
|
</Styles>
|