mirror of
https://github.com/4sval/FModel.git
synced 2026-09-25 02:29:21 -05:00
Additional exception info in a dropdown
This commit is contained in:
@@ -131,8 +131,25 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ExceptionTreeViewItemStyle"
|
||||
TargetType="TreeViewItem">
|
||||
<Setter Property="HorizontalContentAlignment"
|
||||
Value="Stretch" />
|
||||
<Setter Property="Focusable"
|
||||
Value="False" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="TreeViewItem">
|
||||
<ContentPresenter ContentSource="Header"
|
||||
HorizontalAlignment="Stretch"
|
||||
Margin="0,2,8,6" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<DataTemplate x:Key="LogEntryTemplate" DataType="{x:Type vm:LogEntryViewModel}">
|
||||
<Grid Margin="0 1" ToolTip="{Binding Exception}">
|
||||
<Grid Margin="0 1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
@@ -389,7 +406,8 @@
|
||||
VirtualizingPanel.IsVirtualizing="True"
|
||||
VirtualizingPanel.VirtualizationMode="Recycling"
|
||||
VirtualizingPanel.ScrollUnit="Item"
|
||||
ScrollViewer.CanContentScroll="True">
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="TreeViewItem" BasedOn="{StaticResource StretchTreeViewItemStyle}">
|
||||
<Style.Triggers>
|
||||
@@ -414,9 +432,44 @@
|
||||
HorizontalAlignment="Stretch" />
|
||||
|
||||
<HierarchicalDataTemplate.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:LogEntryViewModel}">
|
||||
<ContentPresenter Content="{Binding}" ContentTemplate="{StaticResource LogEntryTemplate}" />
|
||||
</DataTemplate>
|
||||
<HierarchicalDataTemplate DataType="{x:Type vm:LogEntryViewModel}"
|
||||
ItemsSource="{Binding ExceptionDetails}"
|
||||
ItemContainerStyle="{StaticResource ExceptionTreeViewItemStyle}">
|
||||
<ContentPresenter Content="{Binding}"
|
||||
ContentTemplate="{StaticResource LogEntryTemplate}"
|
||||
HorizontalAlignment="Stretch" />
|
||||
<HierarchicalDataTemplate.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:ExceptionDetailsViewModel}">
|
||||
<Border Padding="8"
|
||||
CornerRadius="3"
|
||||
BorderThickness="2,0,0,0"
|
||||
BorderBrush="#EF5350"
|
||||
Background="{DynamicResource {x:Static adonisUi:Brushes.Layer1BackgroundBrush}}">
|
||||
<RichTextBox IsReadOnly="True"
|
||||
IsDocumentEnabled="False"
|
||||
MaxHeight="220"
|
||||
FontFamily="Consolas"
|
||||
FontSize="10"
|
||||
BorderThickness="0"
|
||||
Padding="0"
|
||||
Background="Transparent"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
HorizontalScrollBarVisibility="Disabled">
|
||||
<FlowDocument PagePadding="0">
|
||||
<Paragraph Margin="0">
|
||||
<Run Text="{Binding Header, Mode=OneWay}"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="#EF5350" />
|
||||
<LineBreak />
|
||||
<Run Text="{Binding Details, Mode=OneWay}"
|
||||
Foreground="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" />
|
||||
</Paragraph>
|
||||
</FlowDocument>
|
||||
</RichTextBox>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</HierarchicalDataTemplate.ItemTemplate>
|
||||
</HierarchicalDataTemplate>
|
||||
</HierarchicalDataTemplate.ItemTemplate>
|
||||
</HierarchicalDataTemplate>
|
||||
</HierarchicalDataTemplate.ItemTemplate>
|
||||
|
||||
Reference in New Issue
Block a user