Wenn man ein TabControl in einem StackPanel plaziert, erbt das TabControl so auch die Höhe von dem Element StackPanel. Das kann negative Auswirkung haben: Um das Problem zu beheben muss man das StackPanel dazu bewegen sich in Höhe anzupassen, ein einfaches Height auf ein StackPanel bringt leider nichts. Man muss das innere Element, also das [...]
Read the rest of this entry »Archive for the 'XAML' Category
Dynamisches Applikations Icon – XAML Quicky
Es ist möglich in einer WPF Applikation das Icon dynamisch festzulegen. Das hat den Hintergrund, dass z.B. wenn die Applikation gerade eine Aufgabe erledigt, so der Anwender über das Icon auf den Status aufmerksam gemacht wird (blur, SandUhr o.ä.). Das selbe gilt natürlich für …
Read the rest of this entry »TextBox und PasswordBox mit gemeinsamen Style
Folgendes HowTo zeigt, wie man für die PasswordBox und der TextBox einen gemeinsamen Style im XAML definiert. Zuerst definiert man die grundlegenden Einstellungen 1 2 3 4 5 6 7 8 <System:Double x:Key="MinHeight">30</System:Double> <System:Double x:Key="FontSize">14</System:Double> <FontFamily x:Key="FontFamily">Verdana</FontFamily> <ControlTemplate x:Key="ControlTemplate"> <Border Name="Border" CornerRadius="4" Padding="2" Background="White" BorderBrush="Black" BorderThickness="1" > <ScrollViewer Margin="0" x:Name="PART_ContentHost"/> </Border> </ControlTemplate> dann kann man [...]
Read the rest of this entry »






