|
117 | 117 | <!-- Contents --> |
118 | 118 | <Grid Grid.Row="2" Margin="8" ColumnDefinitions="256,*"> |
119 | 119 | <!-- Left --> |
120 | | - <ContentControl Grid.Column="0" Content="{Binding SelectedReport, Mode=OneWay}"> |
121 | | - <ContentControl.DataTemplates> |
122 | | - <DataTemplate DataType="m:StatisticsReport"> |
123 | | - <Grid RowDefinitions="*,16"> |
124 | | - <!-- Table of author --> |
125 | | - <ListBox Grid.Column="0" |
126 | | - ItemsSource="{Binding Authors}" |
127 | | - SelectionMode="Single" |
128 | | - BorderThickness="1" |
129 | | - BorderBrush="{DynamicResource Brush.Border2}" |
130 | | - Background="{DynamicResource Brush.Contents}" |
131 | | - SelectionChanged="OnAuthorSelectionChanged" |
132 | | - ScrollViewer.HorizontalScrollBarVisibility="Disabled" |
133 | | - ScrollViewer.VerticalScrollBarVisibility="Auto"> |
134 | | - <ListBox.Styles> |
135 | | - <Style Selector="ListBoxItem"> |
136 | | - <Setter Property="Margin" Value="0"/> |
137 | | - <Setter Property="Padding" Value="0"/> |
138 | | - <Setter Property="Height" Value="26"/> |
139 | | - </Style> |
140 | | - </ListBox.Styles> |
141 | | - |
142 | | - <ListBox.ItemsPanel> |
143 | | - <ItemsPanelTemplate> |
144 | | - <VirtualizingStackPanel Orientation="Vertical"/> |
145 | | - </ItemsPanelTemplate> |
146 | | - </ListBox.ItemsPanel> |
147 | | - |
148 | | - <ListBox.ItemTemplate> |
149 | | - <DataTemplate DataType="m:StatisticsAuthor"> |
150 | | - <Border BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border2}" |
151 | | - Background="Transparent" |
152 | | - ToolTip.Tip="{Binding User}"> |
153 | | - <Grid ColumnDefinitions="26,*,72"> |
154 | | - <v:Avatar Grid.Column="0" |
155 | | - Width="16" Height="16" |
156 | | - HorizontalAlignment="Center" VerticalAlignment="Center" |
157 | | - User="{Binding User}"/> |
158 | | - <Border Grid.Column="1" Padding="4,0,8,0" ClipToBounds="True"> |
159 | | - <TextBlock Text="{Binding User.Name}" HorizontalAlignment="Left"/> |
160 | | - </Border> |
161 | | - <Border Grid.Column="2" Padding="8,0" ClipToBounds="True"> |
162 | | - <TextBlock Text="{Binding Count}" HorizontalAlignment="Right"/> |
163 | | - </Border> |
164 | | - </Grid> |
165 | | - </Border> |
166 | | - </DataTemplate> |
167 | | - </ListBox.ItemTemplate> |
168 | | - </ListBox> |
169 | | - |
170 | | - <!-- Summary --> |
171 | | - <Grid Grid.Row="1" ColumnDefinitions="*,*"> |
172 | | - <!-- Total Authors --> |
173 | | - <StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Bottom"> |
174 | | - <TextBlock Text="{DynamicResource Text.Statistics.TotalAuthors}" FontSize="11" Foreground="{DynamicResource Brush.FG2}"/> |
175 | | - <TextBlock Text="{Binding Authors.Count}" FontSize="11" Margin="4,0,0,0"/> |
176 | | - </StackPanel> |
177 | | - |
178 | | - <!-- Total Commits --> |
179 | | - <StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom"> |
180 | | - <TextBlock Text="{DynamicResource Text.Statistics.TotalCommits}" FontSize="11" Foreground="{DynamicResource Brush.FG2}"/> |
181 | | - <TextBlock Text="{Binding Total}" FontSize="11" Margin="4,0,0,0"/> |
182 | | - </StackPanel> |
| 120 | + <Grid Grid.Column="0" RowDefinitions="36,*"> |
| 121 | + <v:BranchSelector Grid.Row="0" |
| 122 | + Height="28" |
| 123 | + VerticalAlignment="Center" HorizontalAlignment="Stretch" |
| 124 | + BorderBrush="{DynamicResource Brush.Border2}" |
| 125 | + Branches="{Binding Branches, Mode=OneWay}" |
| 126 | + SelectedBranch="{Binding SelectedBranch, Mode=TwoWay}" |
| 127 | + UsePureName="False"/> |
| 128 | + |
| 129 | + <ContentControl Grid.Row="1" Content="{Binding SelectedReport, Mode=OneWay}"> |
| 130 | + <ContentControl.DataTemplates> |
| 131 | + <DataTemplate DataType="m:StatisticsReport"> |
| 132 | + <Grid RowDefinitions="*,24"> |
| 133 | + <!-- Table of author --> |
| 134 | + <ListBox Grid.Column="0" |
| 135 | + ItemsSource="{Binding Authors}" |
| 136 | + SelectionMode="Single" |
| 137 | + BorderThickness="1" |
| 138 | + BorderBrush="{DynamicResource Brush.Border2}" |
| 139 | + Background="{DynamicResource Brush.Contents}" |
| 140 | + CornerRadius="3" |
| 141 | + SelectionChanged="OnAuthorSelectionChanged" |
| 142 | + ScrollViewer.HorizontalScrollBarVisibility="Disabled" |
| 143 | + ScrollViewer.VerticalScrollBarVisibility="Auto"> |
| 144 | + <ListBox.Styles> |
| 145 | + <Style Selector="ListBoxItem"> |
| 146 | + <Setter Property="Margin" Value="0"/> |
| 147 | + <Setter Property="Padding" Value="0"/> |
| 148 | + <Setter Property="Height" Value="26"/> |
| 149 | + </Style> |
| 150 | + </ListBox.Styles> |
| 151 | + |
| 152 | + <ListBox.ItemsPanel> |
| 153 | + <ItemsPanelTemplate> |
| 154 | + <VirtualizingStackPanel Orientation="Vertical"/> |
| 155 | + </ItemsPanelTemplate> |
| 156 | + </ListBox.ItemsPanel> |
| 157 | + |
| 158 | + <ListBox.ItemTemplate> |
| 159 | + <DataTemplate DataType="m:StatisticsAuthor"> |
| 160 | + <Border BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border2}" |
| 161 | + Background="Transparent" |
| 162 | + ToolTip.Tip="{Binding User}"> |
| 163 | + <Grid ColumnDefinitions="26,*,72"> |
| 164 | + <v:Avatar Grid.Column="0" |
| 165 | + Width="16" Height="16" |
| 166 | + HorizontalAlignment="Center" VerticalAlignment="Center" |
| 167 | + User="{Binding User}"/> |
| 168 | + <Border Grid.Column="1" Padding="4,0,8,0" ClipToBounds="True"> |
| 169 | + <TextBlock Text="{Binding User.Name}" HorizontalAlignment="Left"/> |
| 170 | + </Border> |
| 171 | + <Border Grid.Column="2" Padding="8,0" ClipToBounds="True"> |
| 172 | + <TextBlock Text="{Binding Count}" HorizontalAlignment="Right"/> |
| 173 | + </Border> |
| 174 | + </Grid> |
| 175 | + </Border> |
| 176 | + </DataTemplate> |
| 177 | + </ListBox.ItemTemplate> |
| 178 | + </ListBox> |
| 179 | + |
| 180 | + <!-- Summary --> |
| 181 | + <Grid Grid.Row="1" ColumnDefinitions="*,*" Margin="0,2,0,0"> |
| 182 | + <!-- Total Authors --> |
| 183 | + <StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Bottom"> |
| 184 | + <TextBlock Text="{DynamicResource Text.Statistics.TotalAuthors}" FontSize="11" Foreground="{DynamicResource Brush.FG2}"/> |
| 185 | + <TextBlock Text="{Binding Authors.Count}" FontSize="11" Margin="4,0,0,0"/> |
| 186 | + </StackPanel> |
| 187 | + |
| 188 | + <!-- Total Commits --> |
| 189 | + <StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom"> |
| 190 | + <TextBlock Text="{DynamicResource Text.Statistics.TotalCommits}" FontSize="11" Foreground="{DynamicResource Brush.FG2}"/> |
| 191 | + <TextBlock Text="{Binding Total}" FontSize="11" Margin="4,0,0,0"/> |
| 192 | + </StackPanel> |
| 193 | + </Grid> |
183 | 194 | </Grid> |
184 | | - </Grid> |
185 | | - </DataTemplate> |
186 | | - </ContentControl.DataTemplates> |
187 | | - </ContentControl> |
| 195 | + </DataTemplate> |
| 196 | + </ContentControl.DataTemplates> |
| 197 | + </ContentControl> |
| 198 | + </Grid> |
188 | 199 |
|
189 | 200 | <!-- Right --> |
190 | 201 | <v:Chart Grid.Column="1" |
|
0 commit comments