I have a WPF application that loads a realtime live chart in a window,
But I end up having 10+ windows open on my desktop (as many windows as there are charts).
So my need is basically to group/embed all these WPF windows in a single window.
I tried WPF MDI but I had serious trouble since it requires the windows to be usercontrols instead, and in that case, my live chart displays but stays empty and does not refresh nor plots realtime data. Same behavior when I put my chart controls inside a Page instead of a Window (chart does not update). This is why I guess I really need to stick with windows at this point.
I welcome any simple & straight solution
Are you sure you want to have a last century MDI in your WPF application? I'd recommend to switch to other, less expensive and more flexible content arrangement. I'd organize the charts in some kind of scrollable or swipeable container, maybe with some kind of navigation or tabbing facility... If your users really want to have one or some charts in a separate window(s), let them drag the charts out of the main container and create separate window on demand (something like dragging a tab out of Interent Explorer).
Related
Backgound :
I want to create moveable toolbars just like paint.NET or any other Designing application. A Toolbar which can be moved, closed and shown from the menubar.
i know how a toolstrip works but its permanent sort of thing. There is another way explained in some articles which uses panels to make toolbars.
While doing experiments on the toolstrip, idea came up in my mind to make two forms(one big size form and other small form) and run them simultaneously , one will act as main form and the other small form will act as a toolbar but it also didnot work. I am only able to run one form.
Requirement:
I just want to make an application look like Paint.net having different tools in a toolbar which can be used on drawing area.and when application starts, toolbar and drawing area both should be running just like in all graphics editing softwares.
Questions:
How to make a moveable toolbar that can be closed and viewed again?
How to run two forms of different sizes run simultaneously at the same time when application starts?
Note:
Need Guidance as well if i am not in the right direction, u can set my direction towards the right side.
Thanks
hi I want to make a wpf c# application which shows every form(Ex:- user registration, reports , etc..)in one window in other words I want to make an application which have one window and every user control appears and closed there when I want just like games in some games like middle of honor warfighter they have one window and if we chose option option buttons appear in the same window and if we chose graphics that graphic page content appear in that same window.
and I want to know is there any frame work or special method is there which I should fallow other than putting wpf controls one over another and changing there visibility and isopen status.If there is any examples please give me a link
You can use ContentControl for holding any element. also PRISM is best approach.
You can use WPF Popup forms below are some links for more info:-
http://www.dzone.com/articles/understanding-wpf-popups
http://www.c-sharpcorner.com/Blogs/11700/
Take a look at this MDI Control. It helps you to show any kind of usercontrol in one container as window.
I am creating a windows mobile application that has several different screens. At the bottom of each screen is a menu bar which the user can click on to navigate each screen.
My question is should I use a new form for each screen and clone the menu or use one form and have all the other screens as a control and add them to the main form?
Cheers
I'd vote for controls.
Both mechanisms can achieve the flow you want, and from a fundamental perspective neither is going to really be worse (as in load times, memory consumed, or what have you) so it's largely a personal style decision. Me, I use a UI framework that lends itself heavily to UserControls, so that's what I use.
Generally speaking, when I create an app I have a single parent/host form that has Workspaces where I put my Views. Thos Views are UserControls. Whether I use a tabbed workspace or a desk workspace, they still end up as Controls. The only reason I use more than one full-up Form is if I have a dialog (warnings, inputs, etc) where I will be doing a ShowDialog call.
Per this link, there is no MDI functionality in Windows Mobile.
In our application, we use different forms for each screen.
There are two ways to open up new windows:
formName.ShowDialog(): the new screen will be opened as a child of the other screen. In this case, you won't be able to access your parent form until the child is closed.
formName.Show(): the new screen will NOT be opened as a child of the other screen. Hence, you can access your parent even if the child is not closed.
You can use TabControl in single form with each tab having it's own controls. No need to add controls dynamically. And one single form. The way to achieve this is discussed in more detail in this answer.
Creating Wizards for Windows Forms in C#
I'm currently designing an MDI application (a custom CRM) in .net 4.0 and i'm starting to dislike the whole interface simply because there's no real way to track which windows are open or closed and it'll probably lead to a very confusing interface.
What is the best way to avoid this?
- Should i implement a taskbar to track every open mdi child?
- Should i use dialogs instead to prevent multi-tasking?
- Is there any way to change the size of a minimized window on a mdi container (why are they so small, you can't even read the full form title that way...)
Sorry for so many questions, thanks in advance.
MDI has its uses, but as you've found can easily lead to a cluttered, hard-to-use interface. The current in-vogue way of dealing with this is to add a tab control (as in any web browser, or most text editors/IDEs) to allow switching between open views. This is close to a task bar I guess.
Other options are controls like the Outlook bar (the big view chooser down the left-hand side of Outlook) or possibly just a simple list box with the currently open views.
Alternatively, consider how often you really want multiple windows available and whether most of them are "tool windows". If so, perhaps look at using docking windows for these tool windows, and a Single Document interface for the rest of the app. All depends on what you're actually doing!
The MDI windowing management already has the built-in to track open windows by way of the menu. The ToolStripMenu has an MdiWindowListItem that you can set to a reference of the menu item that will contain the list of open windows. If the menu is attached to the MDI parent window, child windows automatically populate the menu item.
One of the objectives of MDI is to allow multitasking. If that's not what you want, use a different design.
As far as changing the size of the minimized windows, apparently it's not possible using the standard Windows interface. See more info here: Is it possible to change size of minimized window in MDI C# Winforms. But you could remove the standard Minimize button, add your own, and do what you want with the windows in a Normal state.
I am trying to create a panel which will have a set of "buttons" on it.
These buttons should have the following behaviour:
Appear similar to a tag (with
rounded edges)
Contain a red
cross to remove the filter/tag from
the panel, similar to the way internet
explorer tabs have an embedded cross to close the individual tab.
allow the user to click
on the tag and respond like a normal
button (as long as the click is not
in the red cross)
Number 1 is no problem, this is just appearance, however, regarding numbers 2 and 3, I am not sure if there is already code out there do to something similar...and I dont really want to reinvent the wheel if I can avoid it!
My question is: Does anyone know if there is something out there in infragistics which will do this simply, or will I need to write this myself by subclassing winform buttons?
Thanks in advance!
Is this new development or maintenance of an existing project?
If it is maintenance, you have a somewhat tougher time ahead. You'll implement a UserControl, probably segmented into two buttons. Use docking to get the behavior as correct as possible. The far right button would contain your cross image; the left (which would need to auto-expand as you resize the control) would contain your primary button behavior. Play with the visual styles until you get them right (EG, removing borders, etc).
If this is new development, and you haven't gotten too far into it, you might consider using Windows Presentation Framework (WPF) instead of WinForms. It will be easier to build the control and get it to look exactly how you want it. WPF includes an extremely powerful control compositing system which allows you to layer multiple controls on top of each other and have them work exactly as you'd expect, and it carries the added advantage of allowing full visual control out-of-the-box.
Either way, this is more work than dropping in an external component ... I've used Infragistics for years, and I can't think of anything they have which is comparable. The closest, but only if you're building an MDI application and these controls are for window navigation, is the Tabbed MDI window management tools -- and there, only the tabs (which replace window title bars) have this behavior.
I don't think that infragistics can do something like this. The UltraButton control can't.
Implementing a own control wouldn't be that hard.
your probably going to have to make a costume control for this type of work.