Пример #1
0
        /*
         * public override void ShowOptions() //workarround: Can't turn over Pivot viewer when using 3D-style rotation, thowing transformation class cast errors (the IsAnimated=false isn't enough, need this too, else at resize etc. when flipped will throw exceptions)
         * {
         * if (!Flipped)
         *  pivot.Visibility = Visibility.Collapsed;
         *
         * base.ShowOptions();
         *
         * if (!Flipped)
         *  pivot.Visibility = Visibility.Visible;
         * }
         */

        #endregion

        #region Events

        private void GalleryItemAdorner_CommandsRequested(object sender, PivotViewerCommandsRequestedEventArgs e)
        {
            //if (e.IsItemSelected)
            {
                PivotViewerItem item = (PivotViewerItem)e.Item;
                try { e.Commands.Add(new InfoCommand(item)); } catch { }
                try { e.Commands.Add(new ShareCommand(item)); } catch { }
                try { e.Commands.Add(new DownloadCommand(item)); } catch { }
                try { e.Commands.Add(new OpenCommand(item)); } catch { }
            }
        }
 private void GetCommands(object sender, PivotViewerCommandsRequestedEventArgs e)
 {
     e.Commands.Add(new AdornerCommand(e.Item as Price));
 }
Пример #3
0
        private void GetCommands(object sender, PivotViewerCommandsRequestedEventArgs e)
        {
            Uri uri = (e.Item as TmiImage).ImageBigPath;

            e.Commands.Add(new AdornerCommand(uri));
        }
 private void topicAdorner_CommandsRequested(object sender,
     PivotViewerCommandsRequestedEventArgs e)
 {
     var topic = e.Item as Topic;
     e.Commands.Add(new TopicURLCommand()
     {
         LinkUrl = topic.at_sfn
     });
 }
 private void peopleAdorner_CommandsRequested(object sender,
     PivotViewerCommandsRequestedEventArgs e)
 {
     var person = e.Item as Person;
     e.Commands.Add(new PeopleURLCommand()
     {
         LinkUrl = person.at_sfn
     });
 }
 private void basicAdorner_CommandsRequested(object sender,
     PivotViewerCommandsRequestedEventArgs e)
 {
     var company = e.Item as Company;
     e.Commands.Add(new TopicCommand()
     {
         TopicUrl = company.topics
     });
     e.Commands.Add(new PeopleCommand()
     {
         PeopleUrl = company.people
     });
     e.Commands.Add(new CommunityURLCommand()
     {
         LinkUrl = company.domain
     });
 }