|
|
@ -216,17 +216,17 @@ namespace Perspex.Controls |
|
|
{ |
|
|
{ |
|
|
Contract.Requires<ArgumentNullException>(control != null); |
|
|
Contract.Requires<ArgumentNullException>(control != null); |
|
|
|
|
|
|
|
|
foreach (Style style in control.Styles) |
|
|
|
|
|
{ |
|
|
|
|
|
style.Attach(this); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Control parent = control.Parent; |
|
|
Control parent = control.Parent; |
|
|
|
|
|
|
|
|
if (parent != null) |
|
|
if (parent != null) |
|
|
{ |
|
|
{ |
|
|
this.AttachStyles(parent); |
|
|
this.AttachStyles(parent); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
foreach (Style style in control.Styles) |
|
|
|
|
|
{ |
|
|
|
|
|
style.Attach(this); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void ParentChanged(Tuple<Control, Control> values) |
|
|
private void ParentChanged(Tuple<Control, Control> values) |
|
|
|