-2
I am creating a solution where I must display a whole in one <Label />
. To do this I’m using the code below:
public partial class Home : ContentPage {
public Home() {
InitializeComponent();
BindingContext = this;
Mockup();
}
private int Foo { get; set; }
private void Mockup() {
Foo = 10;
}
}
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Test.Home">
<ContentPage.Content>
<Label Text="{Binding Foo, Mode=TwoWay } />
</ContentPage.Content>
</ContentPage>
I need my text to always be with an 8 digit mask. How should I apply the mask to the property StringFormat
for the displayed value to be 00000010
?