Scrollbars from ultragrid disappear when dock=filled - winforms

I'm writing a windows forms application with an ultragrid.
For layout reasons I'm using the dock property. When I put this property on none (from the ultragrid) the scrollbars are displayed.
When I put this property on fill the scrollbars are gone.
Does anyone know how I can fix this?

I've found an answer on the infragistics forum.
The problem was that other controls on the form where displayed in some way over the ultragrid (allthough it didn't look like it).
The solution is to rightclick on the ultragrid in the form and then select 'bring to front' . The next time i ran the application the scrollbars where there.

Related

XamDataGrid XamTabControl WPF MVVM Peculiar Behavior

I'm facing a problem in implementing the following scenario:
When the user selects a record in a XamDataGrid, the control flows into another tab showing the details of the selected record.
The way I have done this is:
At the selection change of the XamDataGrid, I'm sending index of the tab to be activated using MVVM Light Messenger.
Setting the property bound to the Seledted Index of the Tab Control to that number.
Everything works smooth till here. Afetr that if I go back to the tab containing the grid, somehow the control comes back to tab which was activated.
As if, some intrinsic selection of cells in happening in the grid. Does Hover also affects the selection of the xamdatagrid?
I'm new to Infragistics and kind of confused. If some one can help.
All code are in View Model files and no code in the code behind of xaml file.
Cheers,
Anshuman
I played around a lot.
But the only way to get this wqorking was to disable all hover animations and effects.
Now it works as expected!

application crashes while scrolling long list selector

I am using a longlistselector control in my WP7 app, to show some products, the problem is that when i scroll to the last few items at the bottom , the application crashes .
Any idea why it is happening?
This is because longlistselecter was used inside a scrollviewer , i removed the scrollviewer and it worked.
I had the same problem, although it wasn't in a ScrollViewer, it was in a Grid. Removing it from the Grid resolved the issue.

How to make popup grow up in silverlight?

I'm having a problem with combobox popup (not sure if it's a problem of combobox). First when i click it, dropdown popup opens correct - upwards(there are about 50 items in it, and combobox is located in the bottom of the page, if it goes downwards, there would be only 5 items visible). But then if i select any item, and them open it again - it will open downwards and put items in a scroll. So how can I fix this and force popup open in the desired direction?
Are you setting the "MaxDropDownHeight" at some point? By default it is infinity but maybe setting to hard # greater than # in combo box might help.
Also I just tested this in SL4/Firefox and the combo box pops up each time (with or without a selected item). What version of SL are you using?
Well, what I've done - I subscribed to SizeChanged event of the Border element which is a child of Popup.Child canvas. In that method, I'm calculating space below and above the combo box and then setting Top offset using Canvas.SetTop method to that border and it's MaxHeight. Maybe I will post some code later.
I was having this exact same issue (actually with Silverlight 5, but the same behavior nonetheless). I tried various things with MaxDropDownHeight but that did not correct the problem.
#Walker the approach you mentioned in your answer sounded promising but I was not able to tell from your description how you actually implemented that.
In any case, I found a rather unlikely solution. I discovered that if I populated my ComboBox with ComboBoxItems instead of a collection of custom objects, then the dropdown/selection/direction issue does not occur. I've posted an answer here that goes into a little more detail.

Silverlight Docking Control

I wanna do Docking control at run time, and set a splitter between the docked control and the others exactly like Visual Studio. I don't know what is the best option, I'm thinking about: changing it's grid row the control where (when dock the control to bottom change the control to the bottom row of the main grid), I tried to change the control's row from 0 to 1, the control then disappeared??!!
Any Help???
Thanks
In the silverlight toolkit you have a DockPanel that works kinda like "Forms". But everything is Xaml though :).
http://silverlight.codeplex.com/releases/view/43528
If you are new to Silverlight it may be a little difficult to understand the Grid control at first (I went through that myself), but it is really powerfull and flexible. Take the time to clearly understand all its features. I personnally never use the DockPanel.

Is it possible for WinForm controls (Panel,etc.) to grow like a webform control?

I'm converting an app from ASP.NET WebForms to WinForms. There is one asp.net page which contains a ListView/Repeater that contains several custom controls, which in turn contain a ListView with other custom controls. Basically the layout looks like a TreeView, but on each node/leaf there are few controls like comboboxes, etc.
When this is in ASP.NET, the page automatically lays itself out, so it is several screens tall - if I add 20 buttons into a Panel, it will grow and the browser will get scrollbars.
I'd like to do the same thing in a WinForms application - so I'll have a user control that will contain a lot of controls in a some variation of Panel (Flow, Table layout), and the controls might have another controls inside them, etc.
The problem is, that when I make winforms app, each control has specific height in the design time. I'd like some user controls to be able to grow with their contents - so they'll add up. In the main Form, there should be a vertical scrollbar, just like in the web browser when the generated page is taller than the screen.
I'd just like to get some general pointers in the right direction. Thanks.
Use Anchor and Dock container properties.
Yes, to expound on Anchor and Dock...try this
-Place a Panel on an empty form, and set its dock property to Top
-place a textbox in the panel, and Dock it to Full...it should fill the whole top panel
-Place a splitter on the form, and if not already docked correctly, set its dock to top
-place another panel below the splitter, and set its Dock to Fill
-place another textbox inside the lower panel and fill it as as well
Now you have a form with two resiable textboxes and will resize when the form does.
*you may have to set the textbox MultiLine property to true but not sure.
Hope this helps.
Anchor the controls to the parent. Anchoring all four sides will cause it to stretch.
If the Anchoring and Docking answers don't work for you, there is another option. It's not pretty, but you can access a control's properties and change them dynamically during runtime. You'd do something like: if(listBox.Items.Count > [yourVal]) listBox.height = [yourFormula] or something.
It's been a while since I've done a Win Form (and I don't have my IDE fired up at the moment) but I'm pretty sure there's even a ScrollPanel or other scrolling control that you can set on your form.
That said, when you're working with WinForms, the less scrolling you can make your users do, the better.

Resources