Ionite
8 months ago
4 changed files with 59 additions and 0 deletions
@ -0,0 +1,48 @@
|
||||
<Styles |
||||
xmlns="https://github.com/avaloniaui" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
xmlns:controls="using:StabilityMatrix.Avalonia.Controls" |
||||
xmlns:sg="clr-namespace:SpacedGridControl.Avalonia;assembly=SpacedGridControl.Avalonia" |
||||
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" |
||||
xmlns:vmInference="clr-namespace:StabilityMatrix.Avalonia.ViewModels.Inference" |
||||
xmlns:converters="clr-namespace:StabilityMatrix.Avalonia.Converters" |
||||
xmlns:mocks="clr-namespace:StabilityMatrix.Avalonia.DesignData" |
||||
x:DataType="vmInference:LayerDiffuseCardViewModel"> |
||||
<Design.PreviewWith> |
||||
<Panel Width="400" Height="200"> |
||||
<StackPanel Width="300" VerticalAlignment="Center"> |
||||
<controls:LayerDiffuseCard DataContext="{x:Static mocks:DesignData.LayerDiffuseCardViewModel}"/> |
||||
</StackPanel> |
||||
</Panel> |
||||
</Design.PreviewWith> |
||||
|
||||
<Style Selector="controls|LayerDiffuseCard"> |
||||
<Setter Property="HorizontalAlignment" Value="Stretch" /> |
||||
<Setter Property="Template"> |
||||
<ControlTemplate> |
||||
<controls:Card Padding="12"> |
||||
<sg:SpacedGrid |
||||
ColumnDefinitions="Auto,*" |
||||
ColumnSpacing="8" |
||||
RowDefinitions="*,*,*,*" |
||||
RowSpacing="0"> |
||||
<!-- Mode Selection --> |
||||
<TextBlock |
||||
Grid.Column="0" |
||||
VerticalAlignment="Center" |
||||
Text="Mode" |
||||
TextAlignment="Left" /> |
||||
|
||||
<ui:FAComboBox |
||||
Grid.Row="0" |
||||
Grid.Column="1" |
||||
HorizontalAlignment="Stretch" |
||||
DisplayMemberBinding="{Binding Converter={x:Static converters:EnumAttributeConverters.DisplayName}}" |
||||
ItemsSource="{Binding AvailableModes}" |
||||
SelectedItem="{Binding SelectedMode}" /> |
||||
</sg:SpacedGrid> |
||||
</controls:Card> |
||||
</ControlTemplate> |
||||
</Setter> |
||||
</Style> |
||||
</Styles> |
@ -0,0 +1,7 @@
|
||||
using Avalonia.Controls.Primitives; |
||||
using StabilityMatrix.Core.Attributes; |
||||
|
||||
namespace StabilityMatrix.Avalonia.Controls; |
||||
|
||||
[Transient] |
||||
public class LayerDiffuseCard : TemplatedControl; |
Loading…
Reference in new issue