How can we change a Silverlight ComboBox writable like in Windows Form when we change the DropDown property.
I believe the closest you can get is autocompletebox
ComboBox in Silverlight does not have IsReadonly and IsEditable properties like WPF that allow it to be editable.
You will have to create a custom control or a user control to mimic that behavior.
Related
I build an UserControl which is localizable. The UserControl's Localizable Property is set to true and I have already a localized label on this control. I add this control to a Form. This Form's Localizable Property is also set to true.
At runtime this label is correct localized. But I like to have also a preview of this localized UserControl at Design Time when I switch the Form's Language Property.
Is it possible to have a preview of this localized UserControl at Design Time? If yes, how?
I want to use WPFToolkit DatePicker to insert date into my Combo box. By default, DatePicker comes with Text box for date. I know WPFToolkit has DatePickerTextBox Control for Textbox. I want to override it into ComboBox control. I don't know how to override this control.
I have a control which has some default parameters for date that is in combobox options such as One Year Ago, 2011, 2010, 2009, etc. When I select particular date from datepicker I want to display that date into combobox control.
I hope this question is clear.
You are not going to be able to override this control directly. The only suggestion I can make is to play around with ElementName binding between that control and the ComboBox SelectedValue property to get the desired behavior.
After that if you are really determined you can replace the default style template for the DatePickerTextBox control to hide the TextBox element and put your ComboBox wherever you want in the UI making it appear to do what you want.
I found Calendar Control in WPFToolkit. I am using Calendar Control in MenuItem control with Combo box by side. It will be same as DatePicker control but instead of Textbox I will have Combo Box with other options in it.
It served my purpose of having ComboBox and DatePicker.
Are there any default exceptions where wpf controls are not focusable?
My controls need to be all focusable, but I do not want to set everytime I create a control
make focusable="true"
In general, WPF controls work as expected with regards to being focusable or not. Things you can interact with such as button, list/items controls, textbox are all focusable. Non-interactive controls like TextBlock, Image are non-focusable. So normally, you don't have to deal with setting the value of the Focusable property. I'm not sure if this is what you're looking for but I hope this helps.
I am developing a Watermarked ComboBox by modifying the ComboBox ControlTemplate. Everything is fine when the ComboBox is not in an editable mode, but when I change the edit mode to True, the IsFocused property is never set to True. This is because in edit mode, the ComboBox is using a TextBox. This is an exact copy of this StackOverflow question: . There are no responses to that question.
Please drop a line if you know how to solve this, or please point me to links that provide a Watermark ComboBox implementation.
Thanks,
Rey.
You could try to use the IsKeyboardFocused or IsKeyboardFocusWithin instead
Try using the IsFocused or IsKeyboardFocused or IsKeyboardFocusWithin properties of the TextBox control which is within the ComboBox control. The TextBox can be found at e.OriginalSource(TextChangedEventArgs property).
It worked for me.
I have a design question:
If you had to make a WPF Combobox with search support,
(= combobox that shows a popup with some Buttons, Search TextBox, List.. etc
the selected item feed to the default's ComboBox TextBox.)
What would you do?
Write a custom control (diretly inheriting from System.Windows.Control)
Write a custom control inheritnig from Selector / ComboBox
Make a UserControl
Use a default ComboBox with a 'special Template' (CotnrolTemplate/Style ?) extended to search functionality
Use a default ComboBox with style and attached EventHandlers..
Thank you guys !
I have done that, and the method i used was option 2 - i did a template control inheriting from a third party combo, and replaced the popup contents with my own template.