Exemplo n.º 1
0
        private void ListViewItem_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            //extract selected Pie from ListView
            var         listItem = sender as ListViewItem;
            SmartMirror weather  = listItem.Content as SmartMirror;

            SmartMirror selectedWeather = forecast.FirstOrDefault(x => x.ID == 3);

            if (weather != null)
            {
                var detailView = new WeatherDetailView(weather);
                detailView.ShowDialog();
            }
        }
Exemplo n.º 2
0
 public MainWindow()
 {
     InitializeComponent();
     myMirrorCodeBehind = new SmartMirror
     {
         Name        = "Emma",
         Temperature = -3,
         Today       = DateTime.Now,
     };
     news                             = GetNews();
     stocks                           = GetStocks();
     forecast                         = GetForecast();
     myGrid.DataContext               = myMirrorCodeBehind;
     NewsOverviewList.ItemsSource     = news;
     StocksOverviewList.ItemsSource   = stocks;
     ForecastOverviewList.ItemsSource = forecast;
 }
Exemplo n.º 3
0
 public WeatherDetailView(SmartMirror mirror)
 {
     InitializeComponent();
     MyDetailedWeather = mirror;
     this.DataContext  = mirror;
 }