Quantcast
Channel: wpftoolkit Discussions Rss Feed
Viewing all articles
Browse latest Browse all 2157

New Post: Launch ChildWindow when DataGrid row selected

$
0
0
Hi. I have a WPF MVVM Light app in Visual Studio 2015. It has a DataGrid control that shows some records. It has the following binding on SelectedItem:
SelectedItem="{Binding SelectedEmployee}"
On the view model, we detect the change on the SelectedItem and show the details view on that record:
public MyViewModel() 
{
    // Other code
    this.PropertyChanged += (o, e) =>
    {
        if (e.PropertyName == nameof(this.SelectedEmployee))
        {
            ShowEmployeeDetails = (SelectedEmployee != null);
        }
    };
}
However, I would like to open a ChildWindow when this happens -- so that the details view is in a ChildWindow. How would I do this with the WindowContainer and ChildWindow?

P.S. Thank you for these amazing controls :)

Viewing all articles
Browse latest Browse all 2157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>