コード例 #1
0
        private void Button_Clicked(object sender, EventArgs e)
        {
            var photo = ((Button)sender).BindingContext as WrappedCell <PendingPhotoUpload>;

            bool shouldHighlight = UploadsQueuePage.OnCellTapped(this);

            if (!photo.IsSelected && originalColor == null)
            {
                originalColor = View.BackgroundColor;
            }

            photo.IsSelected = shouldHighlight;

            selectBtn.Text = (shouldHighlight) ? buttonHighlightText : buttonDefaultText;

            View.BackgroundColor = (photo.IsSelected) ? highlightColor : originalColor;
        }
コード例 #2
0
ファイル: MainTabPage.cs プロジェクト: joseplj/MySkinSelfie
        public MainTabPage()
        {
            Title = AppResources.Main_title;

            var mainPage = new MainPage
            {
                Title = "Home",
                Icon  = "ic_home.png"
            };

            Children.Add(mainPage);

            var uploadsPage = new UploadsQueuePage
            {
                Title = AppResources.Uploads_btn,
                Icon  = "ic_cloud_upload_white_24dp.png"
            };

            Children.Add(uploadsPage);

            var settingsPage = new AppSettingsPage
            {
                Title = AppResources.Main_settings,
                Icon  = "ic_settings.png"
            };

            Children.Add(settingsPage);

            var helpPage = new AppHelpPage
            {
                Title = AppResources.Main_help,
                Icon  = "ic_info_black_24dp.png"
            };

            Children.Add(helpPage);
        }