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.
 
 
 

25 lines
573 B

namespace Perspex
{
using System;
using Perspex.Controls;
public class ControlTemplate
{
public ControlTemplate(Func<TemplatedControl, Control> build)
{
this.Build = build;
}
public Func<TemplatedControl, Control> Build
{
get;
private set;
}
public static ControlTemplate Create<TControl>(Func<TControl, Control> build)
where TControl : TemplatedControl
{
return new ControlTemplate(c => build((TControl)c));
}
}
}