I am evaluating Kendo UI web controls trial. My appliction used RadComboBox control. its Width still 100% on page and i can not change it.
I set the combobox width to Width="300px" but it still wide on page.
Related
I've been making a custom style for TabControls and TabItems for a program I'm designing, and would like to know if it's possible to have it so that if all TabItems in a TabControl have the property Visibility="Collapsed", the TabControl's TabPanel (where the tabs are displayed) can be collapsed or otherwise completely hidden. This is of course a default behaviour in TabControls, but since they're using a custom style (so they are no longer fugly, and are consistent with the theme of the application) this behaviour seems to have disappeared (likely because as of now I have the Height property set to a hardcoded value)... which brings me to my next point, the height of the TabPanel - when tabs are visible - should be several pixels more than the height of the tabs. Of course this makes using margins difficult, because that extra height should be removed if all TabItems are collapsed.
So to summarize, what I'm looking to do:
TabControl when any tabs are not collapsed:
TabPanel has a height of 26px (taller than the TabItems, which are 18px tall)
TabControl when all tabs are collapsed:
TabPanel is completely collpased/hidden, with zero height
Many thanks to any of you awesome people that can help me out. I've been working with WPF consecutively for long enough to fry my brain, and a simple solution to this problem escapes me (I need a break!)
Well nevermind!
This is what happens when you've spent too long working on stuff.
The solution was to give the TabItems a margin that gives the extra height above them, and then to set the TabPanel's Height property to Auto inside the TabControl's ControlTemplate. Duh!
I have an aspx page, with a div that I want to replace with a Silverlight application. The content inside this div is responsible for filtering some data, and is quite small (200 pixels x 200 pixels about).
One of the comboboxes in the Silverlight app that I made to replace that content, contains a long list of items.
If I expand that combobox, it only fills the space available to the Silverlight control, i.e. 200x200 pixels. Is it possible to have the combobox dropdown extend to outside the Silverlight control's confines?
You can use Silverlight in windowless mode (in this mode you can put html over silverlight) and use list from HTML which will be over Silverlight.
Silverlight combobox can't extend beyond the Silverlight area.
If the list of items so long, you can simply use scrolling in the combobox.
I have a silverlight expander control which wraps a grid. In the grid, I have a number of text boxes, combo boxes as well as some invisable (collapsed) text blocks. I also have an animation and when it is triggered the grid shows those hidden text blocks.
My problem is, when the hidden text blocks are shown after the animation is run, these text blocks push other controls down and because the expander doesn't resize itself, the controls at the bottom get pushed outside of the expander and become invisible.
I tried to call UpdateLayout() after the SizeChanged event of the grid but doesn't work.
Any suggestions on how to resolve this issue would be much appreciated!!
I actually have fixed this problem by myself. I discovered in the style of the expander control, a while ago I put an ExpandableContentControl instead of normal ContentControl because it has a nice animation when you expand/collpase it. But this control doesn't resize properly... (see http://silverlight.codeplex.com/workitem/4544?ProjectName=silverlight) I guess this is why the AccordionItem control is so buggy because it also has an ExpandableContentControl in it. As soon as I replaced the ExpandableContentControl with a normal ContentControl, the expander worked as expected. :)
The problems is because the expander always use the same width (or height), so you must recalculate the width of the grid by code and assign it to the columndefinition.
I have WPF ListBox that shows a lot of data. I need smooth scrolling, so I've set ListBox.ScrollViewer.CanContentScroll to False that disables virtualization. Now when I open the tab where this ListBox is placed, I see nothing for few seconds because ListBox is loading/creating items/rendering. I also have a control that shows some animation that indicates that application is running and user should wait a bit.
How can I show this control while ListBox is not available?
Add a Grid in the location of your list box and place inside it your ListBox and your animation control. This way they are placed in the same location. The animation control should be on the top of the z-order and so displayed. Once the ListBox has finished loading you would then hide the animation control and so the ListBox would show instead. Any time you need to perform another long operation you set the animation control to visible again.
Clean shutdown in Silverlight and WPF applications
Check how the author of this application did it via code maybe it can help you though it is different scenario.
I have a Silverlight form that contains a Stack Panel (orientation = vertical) with 10 rows. Each row contains a TextBlock and Textbox control except the last row has a TextBlock and Drowdown.. At the bottom of the control are two buttons. Previous & Continue.
There are 10 items in the Dropdown. When I select a value from the Dropdown, only two of the ten items are showing up. I believe that the remaining items aren't displying because there's some sort of clipping effect going on. Fair enough.
Does Silverlight allow the dropdown control to display upwards (instead of the default down direction)? Will I have to override some rendering capabiliities before the dropdown is rendered to the control or is there a property that allows me to accomplish this functionality?
The Silverlight ComboBox auto aligns the dropdown popup to always be visible whenever possible.
all Popup based controls (ComboBox, AutoCompleteBox, DatePicker and TimePicker) all have this feature enabled.
So if there's not enough screen real-estate below the ComboBox to show the dropdown popup, it'll show up above the control.
The combobox nesting in the visual tree should not affect the dropdown popup auto alignment. The internal Popup control (inside the ComboBox) ignores the Visual Tree and is nested "above" the visual tree.
If you have specific issues, please share minimal and relevant XAML. Since Keith is on this thread, I think it's safe to say he'll log a bug if needed.