Files
PlantBox/PlantBox.Client/PlantBox.Client/Forms/HomePage.xaml.cs
Eveldee 5dc9007ad2 Add title to PlantPage
Set Plant Name as Title
2019-03-27 19:18:46 +01:00

41 lines
921 B
C#

using PlantBox.Client.Forms.Plant;
using PlantBox.Client.Models;
using PlantBox.Shared.Communication.Commands;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace PlantBox.Client.Forms
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class HomePage : ContentPage
{
public HomePage()
{
InitializeComponent();
}
private async void ListView_ItemTapped(object sender, ItemTappedEventArgs e)
{
var plant = (PlantInfo)e.Item;
await Navigation.PushAsync(new PlantPage(plant)
{
Title = plant.Name
});
}
protected override bool OnBackButtonPressed()
{
App.MasterPage.IsPresented = true;
return true;
}
}
}