private void UnhandledViewBindingEventHandler(object sender, VueBindingUnhandledViewBindingEventArgs e)
        {
            Guid noteId;

            switch (e.PropertyName)
            {
            case "AddToSafeCommand":
                noteId = new Guid(e.Value);
                _viewModel.AddNoteToSafe(noteId);
                SetVisibilityAddRemoveTresor(noteId, true);
                break;

            case "RemoveFromSafeCommand":
                noteId = new Guid(e.Value);
                _viewModel.RemoveNoteFromSafe(noteId);
                SetVisibilityAddRemoveTresor(noteId, false);
                break;

            case "OrderChangedCommand":
                int oldIndex = int.Parse(e.Parameters["oldIndex"]);
                int newIndex = int.Parse(e.Parameters["newIndex"]);
                _viewModel.MoveNote(oldIndex, newIndex);
                break;
            }
        }
        private void UnhandledViewBindingEventHandler(object sender, HtmlViewBindingNotifiedEventArgs e)
        {
            Guid noteId;

            switch (e.EventType?.ToLowerInvariant())
            {
            case "list-open":
                noteId = new Guid(e.Parameters["data-note"]);
                _viewModel.ShowNoteCommand.Execute(noteId);
                break;

            case "list-select":
                noteId = new Guid(e.Parameters["data-note"]);
                _viewModel.SelectedNote = _viewModel.FilteredNotes.FirstOrDefault(item => item.Id == noteId);
                break;

            case "list-orderchanged":
                int oldIndex = int.Parse(e.Parameters["oldIndex"]);
                int newIndex = int.Parse(e.Parameters["newIndex"]);
                _viewModel.MoveNote(oldIndex, newIndex);
                break;
            }
        }
        private void UnhandledViewBindingEventHandler(object sender, HtmlViewBindingNotifiedEventArgs e)
        {
            Guid noteId;

            switch (e.EventType?.ToLowerInvariant())
            {
            case "list-orderchanged":
                int oldIndex = int.Parse(e.Parameters["oldIndex"]);
                int newIndex = int.Parse(e.Parameters["newIndex"]);
                _viewModel.MoveNote(oldIndex, newIndex);
                break;
            }
            switch (e.BindingName?.ToLowerInvariant())
            {
            case "shownote":
                noteId = new Guid(e.Parameters["parent.data-note"]);
                _viewModel.ShowNoteCommand.Execute(noteId);
                break;

            case "addtosafe":
                noteId = new Guid(e.Parameters["parent.data-note"]);
                _viewModel.AddNoteToSafe(noteId);
                SetVisibilityAddRemoveTresor(noteId, true);
                break;

            case "removefromsafe":
                noteId = new Guid(e.Parameters["parent.data-note"]);
                _viewModel.RemoveNoteFromSafe(noteId);
                SetVisibilityAddRemoveTresor(noteId, false);
                break;

            case "deletenote":
                noteId = new Guid(e.Parameters["parent.data-note"]);
                _viewModel.DeleteNoteCommand.Execute(noteId);
                break;
            }
        }