Hi,
I'm displaying a label that should be right aligned in my RelativeLayout - but about 10% of the time it seems that the label doesn't align itself properly. Most of the time it works, but occasionally when viewing the page, it aligns itself past the edge of the screen, as if it didn't update after changing its binding content. Here is my code sample:
TimeLabel = new Label
{
TextColor = StyleDefault.ContentAltTextColor,
Font = StyleDefault.ContentAltFont,
Text = "Time"
};
var timeValConverter = new TimeStringValueConverter();
TimeLabel.SetBinding(Label.TextProperty, new Binding("time", BindingMode.OneWay, timeValConverter, null));
MyRelativeLayout.Children.Add(TimeLabel,
Constraint.RelativeToParent((parent) => { return parent.Width - 20 - TimeLabel.Width; }),
Constraint.Constant(20));
Any ideas what I could do to fix it?