diff --git a/XamarinStudy/XamarinStudy/XamarinStudy/Views/SampleElementPage1.xaml b/XamarinStudy/XamarinStudy/XamarinStudy/Views/SampleElementPage1.xaml
index 835e2e9..3712991 100644
--- a/XamarinStudy/XamarinStudy/XamarinStudy/Views/SampleElementPage1.xaml
+++ b/XamarinStudy/XamarinStudy/XamarinStudy/Views/SampleElementPage1.xaml
@@ -8,20 +8,23 @@
-
-
-
-
+
+
+
+
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/XamarinStudy/XamarinStudy/XamarinStudy/Views/SampleElementPage1.xaml.cs b/XamarinStudy/XamarinStudy/XamarinStudy/Views/SampleElementPage1.xaml.cs
index 58e75db..ea2eccc 100644
--- a/XamarinStudy/XamarinStudy/XamarinStudy/Views/SampleElementPage1.xaml.cs
+++ b/XamarinStudy/XamarinStudy/XamarinStudy/Views/SampleElementPage1.xaml.cs
@@ -29,9 +29,31 @@ namespace XamarinStudy.Views
private void stepper1_ValueChanged(object sender, ValueChangedEventArgs e)
{
lbl1.Text = e.NewValue.ToString("N2");
- pb1.ProgressTo(e.NewValue/100, 1000, Easing.SpringIn);
- pb2.ProgressTo(e.NewValue/100, 1000, Easing.SpringOut);
- pb3.ProgressTo(e.NewValue/100, 1500, Easing.BounceOut);
+ pb1.ProgressTo(e.NewValue / 100, 1000, Easing.SpringIn);
+ pb2.ProgressTo(e.NewValue / 100, 1000, Easing.SpringOut);
+ pb3.ProgressTo(e.NewValue / 100, 1500, Easing.BounceOut);
+ }
+
+ private void searchBar_TextChanged(object sender, TextChangedEventArgs e)
+ {
+ if (string.IsNullOrEmpty(e.NewTextValue) || string.IsNullOrEmpty(editor.Text))
+ return;
+
+ char a = e.NewTextValue[0];
+ int count = editor.Text.Count(x => x == a);
+ entryNum.Text = count.ToString();
+ }
+
+ private void switch_Toggled(object sender, ToggledEventArgs e)
+ {
+ entryText.Text = e.Value.ToString();
+ entryText.IsEnabled = e.Value;
+ }
+
+ private void checkBox_CheckedChanged(object sender, CheckedChangedEventArgs e)
+ {
+ entryText.Text = e.Value.ToString();
+ entryText.IsEnabled = e.Value;
}
}
}
\ No newline at end of file