public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            availablePages       home         = availablePages.Home;
            PatientAvailablePage p            = PatientAvailablePage.Nouveau;
            var Is_availablePagesObject       = availablePages.TryParse(value.ToString(), true, out home);
            var Is_availablePatientPageObject = PatientAvailablePage.TryParse(value.ToString(), true, out p);
            var param = parameter.ToString();

            if (Is_availablePagesObject)
            {
                var a = (availablePages)value;

                if (a.ToString() == param)
                {
                    return((SolidColorBrush)(new BrushConverter().ConvertFrom("#507091")));
                }

                return("Transparent");
            }
            if (Is_availablePatientPageObject)
            {
                var a = (PatientAvailablePage)value;
                if (a.ToString() == param)
                {
                    return("#3D5672");
                }
                return("Transparent");
            }


            return("Transparent");
        }
 public void NavigateToPage(availablePages page)
 {
     //switch (page)
     //{
     //    case availablePages.Home:
     //        Pageframe.Navigate(_homePage);
     //        break;
     //    case availablePages.Patient:
     //        Pageframe.Navigate(patientCartPage);
     //        break;
     //    case availablePages.Traitement:
     //        Pageframe.Navigate(_traitementPage);
     //        break;
     //    case availablePages.Users:
     //        Pageframe.Navigate(userPage);
     //        break;
     //    case availablePages.Ordonnace:
     //        Pageframe.Navigate(ordonnance);
     //        break;
     //    case availablePages.Formulaire:
     //        Pageframe.Navigate(folderPatientPage);
     //        break;
     //    case availablePages.PatientList:
     //        Pageframe.Navigate(principalPatientPage);
     //        break;
     //    default:
     //        break;
     //}
 }
        private void NavigateToPage(availablePages page)
        {
            switch (page)
            {
            case availablePages.Home:
                mainWindowModel.ActivePage = availablePages.Home;
                break;

            case availablePages.Patient:
                mainWindowModel.ActivePage = availablePages.Patient;
                break;

            case availablePages.Traitement:
                mainWindowModel.ActivePage = availablePages.Traitement;
                break;

            case availablePages.Users:
                mainWindowModel.ActivePage = availablePages.Users;
                break;

            case availablePages.Ordonnace:
                mainWindowModel.ActivePage = availablePages.Ordonnace;
                break;

            case availablePages.Formulaire:
                mainWindowModel.ActivePage = availablePages.Formulaire;
                break;

            case availablePages.PatientList:
                mainWindowModel.ActivePage = availablePages.PatientList;
                break;

            default:
                break;
            }
        }