diff --git a/XamarinStudy/XamarinStudy/XamarinStudy/App.xaml.cs b/XamarinStudy/XamarinStudy/XamarinStudy/App.xaml.cs index 76c1121..644e5f9 100644 --- a/XamarinStudy/XamarinStudy/XamarinStudy/App.xaml.cs +++ b/XamarinStudy/XamarinStudy/XamarinStudy/App.xaml.cs @@ -51,7 +51,9 @@ namespace XamarinStudy //MainPage = new SampleDisplayAlertActionSheetPage(); - MainPage = new SampleTableViewPage(); + //MainPage = new SampleTableViewPage(); + + MainPage = new NavigationPage(new SampleTableViewSimpleRegisterPage()); } protected override void OnStart() diff --git a/XamarinStudy/XamarinStudy/XamarinStudy/CustomViewCells/CustomViewCell1.xaml b/XamarinStudy/XamarinStudy/XamarinStudy/CustomViewCells/CustomViewCell1.xaml new file mode 100644 index 0000000..286758d --- /dev/null +++ b/XamarinStudy/XamarinStudy/XamarinStudy/CustomViewCells/CustomViewCell1.xaml @@ -0,0 +1,11 @@ + + + + + + + \ No newline at end of file diff --git a/XamarinStudy/XamarinStudy/XamarinStudy/CustomViewCells/CustomViewCell1.xaml.cs b/XamarinStudy/XamarinStudy/XamarinStudy/CustomViewCells/CustomViewCell1.xaml.cs new file mode 100644 index 0000000..a4032c4 --- /dev/null +++ b/XamarinStudy/XamarinStudy/XamarinStudy/CustomViewCells/CustomViewCell1.xaml.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Xamarin.Forms; +using Xamarin.Forms.Xaml; + +namespace XamarinStudy.CustomViewCells +{ + [XamlCompilation(XamlCompilationOptions.Compile)] + public partial class CustomViewCell1 : ViewCell + { + public string Title { + get + { + return titleLabel.Text; + } + set + { + titleLabel.Text = value; + } + } + + public string Detail { get => detailLabel.Text; set => detailLabel.Text = value; } + + public bool IsVisible { get => mainStack.IsVisible; set => mainStack.IsVisible = value; } + + public CustomViewCell1() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/XamarinStudy/XamarinStudy/XamarinStudy/CustomViewCells/JobSelector.xaml b/XamarinStudy/XamarinStudy/XamarinStudy/CustomViewCells/JobSelector.xaml new file mode 100644 index 0000000..8d8bd4f --- /dev/null +++ b/XamarinStudy/XamarinStudy/XamarinStudy/CustomViewCells/JobSelector.xaml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/XamarinStudy/XamarinStudy/XamarinStudy/CustomViewCells/JobSelector.xaml.cs b/XamarinStudy/XamarinStudy/XamarinStudy/CustomViewCells/JobSelector.xaml.cs new file mode 100644 index 0000000..bd6ed7a --- /dev/null +++ b/XamarinStudy/XamarinStudy/XamarinStudy/CustomViewCells/JobSelector.xaml.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Xamarin.Forms; +using Xamarin.Forms.Xaml; +using XamarinStudy.Views; + +namespace XamarinStudy.CustomViewCells +{ + [XamlCompilation(XamlCompilationOptions.Compile)] + public partial class JobSelector : ContentPage + { + private SampleTableViewSimpleRegisterPage injectedRP; + + public JobSelector(SampleTableViewSimpleRegisterPage sender) + { + InitializeComponent(); + injectedRP = sender; + } + + private void TextCell_Tapped(object sender, EventArgs e) + { + TextCell result = (TextCell)sender; + injectedRP.SetJob(result.Text); + Navigation.PopToRootAsync(); + } + } +} \ No newline at end of file diff --git a/XamarinStudy/XamarinStudy/XamarinStudy/Views/SampleTableViewSimpleRegisterPage.xaml b/XamarinStudy/XamarinStudy/XamarinStudy/Views/SampleTableViewSimpleRegisterPage.xaml new file mode 100644 index 0000000..6d8ddaf --- /dev/null +++ b/XamarinStudy/XamarinStudy/XamarinStudy/Views/SampleTableViewSimpleRegisterPage.xaml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +