private void AddRelative(Relative relative)
        {
            relatives.Add(relative);
            var view = new RelativeView();

            view.Margin               = new Thickness(5);
            view.CollapseButtons      = false;
            view.Relative             = relative;
            view.DeleteButtonClicked += (sender, args) =>
            {
                if (view.Relative.Id > 0)
                {
                    idsForDelete.Add(view.Relative.Id);
                }
                RelativePanel.Children.Remove(view);
                relatives.Remove(view.Relative);
            };
            view.EditButtonClicked += (sender, args) =>
            {
                var window = new EditRelativeWindow();
                window.Owner        = this;
                window.RelativeView = view;
                window.ShowDialog();
            };
            RelativePanel.Children.Add(view);
        }
        private void AddRelativeButton_OnClick(object sender, RoutedEventArgs e)
        {
            Relative relative = new Relative();

            relative.DrafteeId = DrafteeId;

            RelativeView view = new RelativeView();

            view.Relative = relative;

            var window = new EditRelativeWindow();

            window.RelativeView = view;
            window.Owner        = this;
            window.ShowDialog();
            if (window.ApplyClicked)
            {
                AddRelative(relative);
            }
        }