public TemplateEditPage(Template?template)
        {
            InitializeComponent();

            var types = ServiceLocatorByType <EntryBase> .GetNames();

            foreach (var t in types)
            {
                TypePicker.Items.Add(t);
            }

            BindingContext = ViewModel = new TemplateEditViewModel(template);

            AssignEntry(ViewModel.Template.Entry);
            TypePicker.SelectedItem = ViewModel.Template.Entry?.GetType().FullName;
            loaded = true;
        }
        private void TypePicker_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (!loaded)
            {
                return;
            }

            // ToDo: Ask user if they want to change. It will reset the template.

            if (ServiceLocatorByType <EntryBase> .TryCreate((string)TypePicker.SelectedItem, out var entry))
            {
                AssignEntry(entry);
            }
            else
            {
                AssignEntry(null);
            }
        }