feat: improve demo, add dynamic resource.
This commit is contained in:
@@ -22,12 +22,12 @@
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="u:FormGroup">
|
||||
<StackPanel>
|
||||
<ContentPresenter Content="{TemplateBinding Header}" FontWeight="Bold" />
|
||||
<ContentPresenter Content="{TemplateBinding Header}" FontWeight="Bold" FontSize="18" />
|
||||
<Rectangle
|
||||
Height="1"
|
||||
Margin="0,8"
|
||||
HorizontalAlignment="Stretch"
|
||||
Fill="LightGray" />
|
||||
Fill="{DynamicResource FormGroupBorderBrush}" />
|
||||
<ItemsPresenter ItemsPanel="{TemplateBinding ItemsPanel}" />
|
||||
</StackPanel>
|
||||
</ControlTemplate>
|
||||
|
||||
5
src/Ursa.Themes.Semi/Themes/Dark/Form.axaml
Normal file
5
src/Ursa.Themes.Semi/Themes/Dark/Form.axaml
Normal file
@@ -0,0 +1,5 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<SolidColorBrush x:Key="FormGroupBorderBrush" Color="White" Opacity="0.08"></SolidColorBrush>
|
||||
</ResourceDictionary>
|
||||
@@ -7,6 +7,7 @@
|
||||
<MergeResourceInclude Source="Dialog.axaml" />
|
||||
<MergeResourceInclude Source="Divider.axaml" />
|
||||
<MergeResourceInclude Source="DualBadge.axaml" />
|
||||
<MergeResourceInclude Source="Form.axaml" />
|
||||
<MergeResourceInclude Source="IPv4Box.axaml" />
|
||||
<MergeResourceInclude Source="KeyGestureInput.axaml" />
|
||||
<MergeResourceInclude Source="Loading.axaml" />
|
||||
|
||||
5
src/Ursa.Themes.Semi/Themes/Light/Form.axaml
Normal file
5
src/Ursa.Themes.Semi/Themes/Light/Form.axaml
Normal file
@@ -0,0 +1,5 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<SolidColorBrush x:Key="FormGroupBorderBrush" Color="#FF1C1F23" Opacity="0.08"></SolidColorBrush>
|
||||
</ResourceDictionary>
|
||||
@@ -7,6 +7,7 @@
|
||||
<MergeResourceInclude Source="Dialog.axaml" />
|
||||
<MergeResourceInclude Source="Divider.axaml" />
|
||||
<MergeResourceInclude Source="DualBadge.axaml" />
|
||||
<MergeResourceInclude Source="Form.axaml" />
|
||||
<MergeResourceInclude Source="IPv4Box.axaml" />
|
||||
<MergeResourceInclude Source="KeyGestureInput.axaml" />
|
||||
<MergeResourceInclude Source="Loading.axaml" />
|
||||
|
||||
@@ -70,6 +70,7 @@ public class Form: ItemsControl
|
||||
Content = control,
|
||||
[!FormItem.LabelProperty] = control[!FormItem.LabelProperty],
|
||||
[!FormItem.IsRequiredProperty] = control[!FormItem.IsRequiredProperty],
|
||||
[!FormItem.NoLabelProperty] = control[!FormItem.NoLabelProperty],
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user