/// <summary>
 /// Default constuctor which initializes component on page.
 /// </summary>
 public ResultsFilterPage()
 {
     InitializeComponent();
     _surveysViewModel = new ListOfSurveysViewModel();
     _surveysViewModel.Read();
     _filterViewModel = new ResultsFilterViewModel(_surveysViewModel.List);
     Filters.DataContext = _filterViewModel.Filter;
     _filterViewModel.Filter.DateFiltration.ChosenDateFilter = "0";
     SurveySearchList.DataContext = _filterViewModel.Filter.SurveyFiltration.SelectedSurveys;
     BusyIndicator.DataContext = _filterViewModel.Filter.Busy;
     _filterViewModel.Filter.SearchingCompletedEventHandler += OnSearchingCompleted;
     RadiusTextBox.ValidationRule = new RangeValidationRule(Model.SurveyForms.NumericQuestion.Types.DecimalType, 0, null);
     BuildApplicationBar();
 }
        private void ListOfSurveysPage_Loaded(object sender, RoutedEventArgs e)
        {
            _viewModel = new ListOfSurveysViewModel();
            _viewModel.Read();

            bool isLanguageChanged = (AppResources.Culture.ToString() != _oldLanguage);
            _oldLanguage = AppResources.Culture.ToString();

            bool isThemeChanged = (OperationsOnSettings.Instance.Theme != _oldTheme);
            _oldTheme = OperationsOnSettings.Instance.Theme;

            if (_isNewPageInstance || isLanguageChanged || isThemeChanged)
            {
                BuildApplicationBar();
            }

            if (_isFavoriteView)
                ListOfSurveysBox.DataContext = from favorites in _viewModel.List where favorites.IsFavorite == true select favorites;
            else
                ListOfSurveysBox.DataContext = _viewModel.List;

            BusyIndicator.DataContext = _viewModel.Connection.Busy;
            MessageView.AssignDisplay(_viewModel.Connection.Message);
            CheckNewSurvey();
        }