WIP dependency Injection
This commit is contained in:
42
DaSaSo.Wpf/Window/MainWindow.xaml
Normal file
42
DaSaSo.Wpf/Window/MainWindow.xaml
Normal file
@@ -0,0 +1,42 @@
|
||||
<Window x:Class="DaSaSo.Wpf.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ClientViews="clr-namespace:DaSaSo.Wpf.View.Client"
|
||||
xmlns:ProjektViews="clr-namespace:DaSaSo.Wpf.View.Project"
|
||||
xmlns:local="clr-namespace:DaSaSo.Wpf" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:MainWindowViewModel}"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="450" Width="800">
|
||||
<Window.Resources>
|
||||
<DataTemplate DataType="{x:Type viewmodel:ClientListViewModel}">
|
||||
<ClientViews:ClientListView />
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type viewmodel:ClientEditViewModel}">
|
||||
<ClientViews:ClientEditView />
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type viewmodel:ProjectListViewModel}">
|
||||
<ProjektViews:ProjectListView />
|
||||
</DataTemplate>
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="20" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Column="0" Grid.Row="0">
|
||||
<RadioButton Content="Kunden" Style="{StaticResource ToggleButtonList}" Command="{Binding ListClientsCommand}" />
|
||||
<RadioButton Content="Projekte" Style="{StaticResource ToggleButtonList}" Command="{Binding ListProjectCommand}" />
|
||||
<RadioButton Content="Baustellen" Style="{StaticResource ToggleButtonList}" Command="{Binding ListBuildingsiteCommand}" />
|
||||
<RadioButton Content="Objekte" Style="{StaticResource ToggleButtonList}" Command="{Binding ListSewerObjectsCommand}" />
|
||||
</StackPanel>
|
||||
<ContentControl Grid.Column="1" Grid.Row="0" Content="{Binding ActualViewModel}" />
|
||||
<StatusBar Grid.Row="1" Grid.ColumnSpan="2">
|
||||
<StatusBarItem Content="{Binding SelectedClient.Firstname}" />
|
||||
</StatusBar>
|
||||
</Grid>
|
||||
</Window>
|
||||
28
DaSaSo.Wpf/Window/MainWindow.xaml.cs
Normal file
28
DaSaSo.Wpf/Window/MainWindow.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace DaSaSo.Wpf
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user