|
1 | 1 | <UserControl x:Class="GitHub.VisualStudio.UI.Views.GitHubHomeContent" |
2 | 2 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 | 3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 | | - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 4 | + xmlns:cache="clr-namespace:GitHub.VisualStudio.Helpers" |
5 | 5 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
6 | | - xmlns:local="clr-namespace:GitHub.VisualStudio.UI.Views" |
| 6 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
7 | 7 | xmlns:sampleData="clr-namespace:GitHub.SampleData;assembly=GitHub.App" |
8 | 8 | xmlns:ui="clr-namespace:GitHub.UI;assembly=GitHub.UI" |
9 | | - xmlns:cache="clr-namespace:GitHub.VisualStudio.Helpers" |
10 | | - mc:Ignorable="d" |
| 9 | + Width="Auto" |
| 10 | + Height="auto" |
| 11 | + Background="{DynamicResource GitHubVsToolWindowBackground}" |
| 12 | + DataContext="{Binding ViewModel}" |
11 | 13 | d:DesignHeight="48" |
12 | | - Height="48" |
13 | 14 | d:DesignWidth="300" |
14 | | - DataContext="{Binding ViewModel}" |
15 | | - Background="{DynamicResource GitHubVsToolWindowBackground}" |
16 | | -> |
17 | | - <d:DesignProperties.DataContext> |
18 | | - <Binding> |
19 | | - <Binding.Source> |
20 | | - <sampleData:GitHubHomeSectionDesigner /> |
21 | | - </Binding.Source> |
22 | | - </Binding> |
23 | | - </d:DesignProperties.DataContext> |
| 15 | + mc:Ignorable="d"> |
| 16 | + <d:DesignProperties.DataContext> |
| 17 | + <Binding> |
| 18 | + <Binding.Source> |
| 19 | + <sampleData:GitHubHomeSectionDesigner /> |
| 20 | + </Binding.Source> |
| 21 | + </Binding> |
| 22 | + </d:DesignProperties.DataContext> |
24 | 23 |
|
25 | | - <UserControl.Resources> |
26 | | - <ResourceDictionary> |
27 | | - <ResourceDictionary.MergedDictionaries> |
28 | | - <cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio;component/SharedDictionary.xaml" /> |
29 | | - <cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" /> |
30 | | - </ResourceDictionary.MergedDictionaries> |
31 | | - <Style TargetType="Label"> |
32 | | - <Setter Property="Padding" Value="0" /> |
33 | | - </Style> |
34 | | - </ResourceDictionary> |
35 | | - </UserControl.Resources> |
| 24 | + <UserControl.Resources> |
| 25 | + <ResourceDictionary> |
| 26 | + <ResourceDictionary.MergedDictionaries> |
| 27 | + <cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio;component/SharedDictionary.xaml" /> |
| 28 | + <cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" /> |
| 29 | + </ResourceDictionary.MergedDictionaries> |
| 30 | + </ResourceDictionary> |
| 31 | + </UserControl.Resources> |
36 | 32 |
|
37 | | - <StackPanel Margin="8,0"> |
38 | | - <Grid Margin="0,6,-4,6"> |
39 | | - <Grid.ColumnDefinitions> |
40 | | - <ColumnDefinition ColumnDefinition.Width="Auto" /> |
41 | | - <ColumnDefinition ColumnDefinition.Width="*" /> |
42 | | - </Grid.ColumnDefinitions> |
43 | 33 |
|
44 | | - <ui:OcticonImage |
45 | | - x:Name="repositoryIcon" |
46 | | - Height="32" |
47 | | - Width="32" |
48 | | - VerticalAlignment="Center" |
49 | | - Margin="0,0,8,0" |
50 | | - Icon="{Binding Path=Icon}" |
51 | | - Foreground="{DynamicResource GitHubVsToolWindowText}" /> |
| 34 | + <DockPanel Margin="4,6,4,6"> |
| 35 | + <ui:OcticonImage x:Name="repositoryIcon" |
| 36 | + Width="32" |
| 37 | + Height="32" |
| 38 | + Margin="0,0,8,0" |
| 39 | + VerticalAlignment="Center" |
| 40 | + DockPanel.Dock="Left" |
| 41 | + Foreground="{DynamicResource GitHubVsToolWindowText}" |
| 42 | + Icon="{Binding Path=Icon}" /> |
52 | 43 |
|
53 | | - <StackPanel Orientation="Vertical" Margin="0" Grid.Column="1"> |
54 | | - <Label Content="{Binding Path=RepoName}" Foreground="{DynamicResource GitHubVsToolWindowText}"/> |
55 | | - <Label Content="{Binding Path=RepoUrl}" Foreground="{DynamicResource GitHubVsGrayText}" /> |
56 | | - </StackPanel> |
57 | | - </Grid> |
58 | | - </StackPanel> |
| 44 | + <TextBlock DockPanel.Dock="Top" |
| 45 | + Foreground="{DynamicResource GitHubVsToolWindowText}" |
| 46 | + Padding="0" |
| 47 | + Text="{Binding Path=RepoName}" |
| 48 | + TextTrimming="CharacterEllipsis" |
| 49 | + Margin="0,-2,0,0" /> |
| 50 | + <TextBlock Foreground="{DynamicResource GitHubVsGrayText}" |
| 51 | + Padding="0" |
| 52 | + Text="{Binding Path=RepoUrl}" |
| 53 | + TextTrimming="CharacterEllipsis" /> |
| 54 | + </DockPanel> |
59 | 55 | </UserControl> |
0 commit comments