Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wpf TabControl, possible to organize each tab in a different class?

Tags:

c#

wpf

Basically on my mainWindow Class it's getting crowded. My main question would be how to add the events on another class ?

So I tried adding a tabControl ... and wondering if each tabs control can be in a separate xaml and/or class.

an example would be much appreciated ;P Thanks

like image 535
Reza M. Avatar asked Mar 23 '11 18:03

Reza M.


1 Answers

<Window .......  xmlns:uControl="clr-namespace:YOURPROJECT" >


<TabItem>
    <uControl:UserControl1/>
</TabItem>

Two links that should help:

  • C# Corner: UserControl in WPF
  • stackoverflow

..and for your next problem: call-a-parent-method-from-UserControl

like image 106
jwillmer Avatar answered Sep 18 '22 23:09

jwillmer