Property Elements Example in Xaml for Simple Properties

In Xaml , you can use the property element for simple properties as well . For example , you can set the Height and width of the Button control in Xaml using the property element syntax instead of attributes.

Below is the sample code snippet demonstrating this.

Property Elements Example in Xaml for Simple Properties

<Button>
    <Button.Content>
        Click Abundantcode 
    </Button.Content>
    <Button.Width>
        200
    </Button.Width>
    <Button.Height>
        200
    </Button.Height>
</Button>