Beispiel #1
0
 private void SetItemSourceInParameter(ParametersNavigating parameters, int i)
 {
     if (parameters[i] is List <Models.Group> listGroup)
     {
         ListViewModels.ItemsSource = listGroup;
         _typeList = typeof(Models.Group);
     }
     else if (parameters[i] is List <Models.Types> listType)
     {
         ListViewModels.ItemsSource = listType;
         _typeList = typeof(Models.Types);
     }
 }
Beispiel #2
0
        internal static void Navigate(Type typePage, params object[] param)
        {
            ParametersNavigating parameters = new ParametersNavigating()
            {
                Parameters = param
            };

            Frame frame = Window.Current.Content as Frame;

            try
            {
                frame.Navigate(typePage, parameters);
            }
            catch (Exception ex)
            {
                Messages.Show("Ошибка смены страницы.\n" + ex.Message);
            }
        }