public AssetView(AssetTreeExViewModel tva, TVAssetViewModel obj) { InitializeComponent(); this.Loaded += (o, e) => { this.DataContext = new AssetViewModel(tva, obj); Cascadewindow(); }; }
public bool OpenAssetDlg(AssetTreeExViewModel tva, TVAssetViewModel obj) { Window owner; owner = Application.Current.Windows[0]; Views.AssetView dlg = new Views.AssetView(tva, obj) { Owner = owner }; dlg.Show(); return(false); }