summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Xaml.UnitTests/ConstraintExpression.xaml
blob: 0e71a7a020547ea6835c0ff407faab32206948a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
			 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
			 xmlns:local="clr-namespace:Xamarin.Forms.Xaml.UnitTests"
			 x:Class="Xamarin.Forms.Xaml.UnitTests.ConstraintExpression" >
	<RelativeLayout x:Name="relativeLayout">
		<Label x:Name="constantConstraint"
			   RelativeLayout.WidthConstraint="{ConstraintExpression Type=Constant, Constant=42}" />
		<Label x:Name="constraintRelativeToParent"
			   RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Constant=2, Factor=.5, Property=Width}" />
		<Label x:Name="foo" />
		<Label x:Name="constraintRelativeToView"
			   RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, Constant=2, Factor=.5, Property=Width, ElementName=foo}" />
	</RelativeLayout>
</ContentPage>