Filled landlord page.
This commit is contained in:
@@ -6,9 +6,14 @@
|
|||||||
xmlns:local="clr-namespace:UCalc.Controls"
|
xmlns:local="clr-namespace:UCalc.Controls"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
|
||||||
|
<UserControl.Resources>
|
||||||
|
<local:ErrorCountToVisibilityConverter x:Key="ErrorCountToVisibilityConverter" />
|
||||||
|
</UserControl.Resources>
|
||||||
|
|
||||||
<Border CornerRadius="3"
|
<Border CornerRadius="3"
|
||||||
BorderBrush="Red"
|
BorderBrush="Red"
|
||||||
Background="Red">
|
Background="Red"
|
||||||
|
Visibility="{Binding Path=Model.ErrorCount, RelativeSource={RelativeSource AncestorType=local:ErrorCounter}, Converter={StaticResource ErrorCountToVisibilityConverter}}">
|
||||||
|
|
||||||
<Label
|
<Label
|
||||||
Content="{Binding Path=Model.ErrorCount, RelativeSource={RelativeSource AncestorType=local:ErrorCounter}}"
|
Content="{Binding Path=Model.ErrorCount, RelativeSource={RelativeSource AncestorType=local:ErrorCounter}}"
|
||||||
|
|||||||
@@ -1,8 +1,24 @@
|
|||||||
using System.Windows;
|
using System;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Data;
|
||||||
using UCalc.Models;
|
using UCalc.Models;
|
||||||
|
|
||||||
namespace UCalc.Controls
|
namespace UCalc.Controls
|
||||||
{
|
{
|
||||||
|
public class ErrorCountToVisibilityConverter : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||||
|
{
|
||||||
|
return ((int) value) != 0 ? Visibility.Visible : Visibility.Collapsed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter,
|
||||||
|
System.Globalization.CultureInfo culture)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public partial class ErrorCounter
|
public partial class ErrorCounter
|
||||||
{
|
{
|
||||||
public Model Model { get; set; }
|
public Model Model { get; set; }
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<UserControl x:Class="UCalc.Controls.SectionHeader"
|
||||||
|
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:UCalc"
|
||||||
|
xmlns:controls="clr-namespace:UCalc.Controls"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
|
||||||
|
<Grid Margin="10, 0, 5, 0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Separator Grid.Column="0"
|
||||||
|
BorderBrush="{x:Static local:Constants.SubMainColor}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Background="{x:Static local:Constants.SubMainColor}" />
|
||||||
|
|
||||||
|
<Label Grid.Column="1"
|
||||||
|
Content="{Binding Path=Header, RelativeSource={RelativeSource AncestorType=controls:SectionHeader}}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Foreground="{x:Static local:Constants.SubMainColor}" />
|
||||||
|
|
||||||
|
<Separator Grid.Column="2"
|
||||||
|
BorderBrush="{x:Static local:Constants.SubMainColor}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Background="{x:Static local:Constants.SubMainColor}" />
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
namespace UCalc.Controls
|
||||||
|
{
|
||||||
|
public partial class SectionHeader
|
||||||
|
{
|
||||||
|
public string Header { get; set; }
|
||||||
|
|
||||||
|
public SectionHeader()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,21 +3,200 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:UCalc.Pages"
|
xmlns:local="clr-namespace:UCalc"
|
||||||
|
xmlns:pages="clr-namespace:UCalc.Pages"
|
||||||
xmlns:controls="clr-namespace:UCalc.Controls"
|
xmlns:controls="clr-namespace:UCalc.Controls"
|
||||||
|
xmlns:data="clr-namespace:UCalc.Data"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
|
||||||
<ScrollViewer>
|
<ScrollViewer HorizontalScrollBarVisibility="Disabled"
|
||||||
|
VerticalScrollBarVisibility="Auto">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
|
<controls:SectionHeader Header="Allgemeine Informationen" />
|
||||||
|
|
||||||
<DockPanel>
|
<DockPanel Margin="12, 12, 12, 0">
|
||||||
<Label DockPanel.Dock="Left" Content="Name:" />
|
<Label DockPanel.Dock="Left"
|
||||||
|
Content="Anrede:"
|
||||||
|
Width="200"
|
||||||
|
Foreground="{x:Static local:Constants.SubMainColor}" />
|
||||||
|
|
||||||
<controls:ErrorIcon DockPanel.Dock="Right"
|
<ComboBox Margin="0, 0, 28, 0" /> <!-- TODO -->
|
||||||
Error="{Binding Path=Model.Name.Error, RelativeSource={RelativeSource AncestorType=local:LandlordPage}}" />
|
</DockPanel>
|
||||||
|
|
||||||
|
<DockPanel Margin="12, 12, 12, 0">
|
||||||
|
<Label DockPanel.Dock="Left"
|
||||||
|
Content="Name:"
|
||||||
|
Width="200"
|
||||||
|
Foreground="{x:Static local:Constants.SubMainColor}" />
|
||||||
|
|
||||||
|
<controls:ErrorIcon Margin="12, 0, 0, 0"
|
||||||
|
DockPanel.Dock="Right"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Error="{Binding Path=Model.Name.Error, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}}" />
|
||||||
|
|
||||||
<TextBox
|
<TextBox
|
||||||
Text="{Binding Path=Model.Name.Value, RelativeSource={RelativeSource AncestorType=local:LandlordPage}, UpdateSourceTrigger=PropertyChanged}" />
|
VerticalAlignment="Center"
|
||||||
|
MinHeight="22"
|
||||||
|
Text="{Binding Path=Model.Name.Value, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<DockPanel Margin="12, 8, 12, 0">
|
||||||
|
<Label DockPanel.Dock="Left"
|
||||||
|
Content="Telefonnummer:"
|
||||||
|
Width="200"
|
||||||
|
Foreground="{x:Static local:Constants.SubMainColor}" />
|
||||||
|
|
||||||
|
<controls:ErrorIcon Margin="12, 0, 0, 0"
|
||||||
|
DockPanel.Dock="Right"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Error="{Binding Path=Model.Phone.Error, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}}" />
|
||||||
|
|
||||||
|
<TextBox
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
MinHeight="22"
|
||||||
|
Text="{Binding Path=Model.Phone.Value, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<DockPanel Margin="12, 8, 12, 0">
|
||||||
|
<Label DockPanel.Dock="Left"
|
||||||
|
Content="Email Adresse:"
|
||||||
|
Width="200"
|
||||||
|
Foreground="{x:Static local:Constants.SubMainColor}" />
|
||||||
|
|
||||||
|
<controls:ErrorIcon Margin="12, 0, 0, 0"
|
||||||
|
DockPanel.Dock="Right"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Error="{Binding Path=Model.MailAddress.Error, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}}" />
|
||||||
|
|
||||||
|
<TextBox
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
MinHeight="22"
|
||||||
|
Text="{Binding Path=Model.MailAddress.Value, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<controls:SectionHeader Header="Adresse des Eigentümers"
|
||||||
|
Margin="0, 12, 0, 0"/>
|
||||||
|
|
||||||
|
<DockPanel Margin="12, 8, 12, 0">
|
||||||
|
<Label DockPanel.Dock="Left"
|
||||||
|
Content="Straße:"
|
||||||
|
Width="200"
|
||||||
|
Foreground="{x:Static local:Constants.SubMainColor}" />
|
||||||
|
|
||||||
|
<controls:ErrorIcon Margin="12, 0, 0, 0"
|
||||||
|
DockPanel.Dock="Right"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Error="{Binding Path=Model.Street.Error, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}}" />
|
||||||
|
|
||||||
|
<TextBox
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
MinHeight="22"
|
||||||
|
Text="{Binding Path=Model.Street.Value, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<DockPanel Margin="12, 8, 12, 0">
|
||||||
|
<Label DockPanel.Dock="Left"
|
||||||
|
Content="Hausnummer:"
|
||||||
|
Width="200"
|
||||||
|
Foreground="{x:Static local:Constants.SubMainColor}" />
|
||||||
|
|
||||||
|
<controls:ErrorIcon Margin="12, 0, 0, 0"
|
||||||
|
DockPanel.Dock="Right"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Error="{Binding Path=Model.HouseNumber.Error, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}}" />
|
||||||
|
|
||||||
|
<TextBox
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
MinHeight="22"
|
||||||
|
Text="{Binding Path=Model.HouseNumber.Value, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<DockPanel Margin="12, 8, 12, 0">
|
||||||
|
<Label DockPanel.Dock="Left"
|
||||||
|
Content="Stadt:"
|
||||||
|
Width="200"
|
||||||
|
Foreground="{x:Static local:Constants.SubMainColor}" />
|
||||||
|
|
||||||
|
<controls:ErrorIcon Margin="12, 0, 0, 0"
|
||||||
|
DockPanel.Dock="Right"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Error="{Binding Path=Model.City.Error, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}}" />
|
||||||
|
|
||||||
|
<TextBox
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
MinHeight="22"
|
||||||
|
Text="{Binding Path=Model.City.Value, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<DockPanel Margin="12, 8, 12, 0">
|
||||||
|
<Label DockPanel.Dock="Left"
|
||||||
|
Content="PLZ:"
|
||||||
|
Width="200"
|
||||||
|
Foreground="{x:Static local:Constants.SubMainColor}" />
|
||||||
|
|
||||||
|
<controls:ErrorIcon Margin="12, 0, 0, 0"
|
||||||
|
DockPanel.Dock="Right"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Error="{Binding Path=Model.Postcode.Error, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}}" />
|
||||||
|
|
||||||
|
<TextBox
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
MinHeight="22"
|
||||||
|
Text="{Binding Path=Model.Postcode.Value, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<controls:SectionHeader Header="Bankdaten des Eigentümers"
|
||||||
|
Margin="0, 12, 0, 0"/>
|
||||||
|
|
||||||
|
<DockPanel Margin="12, 8, 12, 0">
|
||||||
|
<Label DockPanel.Dock="Left"
|
||||||
|
Content="IBAN:"
|
||||||
|
Width="200"
|
||||||
|
Foreground="{x:Static local:Constants.SubMainColor}" />
|
||||||
|
|
||||||
|
<controls:ErrorIcon Margin="12, 0, 0, 0"
|
||||||
|
DockPanel.Dock="Right"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Error="{Binding Path=Model.Iban.Error, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}}" />
|
||||||
|
|
||||||
|
<TextBox
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
MinHeight="22"
|
||||||
|
Text="{Binding Path=Model.Iban.Value, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<DockPanel Margin="12, 8, 12, 0">
|
||||||
|
<Label DockPanel.Dock="Left"
|
||||||
|
Content="BIC:"
|
||||||
|
Width="200"
|
||||||
|
Foreground="{x:Static local:Constants.SubMainColor}" />
|
||||||
|
|
||||||
|
<controls:ErrorIcon Margin="12, 0, 0, 0"
|
||||||
|
DockPanel.Dock="Right"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Error="{Binding Path=Model.Bic.Error, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}}" />
|
||||||
|
|
||||||
|
<TextBox
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
MinHeight="22"
|
||||||
|
Text="{Binding Path=Model.Bic.Value, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<DockPanel Margin="12, 8, 12, 12">
|
||||||
|
<Label DockPanel.Dock="Left"
|
||||||
|
Content="Name der Bank:"
|
||||||
|
Width="200"
|
||||||
|
Foreground="{x:Static local:Constants.SubMainColor}" />
|
||||||
|
|
||||||
|
<controls:ErrorIcon Margin="12, 0, 0, 0"
|
||||||
|
DockPanel.Dock="Right"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Error="{Binding Path=Model.BankName.Error, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}}" />
|
||||||
|
|
||||||
|
<TextBox
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
MinHeight="22"
|
||||||
|
Text="{Binding Path=Model.BankName.Value, RelativeSource={RelativeSource AncestorType=pages:LandlordPage}, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -122,7 +122,7 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Model="{Binding Path=Model.LandlordModel, RelativeSource={RelativeSource AncestorType=pages:SideBar}}"/>
|
Model="{Binding Path=Model.LandlordModel, RelativeSource={RelativeSource AncestorType=pages:SideBar}}"/>
|
||||||
|
|
||||||
<Label Content="Vermieter"
|
<Label Content="Eigentümer"
|
||||||
Margin="0, 12, 12, 12"
|
Margin="0, 12, 12, 12"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontSize="14" />
|
FontSize="14" />
|
||||||
|
|||||||
@@ -34,6 +34,9 @@
|
|||||||
<Page Update="Controls\ErrorIcon.xaml">
|
<Page Update="Controls\ErrorIcon.xaml">
|
||||||
<Generator></Generator>
|
<Generator></Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Update="Controls\SectionHeader.xaml">
|
||||||
|
<Generator></Generator>
|
||||||
|
</Page>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -64,6 +67,9 @@
|
|||||||
<Compile Update="Controls\ErrorIcon.xaml.cs">
|
<Compile Update="Controls\ErrorIcon.xaml.cs">
|
||||||
<DependentUpon>ErrorIcon.xaml</DependentUpon>
|
<DependentUpon>ErrorIcon.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Update="Controls\SectionHeader.xaml.cs">
|
||||||
|
<DependentUpon>SectionHeader.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
Reference in New Issue
Block a user