Keep constant order of tabs on DXTabControl - wpf

Is there a property that prevents the DXtabControl from changing the tab items location when a tabItem in selected?
Right now whenever I select a tabItem it is moved to the bottom of the "stack".
I find it confusing.
My tab control has more than one row of tab items.
TX

DXTabControl has a FixedHeaders attribute you can set.
You can give this a try:
<dx:DXTabControl>
<dx:DXTabControl.View>
<dx:TabControlMultiLineView FixedHeaders="True"/>
</dx:DXTabControl.View>
</dx:DXTabControl>

Related

Compatible value's position in an editable ComboBox

I have a ComboBox implemented with an auto-completion system. My ComboBox contains more than 100 items. When users are typing text in, the auto-completion system opens the dropdown list and highlights the most relevant item. Moreover, when the dropdown list is expanded, all items are available (no filters). But the most relevant item is always at the bottom of the dropdown list.
I would like it to be in the middle, if possible. One item can have the same reference but another type than another one, that's why I need to see most of them in my dropdown by placing them in the middle.
Any idea ? It's not really important but kind of useful for them. Thanks !
Update :
Here's my ComboBox with the open dropdown. Sorry about that, I had to blur its elements. As you can see, the user starts writting the reference in the ComboBox. The autocompletion works fine, but the corresponding item is found at the end of the dropdown list (in the red frame), almost out of bounds.
I wish it would be highlighted in the middle of my dropdown list instead of so far below.
Your item search may work well, but your list isn't visually filtered, which means it's size always remains the same.
It's scrolled into view, by the wpf system, but still displaying all other items around the relevant one. The reason why it's at the bottom is because wpf Scrollviewer just finished scrolling the item into view and sees no need to scroll it further into the middle.
You could use the CollectionViewSource class. Why ?
It's simple to use, will keep your viewmodel data as it is, and you would have your relevant completion item at the top. It can be obtained by GetDefaultView(..)
Let's say you have a viewmodel flag "IsHidden", stating that it's content does not match the user input:
ICollectionView cv= CollectionViewSource.GetDefaultView(myComboBox.ItemsSource);
// switch filter on
cv.Filter = obj => (obj as myViewModel).IsHidden == false;
// switch off
cv.Filter = null

Silverlight tabcontrol, how to Keep the current selected tab selected

I have a tabcontrol which i put inside a dataform that is bound to a collection. if I am on page 1 of the dataform and i select tab 2 of the tabcontrol, when i navigate to page 2 of the dataform the tabcontrol default the selected tab to the first tab. I am using MVVM. So, my question is how do i keep whatever tab was selected to stay selected when I am paging thru the dataform records. Thanks.
Its unclear to what exactly is your tabcontrol selected tab bound.
if its bound to a some value on object from collection that you are paging through its quite obvious it wont be saved, because it would mean whenever you change tab index you should update entire collection to same index, so when you tab to next item it has same tabindex as previous item had.
You can do this exactly I guess. or post more code so we can find a better solution.

How to make the listbox rows not able to be selected?

The image above depicts a ListBox. You can see the rows are able to be selected. However they should be not selectable when i click on the row, but i have no idea on how to solve this problem.
My question is, how to make the listbox rows above not able to be selected?
The easiest solution would be to use an ItemsControl instead of a ListBox. It's a similar control that doesn't allow selection.
You can retemplate the control, removing the selected state animation. Easy to do if you have Blend.
Right click on the ListBox, select Edit Additional Templates | Edit Generated Item Container | Edit A Copy. Switch to the States tab and choose the Selected state. (For Silverlight) you should see that the Rectangle "fillColor2" has a red circle, showing it's Opacity property is animated in this state. Expand fillColor2, click Opacity, and press delete. You can also do the same for the Focused state (and MouseOver state, if you don't want a mouseover effect)

silverlight combobox - highlight a few items in the popup list

I'm wondering if I can make fake sections in the popup menu:
The rule would be, if the 5th character of the displayed item is different from the 5th char of the previous item in the menu, it has to be highlighted
What do you think?
Thanks!
To achieve this would be a hack.
Normally the items that appear in the popup part of a combo box will be an instantiated data template, and each gets its own data item and has no clue or knowledge of the other items in the list, so you couldn't use a converter or anything else to achieve this behavior.
What you could do though is inject (attach) your own control into the popup part of the combo box, and take over the rendering of the data items. How you do this will depend upon which combo box you are using (i.e. MS or some other vendor's) and would be a whole new question.
Would that be easier if I were to create my own combobox as follow:
a TextBox associated with a Button that when pushed would popup a datagrid in which I could implement this conditional formatting?

Winform and Tab?

When setting up a Winform with textbox controls, and going to View Tab Order -
how do you indicate when you are done setting tab order and want it to be saved?
Is there any other way to set the Tab Order of the controls on the form?
When you are finished, click the tab order again or press Esc.
You can set the tab order using the Tab Index property either in design mode or at runtime.
To indicate that you are done, hit ESC.
You can change the tab order by setting the TabIndex property on the controls themselves
When you begin setting the tab order you klick the tab order button. When you are done you click it again to disable it.
You can set the tab order number in each controls properties sheet or at runtime via the TabIndex value.

Resources