Skip to main content

Posts

Showing posts with the label WPF

Create Custom WPF Tab Control Easily

Join me on Google+ Windows Presentation Foundation (or WPF) is a computer-software graphical subsystem for rendering user interfaces in Windows-based applications. WPF, previously known as "Avalon", was initially released as part of .NET Framework 3.0 . Rather than relying on the older GDI subsystem, WPF utilizes DirectX . Creating a Tab Control in WPF is pretty simple. Let's get through the steps one by one. Create a new Project. I am using VB as my language, you may C# if you wish to. :) A WPF Application Project will do fine. I believe in clean coding. I wish to add a couple of controls to this solution. Instead of adding them to the root, I will right click the solution and click "Add Folder", rename as something like say "Cus Tab Controls". Add a WPF custom control, name it whatever you wish. This will be the tabItem header. Here goes the code. I just added a harmless Label, and a Button, which will act as the Close Tab button fo