Questions tagged [mainwindow]

157 questions
4
votes
1 answer

App xaml assumes the first window instantiated is the main window (showdialog is ignored), I need to show multiple windows

I have the following code in my App.xaml.cs private void App_Start(object sender, StartupEventArgs e) { if ( CompletedInstall()) { //using show to allow for pacifier if loading is slow var manager = new WINServiceConfig(); MainWindow…
rediVider
  • 1,266
  • 2
  • 13
  • 30
4
votes
1 answer

MainWindow opens twice (StartupUri, App, Loadscreen)

I've got a problem with my application. I selected my Loadscreen.xaml as the "StartupUri" in my App.xaml. The Loadscreen.xaml.cs contains a progressbar, that runs until 100% - than it closes and opens the MainWindow. The problem is, that it opens…
sjantke
  • 605
  • 4
  • 9
  • 35
4
votes
3 answers

c# Get process window titles

proc.MainWindowTitle.Contains("e") How does one get the window titles of all the current windows containing "e" open instead of just the Main Window using the "MainWindowTitle" and store them into a string array? EDIT: string[] toClose =…
First Second
  • 117
  • 2
  • 2
  • 10
4
votes
3 answers

Accessing MainWindow's controls from a user control page. WPF C#

I have a page transition ( a control ) in the MainWindow , I have many user control pages , I want to access the page transition in the MainWindow from my user control page ? How do I do that? I tried : Story page = new Story(); …
user2376998
  • 1,061
  • 7
  • 32
  • 65
4
votes
1 answer

How to make Qt MainWindow class simple?

The MainWindow class in GUI such as Qt applications is usually very large, including all the menus, toolbars, central widget, and other widgets and lots of member functions corresponding to all kinds of events and lots of other member convenience…
user1899020
  • 13,167
  • 21
  • 79
  • 154
3
votes
3 answers

WPF closing child- closes parent-window

i have the pretty same sample as mentioned here. Fast concluded: MainWindow closes when the last childwindow is closed. My Problem: I couldn't solve my problems with the described solutions. I can't produce a program where it als takes place. Only…
freakinpenguin
  • 831
  • 14
  • 24
3
votes
2 answers

WPF app does not execute Application_Exit method when user closes main window

I have a WPF/C# 4.0 App which has an Application file XAML that is:
sergiol
  • 4,122
  • 4
  • 47
  • 81
3
votes
2 answers

Cannot show up WPF application when setting MainWindow manually and composing application (MEF)

I got my hands om MEF for a week now and I am trying to build up a WPF application that loads imported controls from MEF. I created a WPF application project and removed the default window and application start up URI. Then I handled the application…
Ucodia
  • 7,410
  • 11
  • 47
  • 81
3
votes
3 answers

How can I set text of label when a function is running?

I want to set the text of a label on main window when a function in code is running. But the label does not change until the function ends. for (int i = 0; i < files.size(); ++i) { ui->label->setText(files[i]); myfoo(); }
user2362956
3
votes
3 answers

How to Find Children of a UserControl instead of a Window - replacing Window.FindName

I currently have a WPF project which has one main Window, and many UserControls which are children of this Window. Many of the children of this window are Tabs. I have successfully replaced my main Window with a User Control that implements almost…
CrimsonX
  • 9,048
  • 9
  • 41
  • 52
3
votes
2 answers

Changing the width of Window when using pages in WPF

Im using pages in the WPF project that im currently working on. However i can't seem to figure out how to change the width of a page, or rather, the width of the window that hosts the pages? Setting the page width property only changes the width of…
Kaare Mai
  • 193
  • 2
  • 10
3
votes
1 answer

setup coredata, before appdelegate loads my mainWindow.xib

I have setup coredata in my appDelegate, but it first loads the mainWindow.xib and the corresponding controllers+views in that xib file. Those controllers need to have a managedObjectContext to load properly. And after the xib is unarchived it runs…
Ton
  • 365
  • 4
  • 19
2
votes
2 answers

ItemsControl has no children during MainWindow's constructor

Based on the answer to SO question "WPF: arranging collection items in a grid", I have the following:
Avi
  • 15,696
  • 9
  • 39
  • 54
2
votes
1 answer

How to display a QWebEngineView in Qt mainwindow?

My webview function with the following code in my main.cpp : #include "mainwindow.h" #include int main(int argc, char *argv[]) { QApplication app(argc, argv); QWebEngineView view; …
taf
  • 43
  • 4
2
votes
3 answers

Accessing ICommands from MainWindow : Josh Smith's Article

I am following Josh Smith's Design explaining WPF + MVVM. I almost have the same requirement as his demo application. I have to assign the Save command from his CustomerViewModel class to a Toolbar button in the Main Window. Is it possible to do…
Pak
  • 125
  • 3
  • 13
1
2
3
10 11