Files
DaSaSo/DaSaSo.Wpf/Controls/MainWindowNavigationBar.xaml
2021-09-28 10:46:16 +02:00

35 lines
3.3 KiB
XML

<UserControl x:Class="DaSaSo.Wpf.Controls.MainWindowNavigationBar"
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"
xmlns:local="clr-namespace:DaSaSo.Wpf.Controls"
xmlns:nav="clr-namespace:DaSaSo.Domain.Enums;assembly=DaSaSo.Domain"
xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel"
xmlns:converters="clr-namespace:DaSaSo.Wpf.Converters"
d:DataContext="{d:DesignInstance Type=viewmodel:MainWindowViewModel}"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="200">
<UserControl.Resources>
<converters:EqualValueToParameterConverter x:Key="EqualValueToParameterConverter" />
<converters:EqualValueToBooleanConverter x:Key="EqualValueToBooleanConverter" />
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<RadioButton Grid.Row="0" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:ClientListViewModel}}" Content="Kunden" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" IsEnabled="True" CommandParameter="{x:Static nav:EMainWindowViewType.Clients}"/>
<RadioButton Grid.Row="1" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:ProjectListViewModel}}" Content="Projekte" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" IsEnabled="{Binding CanSelectProject}" CommandParameter="{x:Static nav:EMainWindowViewType.Projects}" />
<RadioButton Grid.Row="2" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:BuildingsiteListViewModel}}" Content="Baustellen" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" IsEnabled="{Binding CanSelectBuildingSite}" CommandParameter="{x:Static nav:EMainWindowViewType.Buildingsites}" />
<RadioButton Grid.Row="3" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:SewerObjectListViewModel}}" Content="Objekten" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" IsEnabled="{Binding CanSelectSewerObjects}" CommandParameter="{x:Static nav:EMainWindowViewType.SewerObjects}" />
<Border Grid.RowSpan="4" Background="LightBlue" Visibility="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToBooleanConverter}, ConverterParameter={x:Type viewmodel:SewerMainListViewModel}}" d:Visibility="Hidden">
<TextBlock Foreground="WhiteSmoke" FontSize="18" Text="Editing Sewer" />
</Border>
</Grid>
</UserControl>