Hello,
Is it at all possible in MAUI?
Yes, it means Multi-window support in MAUI, you can see .NET MAUI windows - .NET MAUI | Microsoft Learn
I need to be able to decide the size, and location of the new window even if it's on another screen.
For the first issue, you can see the Position and size a Window section in the doc above, and set the X, Y, Width, and Height properties of the Window
I need to be able to operate / change values on the main window while the new window stays in place and receives commands from the changing values on the first window and displays them (Text for example)
You can call an Action to invoke the method in first window, or communicate with the viewmodel of the firstpage when you want to changing values in the page of second window, see Data binding and MVVM - .NET MAUI | Microsoft Learn
The new window should be able to display text but also it would be nice if it would be able to receive a background photo/video
You can get the Text(String) in first window, you should be able to pass the image in the same way.
For more details, you can refer to the following code:
Click the button to second window
private void OnCounterClicked(object sender, EventArgs e)
{
Window secondWindow = new Window(new NewPage( FirstImage, "First window String to Second", ( string second) =>
{
CounterBtn.Text = second;// get the second window page string and display
})) ;
var displayInfo = DeviceDisplay.Current.MainDisplayInfo;
secondWindow.X = (displayInfo.Width / displayInfo.Density - Window.Width) / 2;
secondWindow.Y = (displayInfo.Height / displayInfo.Density - Window.Height) / 2;
Application.Current.OpenWindow(secondWindow);
}
ctor of new page in second window
public NewPage(Image firstImage, string firstTitle, Action<string> firstTitleAction)
{
InitializeComponent();
SecontTitleLabel.Text = firstTitle;//get the text from first window
// you can get the image from first window page
firstTitleAction("SecondTitle");// invoke the action to change the value in first windows,or you can invoke the action in the viewmodel
// there are three paramaters, you can replace these paramaters by a model, and you can also bind the value to the viewmodel of your page
}
Best Regards,
Wenyan Zhang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.