예제 #1
0
        private void TaskListItem_RightTapped(object sender, RightTappedRoutedEventArgs e)
        {
            var listItem = (SlidableListItem)sender;
            var task     = (IBackgroundTaskRegistration)listItem.DataContext;

            SavedLocationRightTappedFlyout.ShowAt(listItem);
        }
예제 #2
0
        private void SavedLocation_RightTapped(object sender, RightTappedRoutedEventArgs ev)
        {
            var listItem = (SlidableListItem)sender;
            var location = (LocationItem)listItem.DataContext;

            _lastLocationSelected = location;

            if (string.IsNullOrEmpty(location.Id))
            {
                return;
            }

            var isPinned = TileDesigner.IsSecondaryTilePinned(location);

            if (isPinned)
            {
                CmdUnpinLocation.Visibility = Visibility.Visible;
                CmdPinLocation.Visibility   = Visibility.Collapsed;
            }
            else
            {
                CmdUnpinLocation.Visibility = Visibility.Collapsed;
                CmdPinLocation.Visibility   = Visibility.Visible;
            }

            SavedLocationRightTappedFlyout.ShowAt(listItem);
        }