worked on loginpage and menuview

This commit is contained in:
Taarly 2025-04-07 16:57:49 +02:00
parent 80324030ed
commit f526610b86
6 changed files with 39 additions and 17 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

@ -1,12 +1,20 @@
<UserControl
xmlns="https://github.com/avaloniaui"
x:Class="Project.View.MenuView"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid>
<Image Width="500" Height="500" Source="C:\Users\lowns\Desktop\2.Semester\CS\Projekt\keywi_logo_2.png"/>
x:Class="Project.View.LoginPage"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<Grid Background="SandyBrown">
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Image Source="avares://Project.View/Images/keywi_logo_2.png" Height="400" Width="400"/>
</StackPanel>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock>Your Login Name:</TextBlock>
<TextBox Watermark="Login-Name" TextWrapping="NoWrap"/>
<TextBlock>Password:</TextBlock>
<TextBox Watermark="Password" TextWrapping="NoWrap" PasswordChar="*"/>
<Button Name="ConfirmButton" BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Center" Margin="20"> LOGIN </Button>
</StackPanel>
</Grid>
</UserControl>

View File

@ -5,11 +5,16 @@ using Project.Controller;
namespace Project.View;
public partial class MenuView : UserControl
public partial class LoginPage : UserControl
{
public void LoginPage()
readonly AppController? _controller;
public LoginPage()
{
InitializeComponent();
}
public LoginPage(AppController controller)
{
InitializeComponent();
_controller = controller;
}
}

View File

@ -4,6 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Project.View.MainWindow"
xmlns:views="clr-namespace:Project.View"
Title="Project.View">
<Grid Name="MainGrid">

View File

@ -3,14 +3,21 @@
x:Class="Project.View.MenuView"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ScrollViewer Grid.Column="0" VerticalScrollBarVisibility="Auto">
<StackPanel>
<Button Click="Button_Click" Width="250" Height="100" Content="XAMPEPE0" />
<Button Width="250" Height="100" Content="XAMPEPE2" />
<Button Width="250" Height="100" Content="XAMPEPE3" />
<Button Width="250" Height="100" Content="XAMPEPE4" />
<Button Name="btn1" Width="200" Background="Pink" BorderBrush="Black" BorderThickness="1">BeispielButton</Button>
<Button Name="btn2" Width="200" Background="Pink" BorderBrush="Black" BorderThickness="1">BeispielButton2</Button>
</StackPanel>
</ScrollViewer>
<Border Grid.Column="1" Background="RosyBrown">
<TextBlock Text="Hauptinhalt" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24"/>
</Border>
</Grid>

View File

@ -23,5 +23,6 @@
<ItemGroup>
<ProjectReference Include="..\Project.Controller\Project.Controller.csproj" />
<ProjectReference Include="..\Project.Model\Project.Model.csproj" />
<AvaloniaResource Include="Images\**" />
</ItemGroup>
</Project>