I have a windows forms app (I don't have access to the source code) which has a control that looks like this:
On clicking the down arrow, the popup appears from which I can select.
Is this a standard control that I can use, if so which one is it?
If not, then what control comes closest to it?
As #Hans Passant mentioned you can simply add a DropDown to a ComboBox.
Here is a example from MSDN. If you dont want to do the whole thing prgramaticaly just add the controls manualy and check here to see how the databinding works.
Related
I wrote a user control for my project. Now I want to have a template for it where everything is moved around.
How would I go about doing this? I'm looking and it seems impossible? I see many paths on how to do this but what would be the best way?
Some ideas I have:
Rewrite the user control as a control so it can be templated
Create a second user control, but have it databind to the same viewmodel
You should take the first option. Rewrite the original control as "Silverlight Templated Control" borrowing from the original UserControl xaml to help you set up the initial default template.
Review the MSDN topic: How to: Create a New Control by Creating a ControlTemplate
This forms a good basis. However that example doesn't make enough use of TemplateBinding, in your implementation you should make wider use of that.
I started looking at wpf recently and am having a hard time wrapping my head around it. I have written plenty of c++ and c# but xmal seems a bit foreign to me right now. I have created a main window that has a grid. Within the grid i have a user control that i dynamically create buttons. Depending on which button the user presses the control should load another user control in place of the current control, kind of how a win7 phone would work... This is a desktop app not a phone app.. just wanted to give you an example of the desired result. I have looked at Pages and Navigation but i don't think this what i'm looking for. Can someone please point me in the right direction. Thanks
You could put a "ContentControl" in your Xaml
and than in your code change it's content, like:
ContentControl1.Content = new MyUserControl();
I'm once again turning to you since I can't find an answer anywhere else. I have a TabControl, but I want to get rid of the ugly orange bar on top of the selected tabs. I would also like to make the tab text BOLD when selected and NORMAL when not.
Is there any easy way to achieve that goal ? I don't want to use the Appearance Buttons or Flat Buttons.
Thanks for your help !
This appearance is controlled by the Visual Styles theme selected in your operating system. In general, users do not appreciate any program that ignores their theme settings, especially when they paid money for a custom one. But you can get what you want, you'll have to set the DrawMode property to OwnerDrawFixed and implement a handler for the DrawItem event. There's a good example to get you started in the MSDN Library article for this event. Just change the font assignment in that sample code.
I want to create a combobox with some style. I dont want old dropdown what we are getting. I want some new dropdown which looks very nice. Is there any way to create a dropdown like that.
Plz give me suggestions
Check this link out on msdn. This is the actual control template for the combo box. You can copy and paste this into your application (within your app's Resources).
Create a form and slap a combo box on it with some data in it. Then start changing the control template and view the results. Start off simply by changing colors and adding borders around elements to see what controls which part. Then you can start switching out larger parts of the template to match what you're looking for.
one can start with the standard combobox, and then use various controls and styles to change the look and feel of the control, and it's corresponding drop down.
does anyone know about a windows forms control that acts like the address bar of a browser?
it is just like a textbox, but to the right there is a dropdown menu that shows the history of previously entered text.
thanks a lot!
Look at properties "AutoCompleteCustomSource", "AutoCompleteMode" and "AutoCompletesource" on TextBox class.
You can use a ComboBox for this. Just add the previous entries to the item list. If what you actually want is AutoComplete, the WinForms TextBox control supports that natively.