Drag and drop between treeview in uwp - drag-and-drop

I want to drap items from one treeview to another treeview.
I want to use this control TreeView from this link https://learn.microsoft.com/en-us/windows/uwp/controls-and-patterns/tree-view. Whenever i drag control from one treeview to another treeview it throws exception. How to use this control as drag and drop item between treeviews.

Dragging and dropping items between TreeView is not supported in the reference implementation.
The sample supports:
N-level nesting
Expanding/collapsing of nodes
Dragging and dropping of nodes within the TreeView
Built-in accessibility
For more information, please see Hierarchical layout with TreeView.
If you need this feature, you may try to implement your own tree view.

Related

UI5 Generic Tile with filter functionality

I have Generic Tiles in my UI5 App. My requirement is to implement the functionality of Icon Tab Bar - Filter (https://sapui5.hana.ondemand.com/explored.html#/sample/sap.m.sample.IconTabBar/preview) for these tiles. I have separate tile for each status and on clicking it should display the list in the table depending on the clicked status eg: 'completed tickets'.
The table and the tiles are in different views. If this is possible please provide suggestions as to how this can be accomplished.
Thanks,
Srinivasan
You could follow the example of the IconTabBar almost literally, and just swap the icons for tiles.
When you press an icon in the IconTabBar in the example, the logic connected to that icon will add a filter to the binding of the table. You should do the same: the logic connected to your tiles, should also change the filter of the table binding. Every tile could result in a different filter to the binding. With that, you would see the table filtered based on the tiles you clicked.
With your table being in a different view than the tiles, you may want to use the router to communicate between the two views. You could e.g. have tile one to navigate to /YourApp/#/Stuff/FilterBySomething and tile two to navigate to /YourApp/#/Stuff/FilterBySomethingElse. In the view containing your table, you should then pick up the filter info and add the filter to the table binding accordingly. More info on how this works can be found in Step 31 of the SAPUI5 walkthough.

How to disable nodes in JFace CheckboxTreeViewer?

How can I disable a tree node in a CheckboxTreeViewer? Basically what I want is whenever a parent is selected in a check box tree all its children should be disabled and should not be possible to select. Also all the children should get unselected if any of them are previously selected before disabling them.
Any ways??
This isn't really supported by the viewer.
The best you can do is use the addCheckStateListener method to add an ICheckStateListener which reverses any unwanted check actions.

Scroll to the dropped object when it's released outside of the current view of a GEF editor

I have a GEF editor with draggable figures. I have overriden the createChangeConstraintCommand of the main EditPart's XYLayoutEditPolicy.
This allows me to easily move (drag and drop) the figures.
The problem is, that if I drag one of them outside of the current view, although the scroll appears and the figure is moved, the view does not automatically scrolls to the dropped object.
Any idea how to implement this "auto-scroll" functionality? (It would be even nicer to have the "selected" (dragged/dropped) figure always visible in the view.)
Given the editpart object that has been dropped, you should use EditPartViewer#reveal(EditPart) method. Do this for example:
editpart.getViewer().reveal(editpart)

How to mimic Eclipse Preferences Windows in Delphi 2010 IDE

I'm new to Delphi. I really wanted to build a Preferences Windows in my company legacy system (which uses 'Delphi 2010' today) just like Eclipse's.
I could already mimic almost all the items:
Divided the whole screen in 3 panels (one at the left, one at the right and one at the bottom),
On TTreeView inside the left panel, and one TScrollBox on the panel of the right to be able to scroll things if they don't fit on the window for any reason (low monitor resolution or too much options). Even used a TSplitter between panel on the right and the panel on the left.
Here's what I could get:
My doubt is: what should I do to be able to load multiple options once an item inside the TreeView is selected? What delphi component should I use to mimic all this info in the right panel?
Make a frame for each page. This is kind of a "sub-form" that you can design visually. Create and destroy them at runtime in the appropriate event-handlers of the tree view.
Use a TPageControl. Add a TTabSheet for each group of controls you plan to have — one for each item in the tree control. Set TabVisible := False for each sheet to keep the tabs from appearing at the top of the page control. Each time an item in the tree control is selected, make the corresponding tab sheet visible by setting the page control's ActivePage property. Put controls on the sheets according to the preferences associated with that sheet's category.

Windows Phone Dev. Adding items to Pan-Page doesn't work

I have
<!--Panorama item one-->
<controls:PanoramaItem Header="Search">
</controls:PanoramaItem>
and what I simply want to do, is dropping some TextBoxes etc. into it.
But when I drop a Textbox (while the panorama item one-grid is selected), visual studio adds these form items outside the panorama pages, somewhere at the bottom of the XAML.
How can I add forms into the panorama item I decided them for?
A grid. I needed to add a grid, to store all my elements inside.