Initial
This commit is contained in:
38
LehrerApp.Desktop/Views/NavButton.axaml
Normal file
38
LehrerApp.Desktop/Views/NavButton.axaml
Normal file
@@ -0,0 +1,38 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels"
|
||||
x:Class="LehrerApp.Desktop.Views.NavButton">
|
||||
|
||||
<Button Command="{Binding Command, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
CommandParameter="{Binding CommandParameter, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Left"
|
||||
Padding="10,8"
|
||||
CornerRadius="6"
|
||||
Background="Transparent">
|
||||
|
||||
<Grid ColumnDefinitions="24,*">
|
||||
<TextBlock Grid.Column="0"
|
||||
Text="{Binding Icon, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
FontSize="14"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Opacity="0.7"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding Label, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
FontSize="13"
|
||||
VerticalAlignment="Center"
|
||||
Margin="8,0,0,0"/>
|
||||
</Grid>
|
||||
|
||||
<Button.Styles>
|
||||
<Style Selector="Button:pointerover /template/ ContentPresenter">
|
||||
<Setter Property="Background"
|
||||
Value="{DynamicResource SystemControlBackgroundListLowBrush}"/>
|
||||
</Style>
|
||||
</Button.Styles>
|
||||
|
||||
</Button>
|
||||
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user