Compare commits
2 commits
88dfa74ebe
...
2bf108905c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bf108905c | ||
|
|
ec6bc2f06f |
1 changed files with 117 additions and 109 deletions
|
|
@ -8,29 +8,19 @@
|
||||||
x:DataType="vm:MachineConfigViewModel"
|
x:DataType="vm:MachineConfigViewModel"
|
||||||
x:CompileBindings="True">
|
x:CompileBindings="True">
|
||||||
|
|
||||||
<DockPanel Margin="20">
|
<!-- header / body / footer -->
|
||||||
|
<Grid Margin="20" RowDefinitions="Auto,*,Auto">
|
||||||
|
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<TextBlock DockPanel.Dock="Top" Classes="h1"
|
<TextBlock Grid.Row="0" Classes="h1"
|
||||||
Text="{Binding Title}"
|
Text="{Binding Title}"
|
||||||
Margin="0,0,0,16" />
|
Margin="0,0,0,16" />
|
||||||
|
|
||||||
<!-- Action bar -->
|
<!-- Body: fixed form column + stretching data-items column -->
|
||||||
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" Spacing="12" Margin="0,16,0,0">
|
<Grid Grid.Row="1" ColumnDefinitions="Auto,*">
|
||||||
<Button Classes="accent" Content="Save" Command="{Binding SaveCommand}" IsDefault="True" />
|
|
||||||
<Button Content="Cancel" Command="{Binding CancelCommand}" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<!-- Inline validation hint -->
|
|
||||||
<TextBlock DockPanel.Dock="Bottom"
|
|
||||||
Text="{Binding ValidationError}"
|
|
||||||
IsVisible="{Binding HasValidationError}"
|
|
||||||
Foreground="{DynamicResource DangerBrush}"
|
|
||||||
TextWrapping="Wrap"
|
|
||||||
Margin="0,12,0,0" />
|
|
||||||
|
|
||||||
<!-- Form -->
|
<!-- Form -->
|
||||||
<Border DockPanel.Dock="Top" Classes="card" MaxWidth="480" HorizontalAlignment="Left">
|
<Border Grid.Column="0" Classes="card" Width="380" VerticalAlignment="Top">
|
||||||
<StackPanel Spacing="12">
|
<StackPanel Spacing="12">
|
||||||
|
|
||||||
<StackPanel Spacing="4">
|
<StackPanel Spacing="4">
|
||||||
|
|
@ -59,8 +49,8 @@
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Data items to monitor (fills remaining space) -->
|
<!-- Data items to monitor (fills remaining width + height) -->
|
||||||
<Border Classes="card" Margin="0,16,0,0" MaxWidth="640" HorizontalAlignment="Left">
|
<Border Grid.Column="1" Classes="card" Margin="16,0,0,0" HorizontalAlignment="Stretch">
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
|
|
||||||
<TextBlock DockPanel.Dock="Top" Classes="h2" Text="Data items to monitor"
|
<TextBlock DockPanel.Dock="Top" Classes="h2" Text="Data items to monitor"
|
||||||
|
|
@ -99,8 +89,8 @@
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Scrollable checklist -->
|
<!-- Scrollable checklist (fills remaining height) -->
|
||||||
<ScrollViewer MaxHeight="320">
|
<ScrollViewer>
|
||||||
<ItemsControl ItemsSource="{Binding AvailableItems}">
|
<ItemsControl ItemsSource="{Binding AvailableItems}">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate x:DataType="vm:SelectableDataItemViewModel">
|
<DataTemplate x:DataType="vm:SelectableDataItemViewModel">
|
||||||
|
|
@ -123,5 +113,23 @@
|
||||||
|
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</DockPanel>
|
</Grid>
|
||||||
|
|
||||||
|
<!-- Footer: validation hint + action bar, full width -->
|
||||||
|
<StackPanel Grid.Row="2" Spacing="0">
|
||||||
|
<!-- Inline validation hint -->
|
||||||
|
<TextBlock Text="{Binding ValidationError}"
|
||||||
|
IsVisible="{Binding HasValidationError}"
|
||||||
|
Foreground="{DynamicResource DangerBrush}"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
Margin="0,12,0,0" />
|
||||||
|
|
||||||
|
<!-- Action bar -->
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="12" Margin="0,16,0,0">
|
||||||
|
<Button Classes="accent" Content="Save" Command="{Binding SaveCommand}" IsDefault="True" />
|
||||||
|
<Button Content="Cancel" Command="{Binding CancelCommand}" />
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue