mainwindow

Windows Forms: Change application mainwindow at runtime

Normally I would do Application.Run(myMainForm). But I want to do something like this: MyForm1 f = new MyForm1(); f.Close+=OnOpenOverviewWin(); Application.Run(f); void OnOpenOverviewWin() { MyOverViewForm f = new MyOverViewForm (); Application.Run(f); // i want to do this Application.NewMainWindow = f; // or something like that } ...

setup coredata, before appdelegate loads my mainWindow.xib

Hi, 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 the code in my appDelegate. How can i setup my coredata and then load the mainWIndow...

iPhone Navigation-Based application - some global toolbar questions

Hi, I started iPhone development two months ago, so I can't call myself "expert" ;-) But I learned a lot in these two months, a lot here from stackoverflow :) I'm working on an iPhone app which is based on the "Navigation-Based application" app template. My RootViewController is, of course, an UITableView. From that TableView, I can na...

iPhone Dev - Is it possible to load an app's mainWindow conditionally?

Is it possible to code this sequence of events once an iPhone app has been launched? User launches application. AppDelegate.m checks if data is present in internal database. If yes, MainWindow.xib loads. If no, AnotherViewController.xib loads. I've only seen app examples that load the MainWindow.xib without conditions. If it is possib...

Changing the width of Window when using pages in WPF

Hi 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 the page inside the window frame. Setting the with of the mainwindow or navigationwi...

merging or combining two projects. two delegates, two windows.

Thinking about divide and conquer, I decided to start an application having small pieces of my big app. I thought it was more convenient and easier specially as far as errors go. When I tried to merge two of them, I faced the problem of having separate delegates, and mainwindow. Maybe merging the method of the delegate applicationDidFini...

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 exactly the same functionality as the Main Window. Replacing the Window with a UserContro...

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

Hello, 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 startup event to compose the application: public partial class App : Applicatio...

Iphone TabBarApp keeps launching a view from another application

My application keeps launching a view from another application, for a few seconds but returns to my current app. I realise that I had copied some code from App B. My app (let's call it App A) is a tab bar application whose nib file is mainWindow.xib, as well as the name of App B's nib File is mainWindow.xib. I have tried deleting the con...

How to make my WPF MainWindow a singleton?

I want to make my MainWindow a singleton because I want to make accessing it from all other windows in my app easier. But I couldn't make it run. Here is what I did. As usual, I made the MainWindow contractor private, and created a public static MainWindow Instance property to return a static instance. When I just run it without any oth...

wpf - transparent MainWindow and issues with DragMove "Can only call DragMove when primary mouse button is down."

I have a wpf project which uses transparent windows and I share this transparent window styling for my dialog windows and my mainwindow. I am getting an error on my DragMove() event of my MainWindow AFTER I close a dialog window that uses the same window style. To make this even more strange this exception only occurs when I handle a mo...