c# - WPF window content as content of another window -


i need show window inside tab of window , using following

 var childwindoweditor = new mainwindow();   //window embed  object content = childwindoweditor.content; //take out content of window embed  childwindoweditor.content = null;  editortab.content = content;                //just tab in tabbed group 

its working fine, problem if wanted access functions of window class?

i know tha should create user control, there solution without having create content of window user control?

would casting content window got content work?

you should use mvvm pattern. viewmodel datacontext of childwindoweditor.

editortab.datacontext = childwindoweditor.datacontext; 

and that's it. recommend use mvvm. makes life easier.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -