public void NewMarkerButton_Click(object obj, EventArgs args)
        {
            var marker = new Marker();
            var dialog = new MarkerDialog(marker, MarkersList.Items.Cast <MarkerSubData>().ToArray());

            dialog.Show();
            dialog.Save.Click += (ev, ob) =>
            {
                manager.AddMarker(marker);
                markersList.Add(MarkerSubData.Create(marker));
                MarkersList.ItemsSource = markersList;
                MarkersList.Items.Refresh();
            };
        }
        private void MarkersList_Click(object sender, MouseButtonEventArgs e)
        {
            if (MarkersList.SelectedItem == null)
            {
                return;
            }
            var markerData = ((MarkerSubData)MarkersList.SelectedItem);
            var dialog     = new MarkerDialog(markerData.Marker, markersList, true);

            dialog.ShowDialog();
            dialog.Closed += (ev, ob) =>
            {
                markerData.Update();
                MarkersList.Items.Refresh();
            };
        }