My situation is this:
We have a WPF application using a WPF ribbon(http://msdn.microsoft.com/en-us/library/ff799534(v=vs.100).aspx). We have a scenario where we use both the RibbonComboBox as well as "normal" ComboBox in the ribbon, where the ComboBox is referenced via a ControlTemplate.
The issue we have, is that the default ComboBox style is different to the RibbonComboBox style, which is a bit of an eyesore. How can we determine what the Style / ControlTemplate of the RibbonComboBox is so that we can apply the same / something similar to the "normal" ComboBox, without having to go and scratch around in the MS code.
If gone through MSDN after MSDN article and I've scoured stackoverflow and nowhere can I find this info?
Thanks!
Use the following link for getting style of your RibbonComboBox using Blend.
http://www.jeff.wilcox.name/2010/08/using-blend-to-find-default-style-xaml/
Related
This may seem familiar to you but I have a problem creating a custom List Box with custom style as well. I can only do one of them at the same time... I can't use both. and another thing is that could you tell me how to add the custom listboxitem in c# code so I could easily add it to the program?
what I mean is that for example if you put an image before the text of listboxitem and then give it an style, but all thease must be done for all items.
thanks to all
First, what have you already tried out? Are you expecting SO users do the work for you?
Listbox tag has a ListboxItemTemplate. For that you can implement a DataTemplate has a StaticResource and put whatever you want inside.
Check the documentation on MSDN.
https://msdn.microsoft.com/en-us/library/system.windows.controls.itemscontrol.itemtemplate(v=vs.110).aspx
I need a custom control element. I prototyped it and here it is on the picture. I think it is pretty self-explanatory. Could anyone suggest me how to organize it? I am not a WPF guru so if it will be working solution I'll better use it instead of doing by myself.
Sadly I can't post image, so it is here: http://imageshack.us/photo/my-images/521/control1.png/
Should I use datagrid with custom templates?
If so my question is how to populate row cells with custom contols and how to handle events on this controls to operate the RowId number?
How to apply custom templates for any individual cells? I found articles where templates applyed only for entire grid or column.
If anyone can help with this I would really appreciate it :)
I would suggest you to use ListView in grouping mode (with styles and templates)to accomplish this. Here are few samples doing similar to what you want to achieve -
ListView with grouping (In GridView mode)
Empty groups in WPF ListView
MSDN is also having one sample for this -
ListView Grouping Sample
I would personally use a TreeView. If your classes are already grouped properly ,you can then use HierarchicalDataTemplates to define how the TreeView works with each type. This will involve templates and triggers. Really, this will be mostly xaml, with very little event coding.
How do I set / change the item selection color in XAML for a WinRT GridView control? I've tried looking around, is there also a procedure for doing it visually on Blend for VS11?
I've looked at GridView.ItemContainerStyle tag and I couldn't find much help online.
There was an earlier question that was asked about disabling tap visualization in a GridView that might help you.
Extracting the style of a GridViewItem is not available on the GridView itself, so if you want to do it yourself - you need to put a GridViewItem control separately in some page/user control and use the designer tool to edit the template. Or you can just use mine from that other question. I think what you would need to change is the use of the ListViewItemHighlightBrush in that template.
I'm trying to style some wpf user controls to make them look the same i have in my web application. I found some really great example for every control i need except for sliders and radio buttons.
Here is how they should look like:
Slider:
Radio Button:
I know i should create some ControlTemplate but i don't really know where to start...
If you can provide a complete example it would be perfect, but i guess that even some good deep advise would fit my needs.
Thank you 1000!
I have style sample here. It renders this:
I would start with Control Styles and Templates on MSDN pages. There are examples for most controls which give a good overview of how the control template works. Also you can extract/download the original control template and try to make your changes to it. Download default control templates
P.S. Actually the slider example on the first link resembles the one you describe.
Try using Expression Blend.
Learn Expression
and specifically this video: Creating ControlTemplates.
Expression Blend is something like a XAML design application - you can size, colour, adjust fill and stroke etc on all the elements in a control. It takes a little while to get used to, but you will be able to design controls with a graphical UI and Expression will provide you with the appropriate XAML to use in your project.
I am not worried about whether this is in Winforms or WPF.
Is there ANY way at all that I could develop my own user control like the one found in Microsoft Paint, below:
If you can't see the pic above, it's here: http://img232.imageshack.us/i/txtboxlblctrl.png/
Is there anyway at all I can do something like this in C#?
Thank you
Sure you can. By developing your own Usercontrol you can do nearly anything.
I think the easiest way would be to use a WPF TextBox and alternate it with a template.
This [http://img199.imageshack.us/i/textboxu.png/] is what you get by simply using [http://img163.imageshack.us/i/stipe.png/] as BorderBrush