Create multi-view control in windows form - c#

When using ASP.NET I was often using MultiViews,Is there a control that can be used in a C# Windows Forms Applications like MultiView, I try Tab control can help to do that but if any other control to make multi-view without using Tab control

There is no controls "from box", that you need. I can recommendate to you use WPF technology, if it's possible by your business requirement. WPF contains feature like Data templates selector, which can solve your problem.

I ran into this same problem and just implemented my own, using Panels

Related

C# Combine WinForm with WPF

I created a grid splitted to two columns in WPF.
Then i need to access this grid in WinForm ( need to insert objects that created in WinForm inside the two columns).
How do i access the grid from WinForm?
Note: I have the handle of the window from the WPF:
ActiveMapCoreView = new MapCoreView(**Handle**, strPath);
Thanks! (:
If you want to mix winforms and WPF, you can host the WPF control in a winform using ElementHost Class.
You can find an exemple here
You can mix WinForms and WPF using an ElementHost. This walkthrough guides you through the process. This question and this article are worth looking at too.
On a related note, if your UI is predominantly WPF/WinForms it may be easier, and more consistent, longer term to port everything across into that format.

Windows Forms Application C# Style

I am developing a Windows Form Application in Visual Studio 2008 (C#)
And I want to add Style to the items.
I have been investigating a few ideas about it but I have not found an example about how to do it. Is it really possible?
My app looks like:
But I really want to add more style in buttons, textboxs and other items I have:
My boss insists on using Visual Studio 2008.
To do this without purchasing anything else, you could create your own custom button and text box controls, either from scratch or as controls derived from the existing windows forms controls and then overriding OnPaint etc. Take a look at what's been done here:
http://dotnetrix.co.uk/button.htm
You could also investigate third party options.
Or, use WPF if that's a possibility as others have said. I'd push for WPF! If there's an existing WinForms Code base you can always host WPF Elements in WinForms. See:
Walkthrough: Hosting a Windows Presentation Foundation Control in Windows Forms
IF you wana to use Winforms than you have to buy this one for example:
http://devcomponents.com/
You have to bind the new assemblies in your application that is not a lot of work!
But better way do that with WPF
http://wpftutorial.net/DataGrid.html

Own controls similar to TextBox in C# Windows application

Create own TextBox, Button etc control as own control using User control in C# Windows application, is this good idea?
I wanted make consistency for through out the application. Suppose if I want to change the Textbox border color then all forms textbox updated with this changes. It's just an example.
Please suggest me.
I don't recommend using UserControl just for consistency. If application skinning is what you are after, look into WPF. It makes it relatively simple to skin an application (or even a window, or smaller groups)
Here is an article on skinning with WPF: http://www.codeproject.com/Articles/19782/Creating-a-Skinned-User-Interface-in-WPF
Another alternative, staying within Windows Forms, is creating a class that inherits from TextBox, and using that class throughout the application. The Factory pattern would work well here. You could even adapt it to multiple skins.
It's not a bad idea to provide custom controls that match your "User Experience" (UX). It really just depends on what you are trying to accomplish with your program.

Can ASP.NET Page use WPF Controls?

I was wondering if ASPX page can use WPF Controls (from the toolbox in the designer)?
Because I have a custom user control that I made for a application before but now i am creating a web app. In the web app the controls were grayed out.
I was wondering if there is a way to use the user control in the web app?
Unfortunately, you'll have to create a new ASP.Net control that mimics your WPF control. The two technologies have completely different approaches to rendering (DirectX primitives vs. HTML), events (Routed events vs. Postbacks), etc. and are simply not compatible.
That being said, converting a WPF control to a Silverlight control is doable, and would allow you to leverage your previous work. You would still need to run it through a Silverlight app, though, rather than directly through the ASPX page.
ASP.NET is primarily a server side framework and WPF applications run on the client, therefore they don't really work well together. You might find it easier to convert the WPF control into a Silverlight control instead and pass that through your ASP.NET page. Users will need a Silverlight plugin to run it.
These two posts might help in the conversion:
Porting from WPF to Silverlight: The Missing Pieces, Part 1
Porting from WPF to Silverlight: The Missing Pieces, Part 2

How to skin UI using Forms?

I'd like to know if is there a way to "skin" a Form and every widget used inside it. Images should be on background and other elements shall be setup accordingly.
In short, a way to implement a way to display the same Form in different flavors (i.e.: theme and eyecandy UI).
DevExpress makes a WinForms control suite with an excellent selection of skins.
Telerik also provides WinForms components with theme support. I've used their library and it works fine.

Categories