I have a WinForms app (with DevExpress v 10.2).
I have to resolve the following task. I have a 'child' Form - it consists of several Controls and may be encapsulated into a Control; let's call it 'child Control'.
I need to create a 'parent' Form that contains series of the 'child' Form instances. The 'children' are located in the Parent Form from top sown to the bottom. In other words, every 'child control' occupies the whole width of the Parent Form; 1st 'child control' is located at the top of the Parent Form; 2nd 'child control' is located below the 1st one etc.
Count of the 'child controls' mat be dozens, so the Parent Form should have vertical scrolling.
What is a best way to implement this - using standard WinForms controls, or maybe DevExpress WinForms controls?
Look at FlowLayoutPanel or TableLayoutPanel. Either will do what you suggest.
Related
In Windows Forms, I would like to show relationships using lines to show a connection between two forms inside an MDI parent similar to MS Access' relationship diagram.
What are my options for drawing lines underneath the children (or on parent background)?
If you are going to use MDI then what you would need to do is handle the Paint event of the MdiClient control that hosts the child forms. It's not actually exposed directly but you can access is via the Controls collection of the parent form. It will be the only child control of that type and, in most cases, the only child control. You can then use GDI+ to draw lines between the appropriate pairs of forms.
So i need to know that if a wpf window has got say 3 grids and we have a user control that we can drag. So when i drag it over the grids. Does the parent/child relationship changes every time i drag it over different grid?
I would say no, however that depends on your Drag/Drop implementation
Usually when dragging an item, you're actually just dragging a placeholder of that item in the Adorner Layer. The actual item may or may not get removed from the original parent. The item doesn't actually get added to the new parent until you release the mouse and the Drop method occurs.
When I implemented some custom drag/drop in the past, the item got removed from the parent control on Drag, and on Drop it got added to a new parent (either a valid drop target, or back to the original parent)
I want to change the view inside stackpanel based on what user clicks from the menubar. What's the best practice to implement this?
There is no exact equivalent, but same functionality can be achieved with several containers from WPF:
with a Grid (putting all the controls inside the Grid without specifying a row or column for them and implementing a mechanism wich only allows once child to be visible at any time)
with a Custom Control derived from Panel and a Property specifying which is the active (visible) child from its children, etc.
Sounds like you could use a TabControl with the Header set to nothing
How should I go about customising the AutoCompleteBox in Silverlight so that while typing I can filter multiple Selector ListBoxes. Basically I want a Popup that contains 'n' ListBoxes vertically stacked and when I type, the filtering operates on all of them simultaneously. I can then select an item from any of the ListBoxes.
Thanks in advance for any guidance you may have.
Beks
Had to go with a custom control in the end, inheriting from Control. The control I created contains a textbox and popup that contains multiple listboxes that are updated as i type in the text box.
I have a silverlight control that has a few element such as: Image, TextBox and a TextBlock.
The application shows a list of the same control and the controls are placed in a specific layout, in grid with rows and cols.
Now,
I would like to be able to modify all the controls layout and arrange the element differently (preferred animatedly) without reloading the control.
Does anyone know how to do so?
Thanks,
Ronny
Use the States pane in
Expression Blend 3 to define different
layouts.
Use the GoToStateAction for the objects/events that you want to trigger the change or call VisualStateManager:GoToState(this, "NewState", true) from your code behind to switch layouts.
Use FluidLayout (the wave-shaped first button first for the State Group) to animate the change from one grid col/row to another.