public StreamViewModel(MainWindow main, ConfigurationViewModel configuration) {
			Main = main;
			Configuration = configuration;
			Stream = new ObservableCollection<Status>();
			ConnectStreamSampleCommand = new RelayCommand(ConnectStreamSample, CanConnect);
			ConnectStreamFilterCommand = new RelayCommand(ConnectStreamFilter, CanConnect);
			ConnectUserStreamsCommand = new RelayCommand(ConnectUserStreams, CanConnect);
		}
		public HomeViewModel(MainWindow main, ConfigurationViewModel configuration) {
			Main = main;
			Configuration = configuration;

			OrderPred = (entry, item) => {
				return entry.CreatedAt.CompareTo(item.CreatedAt) >= 0;
			};

			Timeline = new OrderedHashSet<Status>(OrderPred);
			Mentions = new OrderedHashSet<Status>(OrderPred);
			Favorites = new OrderedHashSet<Status>(OrderPred);
			DM = new OrderedHashSet<Status>(OrderPred);
		}
		/// <summary>
		/// Initializes a new instance of the MainWindow class.
		/// </summary>
		public MainWindow() {
			InitializeComponent();

			Closing += (s, e) => ViewModelLocator.Cleanup();
			WorkerCounter = 0;

			// initialize view model
			var configViewModel = new ConfigurationViewModel(this);
			var homeViewModel = new HomeViewModel(this, configViewModel);
			var searchViewModel = new SearchViewModel(this, configViewModel);
			var streamViewModel = new StreamViewModel(this, configViewModel);

			// initialize view model property
			configViewModel.OnSearchQueryChanged = (e1, e2) => {
				searchViewModel.ArrangeTabItems(e1.SplitByLineOrComma(), e2.SplitByLineOrComma(), searchViewModel.QueryTabItems);
			};
			configViewModel.OnTimelineScreenNameChanged = (e1, e2) => {
				searchViewModel.ArrangeTabItems(e1.SplitByLineOrComma(), e2.SplitByLineOrComma(), searchViewModel.UserTabItems);
			};
			streamViewModel.HomeViewModel = homeViewModel;

			// viewmodel bind to view datacontext
			homeView.DataContext = homeViewModel;
			searchView.DataContext = searchViewModel;
			streamView.DataContext = streamViewModel;
			configView.DataContext = configViewModel;

			//ConfigurationViewModel.SetTitle();
			configViewModel.Load();
			configViewModel.SetTitle();

			var main = this.DataContext as MainViewModel;
			main.Main = this;
			main.Configuration = configViewModel;
			main.Stream = streamViewModel;
			main.SearchViewModel = searchViewModel;
		}
		public SearchViewModel(MainWindow main, ConfigurationViewModel configuration) {
			Main = main;
			Configuration = configuration;

			UserTabItems = new ObservableCollection<TabItem>();
			QueryTabItems = new ObservableCollection<TabItem>();
			MASearchTabItems = new ObservableCollection<TabItem>();
			TrendTabItems = new ObservableCollection<TabItem>();
			BuzztterTabItems = new ObservableCollection<TabItem>();

			FirstHeaderName = "All";
			OrderPred = (entry, item) => {
				return entry.CreatedAt.CompareTo(item.CreatedAt) >= 0;
			};

			UserTabItems.Add(new TabItem {
				Header = FirstHeaderName,
				Content = new TwitterDataGrid(),
				DataContext = new OrderedHashSet<Status>(OrderPred)
			});
			QueryTabItems.Add(new TabItem {
				Header = FirstHeaderName,
				Content = new TwitterDataGrid(),
				DataContext = new OrderedHashSet<Status>(OrderPred)
			});
			MASearchTabItems.Add(new TabItem {
				Header = "",
				Content = new TwitterDataGrid(),
				DataContext = new OrderedHashSet<Status>(OrderPred)
			});
			TrendTabItems.Add(new TabItem {
				Header = FirstHeaderName,
				Content = new TwitterDataGrid(),
				DataContext = new OrderedHashSet<Status>(OrderPred)
			});
			BuzztterTabItems.Add(new TabItem {
				Header = FirstHeaderName,
				Content = new TwitterDataGrid(),
				DataContext = new OrderedHashSet<Status>(OrderPred)
			});
		}