8 changed files with 132 additions and 63 deletions
@ -0,0 +1,42 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Perspex |
|||
{ |
|||
public class Application |
|||
{ |
|||
private Styles styles; |
|||
|
|||
public Application() |
|||
{ |
|||
Current = this; |
|||
} |
|||
|
|||
public static Application Current |
|||
{ |
|||
get; |
|||
private set; |
|||
} |
|||
|
|||
public Styles Styles |
|||
{ |
|||
get |
|||
{ |
|||
if (this.styles == null) |
|||
{ |
|||
this.styles = new Styles(); |
|||
} |
|||
|
|||
return this.styles; |
|||
} |
|||
|
|||
set |
|||
{ |
|||
this.styles = value; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -1,12 +1,21 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
// -----------------------------------------------------------------------
|
|||
// <copyright file="Styles.cs" company="Steven Kirk">
|
|||
// Copyright 2014 MIT Licence. See licence.md for more information.
|
|||
// </copyright>
|
|||
// -----------------------------------------------------------------------
|
|||
|
|||
namespace Perspex |
|||
{ |
|||
using Perspex.Controls; |
|||
|
|||
public class Styles : PerspexList<Style> |
|||
{ |
|||
public void Attach(Control control) |
|||
{ |
|||
foreach (Style style in this) |
|||
{ |
|||
style.Attach(control); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
Loading…
Reference in new issue