Permalink
Browse files

editing fabric item

  • Loading branch information...
saraford committed Dec 23, 2017
1 parent 9cc3e53 commit 4d1ecd4b8760b7b1812b7320acdf273a7cb213a1
@@ -8,14 +8,15 @@ namespace ListViewInTabbedControl.ViewModels
{
public class ItemDetailsViewModel : BaseViewModel
{
//private Fabric fabric;
public Fabric Fabric { get; private set; }
private INavigation Navigation;
public ICommand DoneEditingCommand { get; private set; }
public ItemDetailsViewModel(INavigation Navigation, Fabric fabric)
{
Title = "Hello from Item " + fabric.Name;
this.Navigation = Navigation;
this.Fabric = fabric;
DoneEditingCommand = new Command(DoneEditing);
}
@@ -4,10 +4,20 @@
x:Class="ListViewInTabbedControl.Views.ItemDetailsPage"
Title="{Binding Title}">
<ContentPage.Content>
<StackLayout>
<Label Text="{Binding Title}"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand" />
<StackLayout>
<StackLayout Spacing="10" Margin="10,30,0,0">
<Label Text="Name" FontAttributes="Bold" />
<Entry Text="{Binding Fabric.Name, Mode=TwoWay}"
Keyboard="Text"
Placeholder="Name of fabric">
</Entry>
<Label Text="Seconds" FontAttributes="Bold" />
<Entry Keyboard="Numeric"
Text="{Binding Fabric.Seconds, Mode=TwoWay}"
Placeholder="Number of seconds (e.g. 60)">
</Entry>
</StackLayout>
<Button x:Name="DoneButton" Text="Done" FontSize="Large" Command="{Binding DoneEditingCommand}" HorizontalOptions="Center" VerticalOptions="End"/>
</StackLayout>
</ContentPage.Content>

0 comments on commit 4d1ecd4

Please sign in to comment.