What control should I use for this UI? - c#

I'm relatively new to WPF, so could anyone give me some guidelines on how to build this UI (it's main panel of Paint on Windows)
I prefer code style over XAML (just for the learning purpose), so a general idea on what controls should be used would be more than enough, I can handle the detail of each element.

There are online templates. I think that you are searching for Ribbon Control Template.
Then, Codeproject has a great article about this.
You can check this msdn article, too.
In these links you have a lot of examples.
To use it you will create a new project with an online template, like in the image bellow (you see: it's selected WPF Ribbon Application:

That is a Ribbon control.
You can check this out: Introducing Microsoft Ribbon for WPF

Probably want to use the Ribbon Control? http://www.microsoft.com/en-us/download/details.aspx?id=11877

When I had the same question in my mind, I did an analysis of all ribbon controls and collected their links.
Here are they
http://fluent.codeplex.com/
http://wpf.codeplex.com/wikipage?title=WPF%20Ribbon%20Preview&ProjectName=wpf
http://www.microsoft.com/en-us/download/details.aspx?id=11877
Code Project Links:
http://www.codeproject.com/Articles/24062/A-Demonstration-for-WPF-Ribbon-Control-Library
http://www.codeproject.com/Articles/23199/WPF-C-Ribbon-Control-Library
http://www.codeproject.com/Articles/23343/A-Graphical-WPF-Ribbon-Control-Builder

Related

How to make custom form control in c#

I was trying to do something in visual studio the other day when I realized, if I could just make a form control to do it for me it would be allot easier, except I have no idea how to do that, I want the form control to have grids, each square having its own color property, if anyone knows how to make form controls, or even better knows how to make something like what I just described, I would be very happy :D
This MSDN article is a basic step by step outline of how you can write a customer control.
Unfortunatly MS has not figured out how to do avoid link rot -- so you may need to search creating custom winform controls to find this if you come in the future.
You are usually best servered by subclassing an existing control and customizing it.
You might also find some of the freely available winform control projects a gold-mine of useful info if you get serious about this.
However, it sounds likely what you should consider doing is creating a "User Control", this is usually simpler for a composite of few existing controls. This
article on the types of controls for winforms may be a useful overview for you.
Beyond that you really should use S/O if you are trying to resolve a specific problem you are having when you are coding. Google is a more appropriate tool for finding tutorials, etc.
1) Inside your project: Solution Explorer --> Right Click the .csproj --> Add UserControl
2) Drag and drop gridBox or any control you want into your custom control.
3) Check the ToolBox, your custom control should be located at the very first selection

How to find all WPF controls definition and usage examples?

Where can I find a reference for definitions and examples of all WPF controls. I'm new to WPF and much confused with the usage of majority of controls (such as canvas, stackpanel, winformshost, wrappanel, dockpanel, contentconstrol.) In WinForms, we didn't have that many controls. Googled for wpf control definitions and usage, but found nothing.
Start here: Windows Presentation Foundation for general WPF information.
For info specifically on controls: Controls by Category
The msdn site is probably your first best option to find out about WPF.
MSDN Control Library is always a good start.
I also found this site useful when I began using WPF.
Please visit the link
http://wpftutorial.net/Layout.html
Here you will find the code samples as well as the explanation.

How to create Tooltips like MS Office 2007/2010 in WPF

How can I create complex ToolTips for my WPF RibbonItems like I have seen in MS-Office 2007/2010. A Sample image is given below.
On MSDN I got an image just like that but MSDN does not tell us how we can create it.
If anyone can help me in making Tooltip like MS Office I will appreciate it.
Thanks in advance.
As you can see in the documentation there are several properties on a RibbonButton that refer to parts of the enhanced tooltip:
ToolTipDescription
ToolTipFooterDescription
ToolTipFooterImageSource
ToolTipFooterTitle
ToolTipImageSource
ToolTipTitle
Come to think of it, those are the exact properties mentioned in the screenshot you have there.
You can download Ribbon Sample code.
If you are beginner start with this very comprehensive tutorial Creating a Ribbon Application
Specifying Ribbon Image resources
Also I would recommend to read this: Understanding Commands & Controls
For more specific issues you can find quick help in MSDN Ribbon Forum
Hope it helps!

How to programmatically add a RibbonTab to WPF Ribbon (October 2010 release)?

Does anybody know a way to programatically add a RibbonTab to a Mircosoft WPF Ribbon? I can't find an example or at least a property to use in neither documentation nor Ribbon's intellisense.
I found many entries all over the web suggesting something like: ribbon.Tabs.Add(...)
Unfortunately "Tabs" doesn't exist in the Ribbon class at all?! Was there an API change I can't find anything about or what's the trick?
The Microsoft WPF Ribbon inherits from Selector, which inherits from ItemsControl. With that in mind, to add a tab programmatically, you would use the Items property to add the new RibbonTab object.
For example,
Ribbon.Items.Add(new RibbonTab())
I haven't used the Microsoft WPF Ribbon much so I'm afraid I don't know, but I can however recommend the Microsoft Fluent Ribbon; I've had a lot more success implementing it, and found it significantly more flexible and intuitive...it's on the codeplex site if it's something you're interested in (presuming you haven't gotten too deep using the MS WPF Ribbon) - fluent.codeplex.com
Hope it helps,
Aj

Suggestions for a C# custom tabcontrol?

Has anybody got any suggestions for a custom tabcontrol implemented in C# and which adheres to these criteria:
Allows the tabs to be placed along the side of the control.
Tab text must read horizontally.
Allow custom colouring.
Open source or no cost.
I prefer not to get my hands dirty with ownerdrawing if a solution already exists.
You probably don't have a need for this anymore but anyone else who stumbles upon it might find it useful.
I found this tabcontrol on CodeProject it is also very easy to Draw your own tabs with it, they even give you a example on the site.
Y(et)A(nother)TabControl
A couple more tab controls.
TabStrip Control
TabStrips: A TabControl in the Visual Studio 2005 way!
The tab control in WPF fulfills all of your requirements. You can override the template and go to town on it.

Categories