Код: Выделить всё
< /code>
code-behind: < /p>
public partial class SystemInfoWindow : Window
{
public SystemInfoWindow(IEnumerable maintenanceInfos)
{
InitializeComponent();
System.Diagnostics.Debug.WriteLine("ItemsControl instance={0}", System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(MaintenanceInfos));
System.Diagnostics.Debug.Assert(null == MaintenanceInfos.ItemsSource);
MaintenanceInfos.ItemsSource = maintenanceInfos;
}
}
< /code>
код для показа диалога: < /p>
private void ShowSysInfo_Click(Object sender, RoutedEventArgs args)
{
var dlg = new SystemInfoWindow(facade.MaintenanceInfos);
dlg.Owner = Window.GetWindow(this);
dlg.ShowDialog();
}
< /code>
facade.MaintenanceInfosПодробнее здесь: https://stackoverflow.com/questions/337 ... he-curtain