-
Notifications
You must be signed in to change notification settings - Fork 692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementing the top panel according to the new UI design. #27
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<UserControl x:Class="NuGet.PackageManagement.UI.FilterLabel" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
x:Name="_self" | ||
xmlns:local="clr-namespace:NuGet.PackageManagement.UI" | ||
mc:Ignorable="d" | ||
d:DesignHeight="100" d:DesignWidth="300"> | ||
<UserControl.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<ResourceDictionary | ||
Source="Resources.xaml" /> | ||
</ResourceDictionary.MergedDictionaries> | ||
</ResourceDictionary> | ||
</UserControl.Resources> | ||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="auto" /> | ||
<RowDefinition Height="auto" /> | ||
</Grid.RowDefinitions> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition /> | ||
<ColumnDefinition /> | ||
</Grid.ColumnDefinitions> | ||
<Button | ||
Grid.Row="0" | ||
Grid.Column="0" | ||
Click="ButtonClicked"> | ||
<Button.Template> | ||
<ControlTemplate TargetType="{x:Type Button}"> | ||
<ContentPresenter /> | ||
</ControlTemplate> | ||
</Button.Template> | ||
<TextBlock | ||
x:Name="_labelText" | ||
Padding="0" | ||
Margin="0" | ||
MouseEnter="_labelText_MouseEnter" | ||
MouseLeave="_labelText_MouseLeave" | ||
FontSize="{Binding ElementName=_self,Path=FontSize,Converter={StaticResource Font122PercentSizeConverter}}" | ||
Foreground="{DynamicResource {x:Static local:Brushes.UIText}}" /> | ||
</Button> | ||
|
||
<!-- the texblock that displays the count --> | ||
<Border | ||
x:Name="_textBlockCountContainer" | ||
Grid.Row="0" | ||
Grid.Column="1" | ||
CornerRadius="2" | ||
Margin="2,0" | ||
Padding="1,0" | ||
Visibility="Collapsed" | ||
HorizontalAlignment="Center" | ||
VerticalAlignment="Top" | ||
Background="{DynamicResource {x:Static local:Brushes.ContentSelectedBrushKey}}"> | ||
<TextBlock | ||
x:Name="_textBlockCount" | ||
Foreground="White" | ||
HorizontalAlignment="Right" | ||
VerticalAlignment="Top"> | ||
</TextBlock> | ||
</Border> | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comments for the Rectangle There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. comment added. |
||
<Rectangle | ||
x:Name="_underline" | ||
Grid.Row="1" | ||
Grid.Column="0" | ||
Margin="0" | ||
Height="3" | ||
Fill="{DynamicResource {x:Static local:Brushes.ContentSelectedBrushKey}}" | ||
Visibility="Hidden" /> | ||
</Grid> | ||
</UserControl> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add comments saying that this button is what shows up as the 'Browse', 'Installed' and 'Updates' filter?
Plus, why you have a button.template with an empty ContentPresenter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment is in FilterLable.xaml.cs. The template is needed to remove the border of the button.