示例#1
0
 public ConnectSocialButton()
 {
     InitializeComponent();
     BindingContext = new SocialServiceViewModel
     {
         Network = "Facebook",
         DisconnectedImageUrl = "facebook_icon_grey.png",
         ConnectedImageUrl    = "facebook_icon_white.png",
         CanConnect           = false
     };
 }
        public UserProfileViewModel()
        {
            InitMockData();

            SaveCommand = new Command(async _ => await OnSave());
            //SkipCommand = new Command(async _ => await OnSkip());
            //CancelCommand = new Command(async _ => await OnCancel());
            //SelectPhotoCommand = new Command(async _ => await OnSelectPhoto());
            LogoutCommand         = new Command(async _ => await OnLogout());
            ToggleEditModeCommand = new Command(async _ => await OnToggleEditMode());

            FacebookVM = new SocialServiceViewModel()
            {
                Network = "Facebook",
                DisconnectedImageUrl = "facebook_icon_grey.png",
                ConnectedImageUrl    = "facebook_icon_white.png",
                CanConnect           = false
            };

            TwitterVM = new SocialServiceViewModel()
            {
                Network = "Twitter",
                DisconnectedImageUrl = "twitter_icon_grey.png",
                ConnectedImageUrl    = "twitter_icon_white.png",
                CanConnect           = false
            };

            InstagramVM = new SocialServiceViewModel()
            {
                Network = "Instagram",
                DisconnectedImageUrl = "instagram_icon_grey.png",
                ConnectedImageUrl    = "instagram_icon_white.png",
                CanConnect           = false
            };

            YouTubeVM = new SocialServiceViewModel()
            {
                Network = "YouTube",
                DisconnectedImageUrl = "youtube_icon_grey.png",
                ConnectedImageUrl    = "youtube_icon_white.png",
                CanConnect           = false
            };
        }