コード例 #1
0
ファイル: Tweet.xaml.cs プロジェクト: rafaelwinter/Ocell
        public Tweet()
        {
            InitializeComponent();
            Loaded += (sender, e) => { if (ApplicationBar != null) ApplicationBar.MatchOverriddenTheme(); };

            viewModel = new TweetModel();
            DataContext = viewModel;

            this.Loaded += new RoutedEventHandler(Tweet_Loaded);

            viewModel.TweetSent += (s, e) =>
            {
                conversation.Loader.Source.Insert(0, e.Payload);
                TBNoFocus();
            };

            panorama.SelectionChanged += (sender, e) =>
            {
                var pano = panorama.SelectedItem as PanoramaItem;

                if (pano == null)
                    return;

                string tag = pano.Tag as string;
                if (tag == "conversation" && !conversationLoaded)
                {
                    conversation.Load();
                    conversationLoaded = true;
                }
            };
        }
コード例 #2
0
        public Tweet()
        {
            InitializeComponent();
            Loaded += (sender, e) => { if (ApplicationBar != null)
                                       {
                                           ApplicationBar.MatchOverriddenTheme();
                                       }
            };

            viewModel   = new TweetModel();
            DataContext = viewModel;

            this.Loaded += new RoutedEventHandler(Tweet_Loaded);

            viewModel.TweetSent += (s, e) =>
            {
                conversation.Loader.Source.Insert(0, e.Payload);
                TBNoFocus();
            };



            panorama.SelectionChanged += (sender, e) =>
            {
                var pano = panorama.SelectedItem as PanoramaItem;

                if (pano == null)
                {
                    return;
                }

                string tag = pano.Tag as string;
                if (tag == "conversation" && !conversationLoaded)
                {
                    conversation.Load();
                    conversationLoaded = true;
                }
            };
        }