namespace Fitness.Views
{
- public class SizeInUnitsMarkup : IMarkupExtension
+ public class SizeInUnitsExtension : IMarkupExtension
{
/// <summary>
+ /// Creates markups with given width and height (in units)
+ /// </summary>
+ public SizeInUnitsExtension(int width = 0, int height = 0)
+ {
+ Width = width;
+ Height = height;
+ }
+
+ /// <summary>
/// Width in units
/// </summary>
public int Width { get; set; }
<View.Layout>
<LinearLayout LinearOrientation="Vertical" CellPadding="50,50" LinearAlignment="Center"/>
</View.Layout>
- <TextLabel Text="Title" HorizontalAlignment="Center" VerticalAlignment="Center" Size="{views:SizeInUnitsMarkup Width=75, Height=12}" BackgroundColor="Cyan"/>
+ <TextLabel Text="Title" HorizontalAlignment="Center" VerticalAlignment="Center" Size="{views:SizeInUnits Width=75, Height=12}" BackgroundColor="Cyan"/>
</View>