A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

42 lines
1.2 KiB

// -----------------------------------------------------------------------
// <copyright file="TabStyle.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
namespace Perspex.Themes.Default
{
using System.Linq;
using Perspex.Controls;
using Perspex.Media;
using Perspex.Styling;
public class TabStyle : Styles
{
public TabStyle()
{
this.AddRange(new[]
{
new Style(x => x.OfType<Tab>())
{
Setters = new[]
{
new Setter(Button.TemplateProperty, ControlTemplate.Create<Tab>(this.Template)),
},
},
});
}
private Control Template(Tab control)
{
return new Border
{
Background = Brushes.Red,
Content = new ContentPresenter
{
[~ContentPresenter.ContentProperty] = control[~Tab.ContentProperty],
}
};
}
}
}