More UX modifications
This commit is contained in:
parent
8837d4dc3a
commit
8fd2b05b4d
@ -18,5 +18,11 @@
|
|||||||
<Application.Styles>
|
<Application.Styles>
|
||||||
<!-- Use Fluent theme for consistent UI controls -->
|
<!-- Use Fluent theme for consistent UI controls -->
|
||||||
<fluent:FluentTheme/>
|
<fluent:FluentTheme/>
|
||||||
|
|
||||||
|
<!-- Default TextBlock accessibility improvements -->
|
||||||
|
<Style Selector="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||||
|
<Setter Property="TextTrimming" Value="CharacterEllipsis"/>
|
||||||
|
</Style>
|
||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
</Application>
|
</Application>
|
||||||
|
|||||||
@ -50,7 +50,7 @@
|
|||||||
<Border CornerRadius="4"
|
<Border CornerRadius="4"
|
||||||
BorderBrush="{Binding Cardinality, Converter={StaticResource OptionalToBrush}}"
|
BorderBrush="{Binding Cardinality, Converter={StaticResource OptionalToBrush}}"
|
||||||
BorderThickness="{Binding Cardinality, Converter={StaticResource OptionalToThickness}}"
|
BorderThickness="{Binding Cardinality, Converter={StaticResource OptionalToThickness}}"
|
||||||
Padding="8" Margin="0,0,0,6" Background="#FAFAFA">
|
Padding="8" Margin="0,0,0,6" Background="{DynamicResource PanelBackgroundBrush}">
|
||||||
<StackPanel Orientation="Vertical" Spacing="2">
|
<StackPanel Orientation="Vertical" Spacing="2">
|
||||||
<!-- Name on its own line, prominent -->
|
<!-- Name on its own line, prominent -->
|
||||||
<TextBlock Text="{Binding Name}" FontWeight="SemiBold"/>
|
<TextBlock Text="{Binding Name}" FontWeight="SemiBold"/>
|
||||||
@ -95,7 +95,7 @@
|
|||||||
|
|
||||||
<!-- General info -->
|
<!-- General info -->
|
||||||
<Border BorderBrush="{DynamicResource PanelBorderBrush}" BorderThickness="1" CornerRadius="4" Padding="10">
|
<Border BorderBrush="{DynamicResource PanelBorderBrush}" BorderThickness="1" CornerRadius="4" Padding="10">
|
||||||
<Grid ColumnDefinitions="Auto,*,Auto,*" RowDefinitions="Auto,Auto,Auto,Auto,Auto">
|
<Grid ColumnDefinitions="Auto,*,Auto,*" RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto">
|
||||||
<TextBlock Text="Name:" FontWeight="Bold"/>
|
<TextBlock Text="Name:" FontWeight="Bold"/>
|
||||||
<TextBlock Grid.Column="1" Margin="8,0,0,0" Text="{Binding Name}"/>
|
<TextBlock Grid.Column="1" Margin="8,0,0,0" Text="{Binding Name}"/>
|
||||||
|
|
||||||
@ -113,29 +113,92 @@
|
|||||||
|
|
||||||
<TextBlock Grid.Column="2" Text="Model:" FontWeight="Bold"/>
|
<TextBlock Grid.Column="2" Text="Model:" FontWeight="Bold"/>
|
||||||
<TextBlock Grid.Column="3" Margin="8,0,0,0" Text="{Binding ContentModel}"/>
|
<TextBlock Grid.Column="3" Margin="8,0,0,0" Text="{Binding ContentModel}"/>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="5" Text="Nillable:" FontWeight="Bold"/>
|
||||||
|
<TextBlock Grid.Column="1" Grid.Row="5" Margin="8,0,0,0" Text="{Binding IsNillable}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Attributes list -->
|
<!-- Attributes -->
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Text="Attributes" FontWeight="SemiBold"/>
|
<TextBlock Text="Attributes" FontWeight="SemiBold"/>
|
||||||
<ItemsControl ItemsSource="{Binding Attributes}">
|
<ItemsControl ItemsSource="{Binding Attributes}">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate x:DataType="m:AttributeInfo">
|
<DataTemplate x:DataType="m:AttributeInfo">
|
||||||
<Border BorderBrush="{DynamicResource PanelBorderBrush}" BorderThickness="1" CornerRadius="4" Padding="8" Margin="0,6,0,0">
|
<Border BorderBrush="{DynamicResource PanelBorderBrush}" BorderThickness="1" CornerRadius="4" Padding="8" Margin="0,6,0,0">
|
||||||
<Grid ColumnDefinitions="Auto,*,Auto,*" RowDefinitions="Auto,Auto,Auto">
|
<StackPanel Spacing="8">
|
||||||
<TextBlock Text="Name:" FontWeight="Bold"/>
|
<Grid ColumnDefinitions="Auto,*,Auto,*" RowDefinitions="Auto,Auto,Auto">
|
||||||
<TextBlock Grid.Column="1" Margin="8,0,0,0" Text="{Binding Name}"/>
|
<TextBlock Text="Name:" FontWeight="Bold"/>
|
||||||
|
<TextBlock Grid.Column="1" Margin="8,0,0,0" Text="{Binding Name}"/>
|
||||||
|
|
||||||
<TextBlock Grid.Row="1" Text="Type:" FontWeight="Bold"/>
|
<TextBlock Grid.Row="1" Text="Use:" FontWeight="Bold"/>
|
||||||
<TextBlock Grid.Column="1" Grid.Row="1" Margin="8,0,0,0" Text="{Binding TypeName}"/>
|
<TextBlock Grid.Column="1" Grid.Row="1" Margin="8,0,0,0" Text="{Binding Use}"/>
|
||||||
|
|
||||||
<TextBlock Grid.Row="2" Text="Use:" FontWeight="Bold"/>
|
<TextBlock Grid.Row="2" Text="Type:" FontWeight="Bold"/>
|
||||||
<TextBlock Grid.Column="1" Grid.Row="2" Margin="8,0,0,0" Text="{Binding Use}"/>
|
<TextBlock Grid.Column="1" Grid.Row="2" Margin="8,0,0,0" Text="{Binding TypeName}"/>
|
||||||
|
|
||||||
<TextBlock Grid.Column="2" Text="Built-in:" FontWeight="Bold"/>
|
<TextBlock Grid.Column="2" Text="Built-in:" FontWeight="Bold"/>
|
||||||
<TextBlock Grid.Column="3" Margin="8,0,0,0" Text="{Binding BuiltInType}"/>
|
<TextBlock Grid.Column="3" Margin="8,0,0,0" Text="{Binding BuiltInType}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
<StackPanel IsVisible="{Binding Constraints, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||||
|
<TextBlock Text="Constraints" FontWeight="SemiBold"/>
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Text="Enumerations" FontWeight="SemiBold"/>
|
||||||
|
<ItemsControl ItemsSource="{Binding Constraints.Enumerations}">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate x:DataType="x:String">
|
||||||
|
<TextBlock Text="{Binding ., StringFormat=• {0}}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Text="Patterns" FontWeight="SemiBold"/>
|
||||||
|
<ItemsControl ItemsSource="{Binding Constraints.Patterns}">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate x:DataType="x:String">
|
||||||
|
<TextBlock Text="{Binding ., StringFormat=• {0}}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel IsVisible="{Binding Constraints.Numeric, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||||
|
<TextBlock Text="Numeric bounds" FontWeight="SemiBold"/>
|
||||||
|
<StackPanel Orientation="Horizontal" IsVisible="{Binding Constraints.Numeric.MinInclusive, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||||
|
<TextBlock Text="Min inclusive:" FontWeight="Bold"/>
|
||||||
|
<TextBlock Margin="8,0,0,0" Text="{Binding Constraints.Numeric.MinInclusive}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" IsVisible="{Binding Constraints.Numeric.MaxInclusive, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||||
|
<TextBlock Text="Max inclusive:" FontWeight="Bold"/>
|
||||||
|
<TextBlock Margin="8,0,0,0" Text="{Binding Constraints.Numeric.MaxInclusive}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" IsVisible="{Binding Constraints.Numeric.MinExclusive, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||||
|
<TextBlock Text="Min exclusive:" FontWeight="Bold"/>
|
||||||
|
<TextBlock Margin="8,0,0,0" Text="{Binding Constraints.Numeric.MinExclusive}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" IsVisible="{Binding Constraints.Numeric.MaxExclusive, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||||
|
<TextBlock Text="Max exclusive:" FontWeight="Bold"/>
|
||||||
|
<TextBlock Margin="8,0,0,0" Text="{Binding Constraints.Numeric.MaxExclusive}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel IsVisible="{Binding Constraints.Length, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||||
|
<TextBlock Text="Length bounds" FontWeight="SemiBold"/>
|
||||||
|
<StackPanel Orientation="Horizontal" IsVisible="{Binding Constraints.Length.LengthSpecified}">
|
||||||
|
<TextBlock Text="Length:" FontWeight="Bold"/>
|
||||||
|
<TextBlock Margin="8,0,0,0" Text="{Binding Constraints.Length.Length}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" IsVisible="{Binding Constraints.Length.MinLengthSpecified}">
|
||||||
|
<TextBlock Text="Min length:" FontWeight="Bold"/>
|
||||||
|
<TextBlock Margin="8,0,0,0" Text="{Binding Constraints.Length.MinLength}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" IsVisible="{Binding Constraints.Length.MaxLengthSpecified}">
|
||||||
|
<TextBlock Text="Max length:" FontWeight="Bold"/>
|
||||||
|
<TextBlock Margin="8,0,0,0" Text="{Binding Constraints.Length.MaxLength}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
@ -154,12 +217,62 @@
|
|||||||
|
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Text="Enumerations" FontWeight="SemiBold"/>
|
<TextBlock Text="Enumerations" FontWeight="SemiBold"/>
|
||||||
<ItemsControl ItemsSource="{Binding Enumerations}"/>
|
<ItemsControl ItemsSource="{Binding Enumerations}">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate x:DataType="x:String">
|
||||||
|
<TextBlock Text="{Binding ., StringFormat=• {0}}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Text="Patterns" FontWeight="SemiBold"/>
|
<TextBlock Text="Patterns" FontWeight="SemiBold"/>
|
||||||
<ItemsControl ItemsSource="{Binding Patterns}"/>
|
<ItemsControl ItemsSource="{Binding Patterns}">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate x:DataType="x:String">
|
||||||
|
<TextBlock Text="{Binding ., StringFormat=• {0}}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Numeric bounds -->
|
||||||
|
<StackPanel IsVisible="{Binding Numeric, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||||
|
<TextBlock Text="Numeric bounds" FontWeight="SemiBold"/>
|
||||||
|
<StackPanel Orientation="Horizontal" IsVisible="{Binding Numeric.MinInclusive, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||||
|
<TextBlock Text="Min inclusive:" FontWeight="Bold"/>
|
||||||
|
<TextBlock Margin="8,0,0,0" Text="{Binding Numeric.MinInclusive}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" IsVisible="{Binding Numeric.MaxInclusive, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||||
|
<TextBlock Text="Max inclusive:" FontWeight="Bold"/>
|
||||||
|
<TextBlock Margin="8,0,0,0" Text="{Binding Numeric.MaxInclusive}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" IsVisible="{Binding Numeric.MinExclusive, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||||
|
<TextBlock Text="Min exclusive:" FontWeight="Bold"/>
|
||||||
|
<TextBlock Margin="8,0,0,0" Text="{Binding Numeric.MinExclusive}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" IsVisible="{Binding Numeric.MaxExclusive, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||||
|
<TextBlock Text="Max exclusive:" FontWeight="Bold"/>
|
||||||
|
<TextBlock Margin="8,0,0,0" Text="{Binding Numeric.MaxExclusive}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Length bounds -->
|
||||||
|
<StackPanel IsVisible="{Binding Length, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||||
|
<TextBlock Text="Length bounds" FontWeight="SemiBold"/>
|
||||||
|
<StackPanel Orientation="Horizontal" IsVisible="{Binding Length.LengthSpecified}">
|
||||||
|
<TextBlock Text="Length:" FontWeight="Bold"/>
|
||||||
|
<TextBlock Margin="8,0,0,0" Text="{Binding Length.Length}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" IsVisible="{Binding Length.MinLengthSpecified}">
|
||||||
|
<TextBlock Text="Min length:" FontWeight="Bold"/>
|
||||||
|
<TextBlock Margin="8,0,0,0" Text="{Binding Length.MinLength}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" IsVisible="{Binding Length.MaxLengthSpecified}">
|
||||||
|
<TextBlock Text="Max length:" FontWeight="Bold"/>
|
||||||
|
<TextBlock Margin="8,0,0,0" Text="{Binding Length.MaxLength}"/>
|
||||||
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user