| 1 | <UserControl xmlns="https://github.com/avaloniaui" |
| 2 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 3 | xmlns:vm="using:CascadeIDE.ViewModels" |
| 4 | xmlns:views="using:CascadeIDE.Views" |
| 5 | x:Class="CascadeIDE.Views.ProblemsMfdPageView" |
| 6 | x:DataType="vm:MainWindowViewModel"> |
| 7 | <DockPanel DataContext="{Binding ProblemsPanel}"> |
| 8 | <views:PanelChromeHeader DockPanel.Dock="Top" Title="{Binding SummaryText}" UppercaseTitle="False"/> |
| 9 | <ScrollViewer VerticalScrollBarVisibility="Auto" |
| 10 | HorizontalScrollBarVisibility="Auto" |
| 11 | MinHeight="96" |
| 12 | VerticalAlignment="Stretch"> |
| 13 | <ListBox x:Name="ProblemsListBox" |
| 14 | ItemsSource="{Binding Items}" |
| 15 | Background="Transparent" |
| 16 | DoubleTapped="ProblemsList_OnDoubleTapped" |
| 17 | ContextRequested="ProblemsList_OnContextRequested" |
| 18 | ScrollViewer.HorizontalScrollBarVisibility="Disabled"> |
| 19 | <ListBox.Styles> |
| 20 | <Style Selector="ListBoxItem"> |
| 21 | <Setter Property="Padding" Value="0,0,4,4"/> |
| 22 | <Setter Property="Background" Value="Transparent"/> |
| 23 | </Style> |
| 24 | </ListBox.Styles> |
| 25 | <ListBox.ItemTemplate> |
| 26 | <DataTemplate DataType="vm:ProblemListItem"> |
| 27 | <Border CornerRadius="5" |
| 28 | Padding="10,7,10,8" |
| 29 | BorderThickness="1" |
| 30 | BorderBrush="#22FFFFFF" |
| 31 | Background="#12000000"> |
| 32 | <Grid ColumnDefinitions="4,*" ColumnSpacing="10"> |
| 33 | <Panel Grid.Column="0" Width="4"> |
| 34 | <Border Background="{DynamicResource EditorHud.SeverityError}" |
| 35 | CornerRadius="2" |
| 36 | IsVisible="{Binding IsError}"/> |
| 37 | <Border Background="{DynamicResource EditorHud.SeverityWarning}" |
| 38 | CornerRadius="2" |
| 39 | IsVisible="{Binding IsWarning}"/> |
| 40 | </Panel> |
| 41 | <StackPanel Grid.Column="1" Orientation="Vertical" Spacing="4"> |
| 42 | <TextBlock Text="{Binding HeaderLine}" |
| 43 | FontFamily="Consolas,monospace" |
| 44 | FontSize="11.5" |
| 45 | FontWeight="SemiBold" |
| 46 | TextWrapping="Wrap" |
| 47 | Foreground="{DynamicResource CascadeTheme.TerminalForeground}"/> |
| 48 | <TextBlock Text="{Binding Message}" |
| 49 | TextWrapping="Wrap" |
| 50 | FontSize="11" |
| 51 | LineHeight="15" |
| 52 | Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}"/> |
| 53 | </StackPanel> |
| 54 | </Grid> |
| 55 | </Border> |
| 56 | </DataTemplate> |
| 57 | </ListBox.ItemTemplate> |
| 58 | </ListBox> |
| 59 | </ScrollViewer> |
| 60 | </DockPanel> |
| 61 | </UserControl> |
| 62 | |