mainwindow

How to make C# tab switch between form

99封情书 提交于 2020-01-16 06:56:08
问题 I want to know if it possible to use tabs (like Google Chrome or many others program) in VS Express 2010 to swap between forms without closing any window. I know there is the tab control item in the tool box but as far as I know you need to create the tab content in the same form. I'm looking for a way to swap between form like if I put Buttons in the the top of each form (workers, customers, ext) that open the form I clicked and close the one I'm in but not change the main window. 回答1: You

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

二次信任 提交于 2019-12-23 13:20:53
问题 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(); NavigationService nav = NavigationService.GetNavigationService(this); // Navigate to the page, using the NavigationService // if (nav != null) // { // nav.Navigate(page); MainWindow test = new MainWindow(); test.pageTransition1.ShowPage(page); // } 回答1: Application

Displaying wpf content over/outside main window bounds [closed]

只愿长相守 提交于 2019-12-19 18:33:32
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I am trying to achieve an effect of overlapping the main window boundary with a control. It's hard to explain this in words which is also maybe why I am having difficulty finding information on how to do this or if it is even possible. Below is an example of the effect I am trying to get (from the designer),

Displaying wpf content over/outside main window bounds [closed]

坚强是说给别人听的谎言 提交于 2019-12-19 18:33:12
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I am trying to achieve an effect of overlapping the main window boundary with a control. It's hard to explain this in words which is also maybe why I am having difficulty finding information on how to do this or if it is even possible. Below is an example of the effect I am trying to get (from the designer),

ItemsControl has no children during MainWindow's constructor

我的未来我决定 提交于 2019-12-12 17:24:24
问题 Based on the answer to SO question "WPF: arranging collection items in a grid", I have the following: <ItemsControl Name="itemsControl1" ItemsSource="{Binding MyItems}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <Grid Name="theGrid" ShowGridLines="True" /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemContainerStyle> <Style TargetType="{x:Type FrameworkElement}"> <Setter Property="Grid.Row" Value="{Binding RowIndex}" /> <Setter Property="Grid.Column" Value="{Binding

Thread invoke the main window?

情到浓时终转凉″ 提交于 2019-12-11 03:44:22
问题 So basically I have a MainWindow , a class SetupViewModel defined in a separate cs file, and another class ImageViewModel in a separate cs file; I am wondering is there anyway I can invoke the operation in MainWindow from ImageViewModel . More details listed below: in ImageViewModel, invoke the change in MainWindow as following (following code in MainWindow ): this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, new Action( delegate() { ((SetupViewModel)this

Where is MainWindow.xib in new Xcode project?

假如想象 提交于 2019-12-10 02:45:20
问题 I started a new project in Xcode 4 using the TabBar template. I noticed that there was no MainWindow.xib file in the project. Did Apple get rid of this file? How can I access the Mainwindow without this file? 回答1: MainWindow.xib was kind of superfluous to begin with, keeping in mind that it doesn't really contain any "visible" components (thinking of the window as an invisible container) and that usually you don't need to modify it. (That said, I'm only a beginner in iOS development myself,

C# get main window title of processes on a remote machine

元气小坏坏 提交于 2019-12-08 05:06:45
问题 I am developing a C# program that is run from a server and monitors processes on another set of servers. The processes I am monitoring all have the same exe name, but different windows title names. I am looking for a way to pull the windows title names from these processes remotely. Basically what i would like to do is the following; Process[] processList = Process.GetProcesses("ServerName"); foreach (Process p in processList) { try { Console.WriteLine(p.MainWindowTitle); } catch (Exception e

Where is MainWindow.xib in new Xcode project?

佐手、 提交于 2019-12-05 01:55:52
I started a new project in Xcode 4 using the TabBar template. I noticed that there was no MainWindow.xib file in the project. Did Apple get rid of this file? How can I access the Mainwindow without this file? MainWindow.xib was kind of superfluous to begin with, keeping in mind that it doesn't really contain any "visible" components (thinking of the window as an invisible container) and that usually you don't need to modify it. (That said, I'm only a beginner in iOS development myself, so I would appreciate my observation being corrected if I'm wrong). MainWindow.xib's role in the beta version

objective c renderInContext crash on background thread

与世无争的帅哥 提交于 2019-12-05 01:40:37
问题 I have an app in which the screen continuously is capturing in background thread. Here is the code - (UIImage *) captureScreen { UIWindow *keyWindow = [[UIApplication sharedApplication] keyWindow]; CGRect rect = [keyWindow bounds]; UIGraphicsBeginImageContext(rect.size); CGContextRef context = UIGraphicsGetCurrentContext(); [[keyWindow layer] renderInContext:context]; UIImage *img = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); UIDeviceOrientation orientation =