|
12 | 12 | xmlns:views="clr-namespace:GitHub.InlineReviews.Views" |
13 | 13 | mc:Ignorable="d" d:DesignWidth="300"> |
14 | 14 | <d:DesignProperties.DataContext> |
15 | | - <sample:CommentViewModelDesigner EditState="Editing"> |
| 15 | + <sample:CommentViewModelDesigner EditState="None"> |
16 | 16 | <sample:CommentViewModelDesigner.Body> |
17 | 17 | You can use a `CompositeDisposable` type here, it's designed to handle disposables in an optimal way (you can just call `Dispose()` on it and it will handle disposing everything it holds). |
18 | 18 | </sample:CommentViewModelDesigner.Body> |
|
51 | 51 | </StackPanel.Style> |
52 | 52 |
|
53 | 53 | <DockPanel> |
| 54 | + |
| 55 | + <StackPanel Orientation="Horizontal" DockPanel.Dock="Left" > |
54 | 56 | <controls:AccountAvatar Width="16" |
55 | | - Height="16" |
56 | | - Account="{Binding User}" |
57 | | - DockPanel.Dock="Left" /> |
| 57 | + Height="16" |
| 58 | + Account="{Binding User}"/> |
58 | 59 |
|
59 | | - <TextBlock Foreground="{DynamicResource GitHubVsToolWindowText}" FontWeight="Bold" Text="{Binding User.Login}" Margin="4 0" |
60 | | - DockPanel.Dock="Left" /> |
| 60 | + <TextBlock Foreground="{DynamicResource GitHubVsToolWindowText}" FontWeight="Bold" Text="{Binding User.Login}" Margin="4 0"/> |
61 | 61 | <ui:GitHubActionLink Content="{Binding UpdatedAt, Converter={ui:DurationToStringConverter}}" |
62 | | - Command="{Binding OpenOnGitHub}" |
63 | | - Foreground="{DynamicResource GitHubVsToolWindowText}" |
64 | | - Opacity="0.75" |
65 | | - DockPanel.Dock="Left" /> |
| 62 | + Command="{Binding OpenOnGitHub}" |
| 63 | + Foreground="{DynamicResource GitHubVsToolWindowText}" |
| 64 | + Opacity="0.75" /> |
66 | 65 | <Border Background="{DynamicResource VsBrush.InfoBackground}" |
67 | 66 | BorderBrush="{DynamicResource VsBrush.AccentPale}" |
68 | 67 | BorderThickness="1" |
69 | 68 | CornerRadius="3" |
70 | 69 | Padding="2 1" |
71 | | - DockPanel.Dock="Left" |
72 | 70 | Visibility="{Binding IsPending, Converter={ui:BooleanToVisibilityConverter}, FallbackValue=Collapsed}"> |
73 | | - <TextBlock FontSize="10">Pending</TextBlock> |
| 71 | + <TextBlock FontSize="10">Pending</TextBlock> |
74 | 72 | </Border> |
75 | | - <ui:GitHubActionLink Content="Delete" |
76 | | - Command="{Binding Delete}" |
77 | | - Foreground="{DynamicResource GitHubVsToolWindowText}" |
78 | | - Opacity="0.75" |
79 | | - HorizontalAlignment="Right" |
80 | | - DockPanel.Dock="Right"/> |
| 73 | + </StackPanel> |
| 74 | + |
| 75 | + <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" DockPanel.Dock="Right" |
| 76 | + Visibility="{Binding CanEditOrDelete, Converter={ui:BooleanToVisibilityConverter}}"> |
81 | 77 | <ui:GitHubActionLink Content="Edit" |
82 | 78 | Command="{Binding BeginEdit}" |
83 | 79 | Foreground="{DynamicResource GitHubVsToolWindowText}" |
84 | | - Opacity="0.75" |
85 | | - HorizontalAlignment="Right" |
86 | | - DockPanel.Dock="Right" /> |
87 | | - </DockPanel> |
| 80 | + Opacity="0.75" /> |
| 81 | + <ui:GitHubActionLink Content="Delete" |
| 82 | + Command="{Binding Delete}" |
| 83 | + Foreground="{DynamicResource GitHubVsToolWindowText}" |
| 84 | + Opacity="0.75"/> |
| 85 | + </StackPanel> |
88 | 86 |
|
| 87 | + </DockPanel> |
89 | 88 |
|
90 | 89 | <markdig:MarkdownViewer Grid.Column="1" Grid.Row="1" |
91 | | - Margin="0 2 0 0" |
92 | | - Foreground="{DynamicResource VsBrush.WindowText}" |
93 | | - Markdown="{Binding Body}"/> |
| 90 | + Margin="0 2 0 0" |
| 91 | + Foreground="{DynamicResource VsBrush.WindowText}" |
| 92 | + Markdown="{Binding Body}"/> |
94 | 93 | </StackPanel> |
95 | 94 |
|
96 | 95 | <!-- Displays edit view or a reply placeholder--> |
|
0 commit comments