Hi,
mein Problem besteht darin ein WPF Fenster zu erstellen und direkt wenn das Fenster geladen ist ;
ein paar Elemente zu erstellen die aber von der Größe des Fensters abhängig sind ;
d.h. z.b.
public class Fenster : Window
{
void blup()
{
this.Content = new Grid
{
Height = this.Height / 2,
//this.Height ist immer n. def. auch bei zb (Events) onsourceinitaliced usw;
}
}
}
Diese Herangehensweise ist keine gute Idee. In WPF erstellt man das Layout in XAML, das ist viel intuitiver. Hier ein paar Links:
Introduction to WPF Layout
WPF Layout
XAML overview
[Artikel] MVVM und DataBinding
Weeks of programming can save you hours of planning