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 <UserControl
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
x:Class="Project.View.MenuView" x:Class="Project.View.LoginPage"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<Grid> <Grid Background="SandyBrown">
<Image Width="500" Height="500" Source="C:\Users\lowns\Desktop\2.Semester\CS\Projekt\keywi_logo_2.png"/> <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> </Grid>
</UserControl> </UserControl>

View File

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

View File

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

View File

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

View File

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