コード例 #1
0
        private void OnDelete(object sender, RoutedEventArgs e)
        {
            Button btn = sender as Button;

            if (btn != null)
            {
                HostConfig host = btn.CommandParameter as HostConfig;
                if (host != null)
                {
                    host.Delete();
                    Data.Hosts.Remove(host);
                }
            }
        }