Skip to content

A library for applying CSS-like styles to Windows Desktop applications (Winforms, WPF)

License

Notifications You must be signed in to change notification settings

Nazgul07/CSS.NET

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSS.NET

A library for applying CSS-like styles to Windows Desktop applications (Winforms, WPF)

Style your Windows Desktop applications using CSS.

Using Name selectors:

public Form1()
{
  InitializeComponent();
  this.ApplyFormCss(@"
  #button1 {
    Height:50;
    Width:200;
    Text: ""An awesome button"";
  }
  #label1 {
    ForeColor: Color.Red;
    Text: ""An awesome label"";
    Location: new Point(10, 10);
  }
  ");
}

Using Tag (Control Type) selectors:

public Form1()
{
  InitializeComponent();
  this.ApplyFormCss(@"
  Button {
    Height:50;
    Width:200;
    Text: ""An awesome button"";
  }
  Label {
    ForeColor: Color.Red;
    Text: ""An awesome label"";
    Location: new Point(10, 10);
  }
  ");
}

Using nested selectors:

public Form1()
{
  InitializeComponent();
  this.ApplyFormCss(@"
  #panel1 > #button1 {
    Height:50;
    Width:200;
    Text: ""An awesome button"";
  }
  Panel Label {
    ForeColor: Color.Red;
    Text: ""An awesome label"";
    Location: new Point(10, 10);
  }
  ");
}

About

A library for applying CSS-like styles to Windows Desktop applications (Winforms, WPF)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages