In other words, if I want to write a winforms db application with an appearince like VS that has docked panels and also the ability to show/hide forms within some of those panels, how would I structure the interface? How would I have the ability to open several disparate forms at different times (with big data grids on them) while avoiding floating forms and also using memory efficiently? I want to avoid floating windows.
Check out this article to build a VS like interface:
Visual Studio IDE like Dock Container
I haven't tried the component myself but it looks interesting.
Visual Studio is definetly MDI
In the technical sense, Visual Studio is an MDI application whose document windows are anchored by tab navigation.
MDI refers to "multiple document interface," and refers to the fact that there are multiple documents open and visible inside a larger parent window.
In the modern application development realm, typically MDI has been frowned upon -- but that was the "old school" MDI, with the free-floating windows. Those are widely considered to be a usability nightmare.
On the other hand, MDI implemented as tabs inside a parent window is so successful from a UI consideration that even environment which didn't traditionally have MDI (EG, Mac OS) are implementing them.
In order to implement something like this, you can "roll your own," or you can use any of a variety of custom control/API packages which will allow you to easily develop tabbed-interface MDI apps. One of the last things I did with Infragistics NetAdvantage (before moving away from it) was a Visual Studio-inspired app, with docking sidebars, search results as a pane at the bottom, and all the primary data forms as tabbed MDI documents. (Indeed, WinForms is one of the few places Infragistics really shines.)
In terms of memory management, that will be on you. :)
I think technically Visual Studio would be classed as an MDI.
The main form holds disparate controls. Each of these controls can then be docked as required etc. Visual Studio for example has a single control (with multiple tabs) to display the documents you edit. A single control with multiple tabs that holds (eg) Solution Explorer, Properties etc etc.
As a starting point to creating your own IDE style interface I would create a form with 5 panels, one docked to top, one to left, one to right, one bottom and one 'fill'
Thats your starting point. Add splitter bars to allow the panels to be resized. Each panel can then hold a Tab control, and each tab holds a 'MdiBaseControl'
An MdiBaseControl can be whatever you want. So in VS terms you have things like SolutionExplorer, Properties, Breakpoints, FindResults etc etc.
Each MdiBaseControl can be dragged from its current tab and dropped into any of the docked panels (which then adds it to the Tab control as a new tab)
I just noticed that Developer Express have some controls for building IDE-style interfaces.
In both interfaces, multiple forms can be seen at the same time but in MDI, things float freely. In this sense, Visual Studio is a SDI.
Related
I need to create a shoebox-style native Windows app in C++. A good example of such a UI would be CleanMyPC:
I've tried the various options of the MFC App wizard in Visual Studio 2019 to see what that would give, but it's either document-based (SDI), or too limited (dialog-style). The closest was an empty Win32 app, which just displays a menu bar and a blank window beneath it. At least it matches the Windows style. But that would mean using bare Win32 API, which doesn't seem like a good idea.
Can a UI like in the screenshot be created with MFC? If so, would that be a reasonable approach? Can MFC be effectively used in a non-document-style, non-dialog-style UI like this?
I understand that there's heavy customization of the controls going on in the screenshot; the question is can it be done with MFC?
It looks like the left sidebar and the right details areas could be made of customized list controls. I'll be looking into how a dialog-based sample app arranges the window, so that no document stuff is involved, but without immediate termination on a button click.
I am supporting a large existing windows forms application. It makes use of panels that sit over the other content on forms. The panels have their visible property to false in the designer. At runtime, visible is set to true when appropriate to display the panel.
This system works fine. However, it's hard to maintain the forms that have these panels because the designer shows them even when they should be invisible. Here is an example:
The Panel_archive has Visible set to False. However, it's still showing in the designer. This makes it hard to edit the fields that it hides.
Is it possible to hide this panel (and all its child controls) so that I can edit the stuff behind it? I assume there is a way to do this (at least, in earlier versions of the Visual Studio IDE) as the original developers created the forms like this. However, I can't find a way.
You know when you create a web app, you can hit F12 from your browser and be able to edit things such as style sheet, remove dom elements etc. on the fly.
This makes for a quick turn around when developing a UI. A real time saver!
Otherwise there's a lot of compile, deploy and clicking click to get to the area you wanted to test. And if the area you're testing is at the end of the workflow, the pain is that much more. I find doing this to be frustratingly time consuming when all you want to do is just change the font size to make it look "better".
Is there any tool similar to that in WinRT environment? Is this just the nature of Mobile App development or is there something out there (regardless of platform) that allows you to edit the UI on the fly?
Yes, you have several options available to you.
First, Blend for Visual Studio--which is installed with Visual Studio Express for Windows--is a great styling tool. It shares the same project structure with VS, so you can have both running at the same time. In VS, in fact, right-click a project in Solution Explorer, select Open in Blend, and there you are.
Blend actually loads the app and executes the JS code, so all dynamically-created elements are also in place. It has an Interactive Mode as well that lets you go into the running app, navigate and set state as you want, then exit that mode and work on styling. For more, I have a video in my book (first edition | second edition preview) that shows the basics of Blend--you can specifically go here and check out Videos 2-2 and 5-3 from the second edition). Chapter 2 gives a little intro in the text as well.
The other two options are in Visual Studio itself.
First, when an app it running there's a command Debug > Refresh Windows Apps (F4) that will reload the HTML and CSS without restarting the app. I use this to reload changes for exactly the reasons you mention. This same command is on the toolbar just to the right of the pause/stop/restart buttons.
Second, a running app will have a DOM Explorer pane in the debugger. If you don't see it, use the Debug > Windows > DOM Explorer command to open it. In that pane you can navigate the DOM tree (like you can in Blend's Live DOM pane) and locate the elements you care about, or you can use the leftmost button in the DOM Explorer to go select and element directly in the app.
On the right side of the DOM explorer you then have tabs for Styles, Trace, Computed, Layout, and Events. You can make changes directly in the Styles pane and they're applied immediately. I use this all the time, in fact, to try out things.
I have a 2 minute video in my book for this as well, see here. Some docs are on http://msdn.microsoft.com/en-us/windows/apps/hh696632.
I have just installed Visual Studio.NET. In the Design area I have added some graphical components (button, textbox) but I can't move these within the specified area, as their position remains unchanged. I would like to move these graphical components with the mouse cursor, I know it's possible, does anyone know how?
It sounds like you have created a WPF project. WPF works a lot differently than WinForms which you are probably used to. So try creating a WinForms project, or get yourself acquainted with WPF.
I came here looking for the answer to the same question. OP is probably no longer interested and it was quite easy to Google it up, but in case somebody comes here as I did, here is the solution:
In WPF, place a Grid component on your form (or in your container, like Tab), and reset it (set both Height and Width to auto). Then you can place other controls and position them with your mouse normally.
I've never found an "ideal" layout for coding in Visual Studio. I have a three-monitor setup, but it seems that the solution explorer/properties/output/errors/whatever panes are always getting in the way or hogging screen space. It's a bit open-ended, sure, but do you have an "ideal" layout with the myriad of floating/dockable/anchored setups for specific windows? For instance, I like to split vertical code panes between two screens, and typically the solution explorer is anchored to the right of the right-most code pane, but that chews up screen real estate that I'd rather have for the code. I was thinking of floating those sorts of things off to another screen.
Apparently VS 2010 will do a LOT more for multi monitor setups. ScottGu went over this at DevConnections 2008, and a few more times, usually wherever he goes.
I got the impression that the MDI or tabbed codefiles might be able to be detached from the IDE, and float/draggable onto another monitor.
As it stands today in VS 2008, Solution Explorer, Immediate Window, etc are detachable and be able to float onto another monitor, separate from the main IDE.