c# - WPF New Window with content -
i want create new window beside existing main windwoe scrollable textbox.
i'm pressing in main window on button "open new window" , should open new window scrollable textbox.
inside form2
in wpf can drag drop elements in main window cant new window. thought possible when create new window in mainwindow.xaml.cs
i able create new window trough:
private void btnconnect_click(object sender, routedeventargs { form form2 = new form(); //do intergreate textbox scrollbar in form2 form2.show(); }
and want textbox
but how can in c# or wpf?
thx
well... can create new window , load windows.content usercontrol wich createt in new xaml. example:
newxamlusercontrol ui = new newxamlusercontrol(); mainwindow newwindow = new mainwindow(); newwindow.content = ui; newwindow.show();
the xaml
<usercontrol x:class="projekt" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:name="newxamlusercontrol" height="300" width="300"> <grid> <textbox text = ..../> </grid> </usercontrol>