Ugrás a tartalomhoz

.NET Programming Technologies

Gergely Kovásznai, Csaba Biró

Eszterházy Károly College

Advanced properties

Advanced properties

If we would like to assign a complex valued property (e.g background with gradient fill), the use of the abbreviated forms is not enough like in the former example. The complex features can be given with children-items called feature-elements.

Feature elements –syntax is as follows:


Complementing the previous example code:

     <Button x:Name="Gomb"



             Width="150" Height="30"

             HorizontalAlignment="Center" VerticalAlignment="Top"

             FontFamily="Times New Roman" FontSize="20"

             FontStyle="Italic" FontWeight="Heavy" Opacity="0.5">


                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">

                    <GradientStop Color="Black" Offset="0" />

                    <GradientStop Color="White" Offset="1" />