0

Link to the Image:

This is UI of the app which I'm creating, So if a user clicks Home button he should be able to play with some specific controls and again if he presses Sellers button, new tools and controls should be visible on the screen!

I tried to implement this by using 4 panels with

panel_name.visible=false

in respective button click event, but the problem is each panel should take up 1/4th of the space in the form to display all of its respective tools.This makes the panel area too small!

How can I make the application such that If a user clicks Home button, he should see one page/tab and different tabs/pages for different buttons clicks?

AndreaT
  • 367
  • 2
  • 10
Bobtheblobber
  • 91
  • 1
  • 4
  • 10
  • Have you considered using a [TabControl](https://msdn.microsoft.com/en-us/library/system.windows.forms.tabcontrol(v=vs.110).aspx)? – stuartd Apr 07 '18 at 21:10
  • @stuartd Yes, I did! but I cannot insert icons on the tab heading and all the tab headings are stitched to one another and they're horizontally aligned! Can I make them vertically aligned? – Bobtheblobber Apr 07 '18 at 21:24
  • [How to create vertical navigation bar in Windows Forms?](https://stackoverflow.com/q/36243690/3110834) – Reza Aghaei Apr 07 '18 at 21:25
  • @DheerajN I'll explain how to use user controls, do you use Twitter? – Héctor M. Apr 07 '18 at 21:27
  • @DheerajN Ready, I followed you, follow me to start – Héctor M. Apr 07 '18 at 21:44
  • Any reason you don't want to use WPF or UWP? – Ron Beyer Apr 07 '18 at 22:17
  • @RonBeyer Simply Winforms is easier than WPF or WUP – Héctor M. Apr 07 '18 at 22:20
  • @HéctorManuelMartinezDurán Not really, this type of thing would be trivially easy in WPF, in WinForms it requires some manipulation of paint events and the fun issues you get with that. I've been a Winforms developer since 2002, and a lot of things are much harder in WInforms than XAML. – Ron Beyer Apr 07 '18 at 22:24
  • @RonBeyer But is it easier only in terms of aesthetics? – Héctor M. Apr 07 '18 at 22:35
  • @HéctorManuelMartinezDurán No, not a discussion for here though, I find it is easier to use in just about every way from data binding/code behind and animation to compositing, layout, etc. – Ron Beyer Apr 07 '18 at 22:37
  • @RonBeyer Well, I started with WPF and it happened to Winfroms because it was easier for me to understand it, and that, I have previous experience of XML design in Android – Héctor M. Apr 07 '18 at 22:42
  • @RonBeyer I'm forced to confess that you were right about WPF, it's just better than WinForms – Héctor M. Apr 10 '18 at 01:45

1 Answers1

0

I suggest you use the user controls: right click on your solution> add> user control

C# UserControl

How to create and use UserControl

The user controls are similar to the forms, since you can place controls on them, the difference is that instead of showing them as common forms, you drag them as a control inside the form

Héctor M.
  • 2,302
  • 4
  • 17
  • 35