Xceed AvalonDock 2: dock/arrange/split my LayoutDocuments horizontally AND vertically - avalondock

I have been using AvalonDock 1 for an old project, that needs a refresh/rewrite, so I started looking at AvalonDock 2.
One feature I am missing or not sure how to achive is the ability to freely dock/arrange/split my LayoutDocuments horizontally AND vertically.
My app has no docked parts, just the main area containing documents.
When I start off with several documents tabbed and start to drag one, then I can choose to either split horizontally or vertically.
However, when dragging another document, I can only choose to split the same way as before.
See how the second step has fewer dock/split options below:
I would like to be able to dynamically dock the window either below the left, the right or both windows.
How can this be achived? It was working with version 1.

You can do this by setting AllowMixedOrientation to True in the XAML of your DockingManager.
<xcad:DockingManager AllowMixedOrientation="True" ...>
</xcad:DockingManager>

Related

Slide menu in Windows Phone 8

I'm migrated from iOS dev to WIndows Phone dev and I have stumbled upon a problem.
I need to implement a side menu, that looks like the one in facebook app in ios. It shpuld slide from left to right. It should contain about 10 buttons (ListView). Presign the button should cause chaning the view (navigate to other xaml file)
Because of the huge difference between Windows Phone controls and iOS controls I want to ask an advice on how to better implement such menu. I've heard about aproach using Panorama. But would it look pretty?
I mean I'll have 10 different XAML files with different content. In each of them I'd have to add Panorama control and add the menu. And when I navigate to other XAML would it look nice? because it would close menu without any animation.
So please tell me what is the better approach in impelementing what I want? And how to navigate properly between all the XAMLs without loosing the animation of the menu. And of course how to avoid duplicating code in all the XAMLs? I guess XAML files could not be inherited. And of course I need it to support both WIndows Phone 8 and 8.1.
Thank you very much for you attension!
Here this a blog that will help you implement side menu like Facebook app. Link Hope this helps.
I just implemented something similar in my Dictionary app (http://www.windowsphone.com/s?appId=9f31b733-8c7b-e011-986b-78e7d1fa76f8). You will see that when you click the favorite or history icons on the top, it slides in a panel from the right. I implemented this by adding another Grid to the page whose left margin is set to the width of the page so that it basically sits to the right of the page, out of user's view. When the user taps one of the icons on top, I run a DoubleAnimation with a StoryBoard which does TranslateTransform on the X coordinate of the Grid and runs the StoryBoard for a duration of 3.5 seconds to give the user the perception of slide-in animation.
As far as having the same slide-in menu on each of the pages go, you have 2 options:
(a) Create the sliding panel as a user control and add it to each of the pages and on click of an item inside the panel, go to the second xaml page with the slide-in menu open and start the transition to hide it, or
(b) Create multiple grids within the same xaml page and simply hide/display the right one at the right time.
I believe you are speaking about the popular hamburger menu.
You can very well use the SlideView library. Here is the link,
https://slideview.codeplex.com/
The SlideView, a control allowing to slide between panels (2 or many more)
The SlideApplicationFrame, a control to use at top app level and packaged to display 3 panels with navigation occuring in the middle panel
The AutoHideBar, a control which is displayed when scrolling up in a list, and hidden when scrolling down

Multiple Windows in PhpStorm

Is it possible to have more than one window (for the same project) in PhpStorm ? If yes, how ?
PhpStorm supports only one frame per project.
Note that you can drag editor tab outside of the main window to create another window for the editor. Tool window panels can be also detached and moved to to the second display if you so desire.
You can choose Split Horizontally or Split Vertically from Windows menu!
As they are so useful, you can put two shortcuts to use them easier. I put option + 1 for splitting vertically and option + shift + 1 for splitting horizontally.
Update
In 2017 versions, The Split Horizontally and Split Vertically options are located into Windows > Editor Tabs
I was going to add this as a comment, on Nima Ghaedsharafi's post. The path to '''Split Horizontally''' and '''Split Vertically''' looks to be '''Window > Editor Tabs > Split ...''' in Version. 2017.1.4
Note for those trying to add a key shortcut for the Split Horizontally or Split Vertically buttons:
As of 2017.3.4, you can add the shortcut by going to Settings -> Keymap -> Main Menu -> Window -> Editor Tabs -> Split Vertically/Horizontally.
This still applies as of version 2019.2
You can split the editor window but I'm not sure if that's what you were asking.

Monodevelop: can't drag widgets

I am trying to use monodevelop. Just at the beginning I came across an issue:
I was following a tutorial on building a Gtk application (http://monodevelop.com/Stetic_GUI_Designer). I was trying to drag a button from the Widgets Palette. Nothing happened. I'd been trying quite a few times without any luck.
After a break I launched monodevelop again and I simply placed a button on the window of the application. After that I removed it, dragged VBox container, and placed menu bar on the window, according to the tutorial instructions. I was pleasantly surprised.
By the second try the same problem occurred - I was not able to drag any widgets. Dragging was beginning, there was a “+” sign at the cursor and then - nothing was happening. I cannot figure out what happened by the first time, what the difference was. Have anyone had a similar problem? Monodevelop looks promising, but I can't go on with it. (I tried placing 'Fixed' container on the window, with no result - I could not drag it.)
(monodevelop v. 2.4, ubuntu 11.04, Polish language.
I did look for an answer to my problem, without much luck, that is why I post this question. The problem is described quite precisely. There is a probability that others encountered the same issue.)
You need to drag a container on the form first before you can add widgets to it. The VBox container is an example of a place where you can put your widgets.
If you want to place widgets where ever you want you can use the Fixed container. If you want things to align you can use the VBox, HBox or Table containers. Placing in a widget in one of the fields will automatically adjust the size of this field to fit the widget you have dragged into it.
So basically,
Create a form
Drag a container on the form
Drag a widget inside the container.
These widgets are not to be confused with the custom made widgets (in your Solution browser, right click the folder User Interfaces and click Add Widget...). These are like forms. I use these to create GUI's in advance so I can call these while the program is running.
FYI: if you want to create code for a widget (like a button) you can't just double click it like in Visual Studio. You need to select it, the go to the properties pane, and change the tab from Properties to Signals. You can then double click the "signal" to create the event for which you want to create code. For a button this is usually the Clicked event (somewhere at the bottom of the list, you'll need to open the Button Signals)
You can always visit the IRC channel of Monodevelop on irc://irc.gimp.org/monodevelop (IRC.Gimp.org #monodevelop)
I also sit in this channel and can help with smaller problems and I also still use Monodevelop 2.4.

PyGTK: Packing widgets before tabs in a gtk.Notebook

Basically, what I want to do is put some buttons before the tabs in a gtk.Notebook. I tried making my own notebook type widget and it worked well, but it would have required lots more work to make it as flexible as I would like, also it wasn't as efficient.
Here is a mock-up of what I'm trying to achieve: http://imagebin.ca/view/84SC0d.html
Any ideas would be much appreciated, thanks.
Ben.
You might be interested to know that this functionality has been added in GTK 2.20, see "Changes in GtkNotebook" in the following announcement: http://mail.gnome.org/archives/gtk-devel-list/2010-March/msg00132.html
It's a hack, but you can put your widgets on a separate tab, and then prevent the tab from being clicked by registering the following switch-page event for the notebook:
def onTabsSwitchPage(self, notebook, page_notUsableInPython, pageNumber):
# Don't allow to switch to the dummy tab containing widgets
if pageNumber == <put correct tab number here>:
notebook.stop_emission("switch-page")
Note that this doesn't look good with all GTK themes, but it works...
I don't think there's any way to do it without making your own notebook widget. There are a couple of hacks. One was posted by AndiDog. Another is to hide the tabs altogether (notebook.set_show_tabs(False)) and make a toolbar with buttons above the widget, with your buttons on the left, plus one button for each tab in the notebook that switches to that page.
Instead of making your own notebook-type widget from scratch, you could inherit from gtk.Notebook, overriding some of the methods like expose_event, size_request, and size_allocate, in order to deal with two types of container children: pages and buttons. I don't know how to do this in PyGTK though, only in C.
You might also consider whether the buttons in the tab space are really what you want. What if the user resizes your notebook small enough that some of the tabs disappear? Where do the previous tab/next tab arrows go? What happens to the buttons?

swing: saving dialog box resize dimensions

I have a dialog box with a bunch of dimensions that a user can change by moving/dragging, including a JTable with resizable/draggable columns.
What I would like to do is to make the state of these resizable columns / dialog boxes / etc. persistent, so the next time my application starts up, the user doesn't have to go through the resizing step all over again.
What's the most convenient way to do this?
You should probably take a look at the code in (the now probably dead) JSR-296. A part of it was focused on persistent session state, and I know for sure that the code for persisting window locations and such was already functional and in the basic framework. It should either already do what you want, or provide a good starting point.
Cfr. dev.java.net site for JSR-296