Skip to content

Commit

Permalink
Zeigt SubWindow als Fenster an
Browse files Browse the repository at this point in the history
  • Loading branch information
LMStudent committed Feb 12, 2020
1 parent 159df74 commit e599837
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions WPF-1/WPF1-Unterfenster/WPF1-Unterfenster/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
mc:Ignorable="d"
Title="Community Fragen - WPF-1" Height="287" Width="460" Background="#00A8C6">
<Grid>
<Button Content="Zusätzliches Fenster öffnen" HorizontalAlignment="Center" Margin="0,88,0,0" VerticalAlignment="Top" Background="#F9F2E7" Click="Button_Click"/>

</Grid>
</Window>
6 changes: 6 additions & 0 deletions WPF-1/WPF1-Unterfenster/WPF1-Unterfenster/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,11 @@ public MainWindow()
{
InitializeComponent();
}

private void Button_Click(object sender, RoutedEventArgs e)
{
SubWindow sub = new SubWindow();
sub.Show();
}
}
}
12 changes: 12 additions & 0 deletions WPF-1/WPF1-Unterfenster/WPF1-Unterfenster/SubWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Window x:Class="WPF1_Unterfenster.SubWindow"
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:local="clr-namespace:WPF1_Unterfenster"
mc:Ignorable="d"
Title="Unterfenster für WPF-1" Height="253" Width="533" Background="#F9F2E7">
<Grid>
<TextBlock Text="Hier könnten die Elemente für die Einstellungen angezeigt werden." Margin="88,88,0,0" Foreground="#00A8C6" FontWeight="Bold"/>
</Grid>
</Window>
25 changes: 25 additions & 0 deletions WPF-1/WPF1-Unterfenster/WPF1-Unterfenster/SubWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Text;
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.Shapes;

namespace WPF1_Unterfenster
{
/// <summary>
/// Interaktionslogik für SubWindow.xaml
/// </summary>
public partial class SubWindow : Window
{
public SubWindow()
{
InitializeComponent();
}
}
}

0 comments on commit e599837

Please sign in to comment.