달력

52024  이전 다음

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
반응형

http://xamaringuyhome.blogspot.kr/2017/10/


이분의 소스를 따라 쳐봤음





MainPage.xaml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:App1Login"
             x:Class="App1Login.MainPage">
 
    <Grid>
        <ScrollView>
            <StackLayout>
                <StackLayout Padding="30" Spacing="2" VerticalOptions="CenterAndExpand" HorizontalOptions="FillAndExpand">
                    <Label Text="Name or Phone Number" 
                           TextColor="#555" 
                           FontSize="20" 
                           FontAttributes="Bold"/>
                    <Entry Keyboard="Numeric" 
                           Placeholder="Enter Authinticated Phone Number Or Name" 
                           PlaceholderColor="#CCC" 
                           FontSize="20" 
                           TextColor="#555" />
                    <Label Text="Password" 
                           TextColor="#555" 
                           FontSize="20" 
                           FontAttributes="Bold"/>
                    <Entry  Placeholder="Enter correct password" 
                            Keyboard="Default" 
                            IsPassword="True" 
                            FontSize="20" 
                            PlaceholderColor="#CCC" 
                            TextColor="#555" />
                </StackLayout>
                <StackLayout Padding="30" VerticalOptions="CenterAndExpand" HorizontalOptions="FillAndExpand">
                    <Button x:Name="BtnLogin" Text="Login" BorderColor="#CB9600" BackgroundColor="#F4B400"/>
                </StackLayout>
            </StackLayout>
        </ScrollView>
 
       
        <ActivityIndicator x:Name="activityIndicator" 
                           IsRunning="{Binding IsBusy}" 
                           VerticalOptions="Center" 
                           HorizontalOptions="Center" 
                           Color="Blue" />
    </Grid>
 
</ContentPage>
 
cs


MainPage.cs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
 
namespace App1Login
{
    public partial class MainPage : ContentPage
    {
        public MainPage()
        {
            InitializeComponent();
 
            // Define the binding context
            this.BindingContext = this;
 
            // Set the IsBusy property
            this.IsBusy = false;
 
            // Login button action
            this.BtnLogin.Clicked += BtnLogin_Clicked;
        }
 
        private void BtnLogin_Clicked(object sender, EventArgs e)
        {
            this.IsBusy = true;
        }
    }
}
 
cs


'프로그래밍 > xamarin' 카테고리의 다른 글

[xamarin]어플 닫기 전에 물어보고 닫기  (0) 2018.06.24
[xamarin]Lottie Animation  (0) 2018.06.10
[xamarin]CustomRenderers  (0) 2018.06.03
[xamarin]Alert Dialog  (0) 2018.05.27
[xamarin] Profile UI Design  (0) 2018.05.20
Posted by 유령회사
|