|
37 | 37 |
|
38 | 38 | <Grid> |
39 | 39 | <!-- Displays an existing comment--> |
40 | | - <StackPanel Orientation="Vertical" Margin="4"> |
41 | | - <StackPanel.Style> |
42 | | - <Style TargetType="FrameworkElement"> |
43 | | - <Setter Property="Visibility" Value="Collapsed"/> |
44 | | - <Style.Triggers> |
45 | | - <DataTrigger Binding="{Binding EditState}" Value="None"> |
46 | | - <Setter Property="Visibility" Value="Visible"/> |
47 | | - </DataTrigger> |
48 | | - </Style.Triggers> |
49 | | - </Style> |
50 | | - </StackPanel.Style> |
51 | | - |
52 | | - <DockPanel> |
53 | | - <StackPanel Orientation="Horizontal" DockPanel.Dock="Left" > |
54 | | - <controls:AccountAvatar Width="16" |
55 | | - Height="16" |
56 | | - Account="{Binding Author}"/> |
57 | | - |
58 | | - <TextBlock Foreground="{DynamicResource GitHubVsToolWindowText}" FontWeight="Bold" Text="{Binding Author.Login}" Margin="4 0"/> |
59 | | - <ui:GitHubActionLink Content="{Binding CreatedAt, Converter={ui:DurationToStringConverter}}" |
60 | | - Command="{Binding OpenOnGitHub}" |
61 | | - Foreground="{DynamicResource GitHubVsToolWindowText}" |
62 | | - Opacity="0.75" /> |
63 | | - <Border Background="{DynamicResource VsBrush.InfoBackground}" |
64 | | - BorderBrush="{DynamicResource VsBrush.AccentPale}" |
65 | | - BorderThickness="1" |
66 | | - CornerRadius="3" |
67 | | - Padding="2 1" |
68 | | - Visibility="{Binding IsPending, Converter={ui:BooleanToVisibilityConverter}, FallbackValue=Collapsed}"> |
69 | | - <TextBlock FontSize="10" Text="{x:Static ghfvs:Resources.Pending}" /> |
70 | | - </Border> |
71 | | - </StackPanel> |
72 | | - |
73 | | - <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" DockPanel.Dock="Right" |
74 | | - Visibility="{Binding CanDelete, Converter={ui:BooleanToVisibilityConverter}}"> |
75 | | - <ui:OcticonButton Command="{Binding BeginEdit}" |
76 | | - Height="16" |
77 | | - Width="20" |
78 | | - Margin="0 0 4 0" |
79 | | - Background="Transparent" |
80 | | - Foreground="{DynamicResource GitHubVsToolWindowText}" |
81 | | - Icon="pencil"/> |
82 | | - <ui:OcticonButton Command="{Binding Delete}" |
83 | | - Width="16" |
84 | | - Height="16" |
85 | | - Margin="0" |
86 | | - Background="Transparent" |
87 | | - Foreground="{DynamicResource GitHubVsToolWindowText}" |
88 | | - Icon="x"/> |
89 | | - </StackPanel> |
90 | | - </DockPanel> |
91 | | - |
92 | | - <markdig:MarkdownViewer Grid.Column="1" Grid.Row="1" |
93 | | - Margin="0 2 0 0" |
94 | | - Foreground="{DynamicResource VsBrush.WindowText}" |
95 | | - Markdown="{Binding Body}"/> |
96 | | - |
97 | | - <DockPanel Grid.Column="1" Grid.Row="2" |
98 | | - Margin="0 4" |
99 | | - HorizontalAlignment="Left" |
100 | | - TextBlock.Foreground="Red"> |
101 | | - <DockPanel.Style> |
| 40 | + <Border BorderBrush="{DynamicResource VsBrush.ScrollBarThumbBackground}" BorderThickness="0 1 0 0" HorizontalAlignment="Stretch"> |
| 41 | + <Grid Background="{DynamicResource VsBrush.ToolWindowBackground}"> |
| 42 | + <Grid.ColumnDefinitions> |
| 43 | + <ColumnDefinition Width="4" /> |
| 44 | + <ColumnDefinition Width="*" /> |
| 45 | + </Grid.ColumnDefinitions> |
| 46 | + |
| 47 | + <Grid.RowDefinitions> |
| 48 | + <RowDefinition Height="Auto" /> |
| 49 | + </Grid.RowDefinitions> |
| 50 | + |
| 51 | + <Grid.Style> |
102 | 52 | <Style TargetType="FrameworkElement"> |
| 53 | + <Setter Property="Visibility" Value="Collapsed"/> |
103 | 54 | <Style.Triggers> |
104 | | - <DataTrigger Binding="{Binding ErrorMessage}" Value="{x:Null}"> |
105 | | - <Setter Property="Visibility" Value="Collapsed"/> |
| 55 | + <DataTrigger Binding="{Binding EditState}" Value="None"> |
| 56 | + <Setter Property="Visibility" Value="Visible"/> |
106 | 57 | </DataTrigger> |
107 | 58 | </Style.Triggers> |
108 | 59 | </Style> |
109 | | - </DockPanel.Style> |
110 | | - <ui:OcticonImage DockPanel.Dock="Left" Icon="alert" Margin="0 0 4 0"/> |
111 | | - <TextBlock Text="{Binding ErrorMessage}" TextWrapping="Wrap"/> |
112 | | - </DockPanel> |
113 | | - </StackPanel> |
| 60 | + </Grid.Style> |
| 61 | + |
| 62 | + <StackPanel Background="#82909e" Grid.Row="0" Grid.Column="0" Grid.RowSpan="5" Visibility="{Binding Model.AnnotationLevel, Converter={ghfvs:EqualsToVisibilityConverter Notice}}" /> |
| 63 | + |
| 64 | + <Border Grid.Column="1" Padding="8"> |
| 65 | + <StackPanel> |
| 66 | + <DockPanel> |
| 67 | + <StackPanel Orientation="Horizontal" DockPanel.Dock="Left" > |
| 68 | + <controls:AccountAvatar Width="16" |
| 69 | + Height="16" |
| 70 | + Account="{Binding Author}"/> |
| 71 | + |
| 72 | + <TextBlock Foreground="{DynamicResource GitHubVsToolWindowText}" FontWeight="SemiBold" Text="{Binding Author.Login}" Margin="4 0"/> |
| 73 | + <ui:GitHubActionLink Content="{Binding CreatedAt, Converter={ui:DurationToStringConverter}}" |
| 74 | + Command="{Binding OpenOnGitHub}" |
| 75 | + Foreground="{DynamicResource GitHubVsToolWindowText}" |
| 76 | + Opacity="0.75" /> |
| 77 | + <Border Background="{DynamicResource VsBrush.InfoBackground}" |
| 78 | + BorderBrush="{DynamicResource VsBrush.AccentPale}" |
| 79 | + BorderThickness="1" |
| 80 | + CornerRadius="3" |
| 81 | + Padding="2 1" |
| 82 | + Visibility="{Binding IsPending, Converter={ui:BooleanToVisibilityConverter}, FallbackValue=Collapsed}"> |
| 83 | + <TextBlock FontSize="10" Text="{x:Static ghfvs:Resources.Pending}" /> |
| 84 | + </Border> |
| 85 | + </StackPanel> |
| 86 | + |
| 87 | + <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" DockPanel.Dock="Right" |
| 88 | + Visibility="{Binding CanDelete, Converter={ui:BooleanToVisibilityConverter}}"> |
| 89 | + <ui:OcticonButton Command="{Binding BeginEdit}" |
| 90 | + Height="16" |
| 91 | + Width="20" |
| 92 | + Margin="0 0 4 0" |
| 93 | + Background="Transparent" |
| 94 | + Foreground="{DynamicResource GitHubVsToolWindowText}" |
| 95 | + Icon="pencil"/> |
| 96 | + <ui:OcticonButton Command="{Binding Delete}" |
| 97 | + Width="16" |
| 98 | + Height="16" |
| 99 | + Margin="0" |
| 100 | + Background="Transparent" |
| 101 | + Foreground="{DynamicResource GitHubVsToolWindowText}" |
| 102 | + Icon="x"/> |
| 103 | + </StackPanel> |
| 104 | + </DockPanel> |
| 105 | + |
| 106 | + <markdig:MarkdownViewer Grid.Column="1" Grid.Row="1" |
| 107 | + Margin="20 2 0 0" |
| 108 | + Foreground="{DynamicResource VsBrush.WindowText}" |
| 109 | + Markdown="{Binding Body}"/> |
| 110 | + |
| 111 | + <DockPanel Grid.Column="1" Grid.Row="2" |
| 112 | + Margin="0 4" |
| 113 | + HorizontalAlignment="Left" |
| 114 | + TextBlock.Foreground="Red"> |
| 115 | + <DockPanel.Style> |
| 116 | + <Style TargetType="FrameworkElement"> |
| 117 | + <Style.Triggers> |
| 118 | + <DataTrigger Binding="{Binding ErrorMessage}" Value="{x:Null}"> |
| 119 | + <Setter Property="Visibility" Value="Collapsed"/> |
| 120 | + </DataTrigger> |
| 121 | + </Style.Triggers> |
| 122 | + </Style> |
| 123 | + </DockPanel.Style> |
| 124 | + <ui:OcticonImage DockPanel.Dock="Left" Icon="alert" Margin="0 0 4 0"/> |
| 125 | + <TextBlock Text="{Binding ErrorMessage}" TextWrapping="Wrap"/> |
| 126 | + </DockPanel> |
| 127 | + </StackPanel> |
| 128 | + </Border> |
| 129 | + </Grid> |
| 130 | + </Border> |
114 | 131 |
|
115 | 132 | <!-- Displays edit view or a reply placeholder--> |
116 | 133 | <Grid> |
|
0 commit comments