Skip to content

Commit

Permalink
MOSYNC-2169: the label now changes its position on the screen if the …
Browse files Browse the repository at this point in the history
…'Top' or 'Left' properties of a widget are set
  • Loading branch information
spiridon-alexandru committed Jun 7, 2012
1 parent 84496bf commit 0b3de13
Showing 1 changed file with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using System;
using System.Text.RegularExpressions;
using System.Reflection;
using System.Windows.Media;

namespace MoSync
{
Expand Down Expand Up @@ -60,6 +61,38 @@ public Label()
mView = mLabel;
}

/**
* Implementation of the Left property of the Label widget.
*/
[MoSyncWidgetProperty(MoSync.Constants.MAW_WIDGET_LEFT)]
public new double Left
{
get { return mLabel.Margin.Left; }
set
{
mLabel.Margin = new Thickness(value,
mLabel.Margin.Top,
mLabel.Margin.Right,
mLabel.Margin.Bottom);
}
}

/**
* Implementation of the Top property of the Label widget.
*/
[MoSyncWidgetProperty(MoSync.Constants.MAW_WIDGET_TOP)]
public new double Top
{
get { return mLabel.Margin.Top; }
set
{
mLabel.Margin = new Thickness(mLabel.Margin.Left,
value,
mLabel.Margin.Right,
mLabel.Margin.Bottom);
}
}

/**
* Implementation of the Text property
* set: sets the text on the label
Expand Down

0 comments on commit 0b3de13

Please sign in to comment.