Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 18c9269

Browse files
Adding functionality to display an error when attempting to delete a comment
1 parent fbaa00e commit 18c9269

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/GitHub.InlineReviews/Views/CommentView.xaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,23 @@
9494
Margin="0 2 0 0"
9595
Foreground="{DynamicResource VsBrush.WindowText}"
9696
Markdown="{Binding Body}"/>
97+
98+
<DockPanel Grid.Column="1" Grid.Row="2"
99+
Margin="0 4"
100+
HorizontalAlignment="Left"
101+
TextBlock.Foreground="Red">
102+
<DockPanel.Style>
103+
<Style TargetType="FrameworkElement">
104+
<Style.Triggers>
105+
<DataTrigger Binding="{Binding ErrorMessage}" Value="{x:Null}">
106+
<Setter Property="Visibility" Value="Collapsed"/>
107+
</DataTrigger>
108+
</Style.Triggers>
109+
</Style>
110+
</DockPanel.Style>
111+
<ui:OcticonImage DockPanel.Dock="Left" Icon="alert" Margin="0 0 4 0"/>
112+
<TextBlock Text="{Binding ErrorMessage}" TextWrapping="Wrap"/>
113+
</DockPanel>
97114
</StackPanel>
98115

99116
<!-- Displays edit view or a reply placeholder-->

0 commit comments

Comments
 (0)