diff --git a/src/Perspex.Themes.Default/ButtonStyle.cs b/src/Perspex.Themes.Default/ButtonStyle.cs
index 4bdba4cb7d..0c5db083a7 100644
--- a/src/Perspex.Themes.Default/ButtonStyle.cs
+++ b/src/Perspex.Themes.Default/ButtonStyle.cs
@@ -16,8 +16,14 @@ namespace Perspex.Themes.Default
using Perspex.Media;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class ButtonStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public ButtonStyle()
{
this.AddRange(new[]
@@ -27,7 +33,7 @@ namespace Perspex.Themes.Default
Setters = new[]
{
new Setter(Button.FocusAdornerProperty, new FuncTemplate(FocusAdornerTemplate)),
- new Setter(Button.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(Button.TemplateProperty, new ControlTemplate(Template)),
new Setter(Button.HorizontalContentAlignmentProperty, HorizontalAlignment.Center),
new Setter(Button.VerticalContentAlignmentProperty, VerticalAlignment.Center),
},
@@ -74,6 +80,10 @@ namespace Perspex.Themes.Default
});
}
+ ///
+ /// The default template for the control's focus adorner.
+ ///
+ /// The root of the instantiated template.
public static Control FocusAdornerTemplate()
{
return new Rectangle
@@ -85,7 +95,12 @@ namespace Perspex.Themes.Default
};
}
- private Control Template(Button control)
+ ///
+ /// The default template for the control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(Button control)
{
Border border = new Border
{
diff --git a/src/Perspex.Themes.Default/CheckBoxStyle.cs b/src/Perspex.Themes.Default/CheckBoxStyle.cs
index 0993760026..0b8e455351 100644
--- a/src/Perspex.Themes.Default/CheckBoxStyle.cs
+++ b/src/Perspex.Themes.Default/CheckBoxStyle.cs
@@ -15,8 +15,14 @@ namespace Perspex.Themes.Default
using Perspex.Media;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class CheckBoxStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public CheckBoxStyle()
{
this.AddRange(new[]
@@ -25,7 +31,7 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(Button.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(Button.TemplateProperty, new ControlTemplate(Template)),
},
},
new Style(x => x.OfType().Template().Name("checkMark"))
@@ -45,7 +51,12 @@ namespace Perspex.Themes.Default
});
}
- private Control Template(CheckBox control)
+ ///
+ /// The default template for a control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(CheckBox control)
{
Border result = new Border
{
diff --git a/src/Perspex.Themes.Default/ContentControlStyle.cs b/src/Perspex.Themes.Default/ContentControlStyle.cs
index a7bf43ce6b..3966c0fa7b 100644
--- a/src/Perspex.Themes.Default/ContentControlStyle.cs
+++ b/src/Perspex.Themes.Default/ContentControlStyle.cs
@@ -12,8 +12,14 @@ namespace Perspex.Themes.Default
using Perspex.Controls.Templates;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class ContentControlStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public ContentControlStyle()
{
this.AddRange(new[]
@@ -22,13 +28,18 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(ContentControl.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(ContentControl.TemplateProperty, new ControlTemplate(Template)),
},
},
});
}
- private Control Template(ContentControl control)
+ ///
+ /// The default template for a control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(ContentControl control)
{
return new ContentPresenter
{
diff --git a/src/Perspex.Themes.Default/DeckStyle.cs b/src/Perspex.Themes.Default/DeckStyle.cs
index 4ccefcc77c..1fe20f36dc 100644
--- a/src/Perspex.Themes.Default/DeckStyle.cs
+++ b/src/Perspex.Themes.Default/DeckStyle.cs
@@ -12,8 +12,14 @@ namespace Perspex.Themes.Default
using Perspex.Controls.Templates;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class DeckStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public DeckStyle()
{
this.AddRange(new[]
@@ -22,13 +28,18 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(Deck.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(Deck.TemplateProperty, new ControlTemplate(Template)),
},
},
});
}
- private Control Template(Deck control)
+ ///
+ /// The default template for the control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(Deck control)
{
return new DeckPresenter
{
diff --git a/src/Perspex.Themes.Default/DefaultTheme.cs b/src/Perspex.Themes.Default/DefaultTheme.cs
index 286479ad2b..e72a9bdcda 100644
--- a/src/Perspex.Themes.Default/DefaultTheme.cs
+++ b/src/Perspex.Themes.Default/DefaultTheme.cs
@@ -8,8 +8,14 @@ namespace Perspex.Themes.Default
{
using Perspex.Styling;
+ ///
+ /// The default Perspex theme.
+ ///
public class DefaultTheme : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public DefaultTheme()
{
this.Add(new FocusAdornerStyle());
diff --git a/src/Perspex.Themes.Default/DropDownStyle.cs b/src/Perspex.Themes.Default/DropDownStyle.cs
index 8a47b9625c..e29abc06b3 100644
--- a/src/Perspex.Themes.Default/DropDownStyle.cs
+++ b/src/Perspex.Themes.Default/DropDownStyle.cs
@@ -18,8 +18,14 @@ namespace Perspex.Themes.Default
using Perspex.Media;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class DropDownStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public DropDownStyle()
{
this.AddRange(new[]
@@ -28,7 +34,7 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(DropDown.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(DropDown.TemplateProperty, new ControlTemplate(Template)),
new Setter(DropDown.BorderBrushProperty, new SolidColorBrush(0xff707070)),
new Setter(DropDown.BorderThicknessProperty, 2.0),
new Setter(DropDown.FocusAdornerProperty, new FuncTemplate(FocusAdornerTemplate)),
@@ -46,6 +52,10 @@ namespace Perspex.Themes.Default
});
}
+ ///
+ /// The default template for a control's focus adorner.
+ ///
+ /// The root of the instantiated template.
public static Control FocusAdornerTemplate()
{
return new Rectangle
@@ -57,7 +67,12 @@ namespace Perspex.Themes.Default
};
}
- private Control Template(DropDown control)
+ ///
+ /// The default template for a control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(DropDown control)
{
Border result = new Border
{
diff --git a/src/Perspex.Themes.Default/FocusAdornerStyle.cs b/src/Perspex.Themes.Default/FocusAdornerStyle.cs
index 260313b742..c77bf26234 100644
--- a/src/Perspex.Themes.Default/FocusAdornerStyle.cs
+++ b/src/Perspex.Themes.Default/FocusAdornerStyle.cs
@@ -13,8 +13,14 @@ namespace Perspex.Themes.Default
using Perspex.Media;
using Perspex.Styling;
+ ///
+ /// The default style for a focus adorner.
+ ///
public class FocusAdornerStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public FocusAdornerStyle()
{
this.AddRange(new[]
@@ -23,13 +29,17 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(Control.FocusAdornerProperty, new FuncTemplate(this.Template)),
+ new Setter(Control.FocusAdornerProperty, new FuncTemplate(Template)),
},
},
});
}
- private Control Template()
+ ///
+ /// The default template for focus adorner.
+ ///
+ /// The root of the instantiated template.
+ public static Control Template()
{
return new Rectangle
{
diff --git a/src/Perspex.Themes.Default/GridSplitterStyle.cs b/src/Perspex.Themes.Default/GridSplitterStyle.cs
index d25a5d1b37..b71537700a 100644
--- a/src/Perspex.Themes.Default/GridSplitterStyle.cs
+++ b/src/Perspex.Themes.Default/GridSplitterStyle.cs
@@ -11,8 +11,14 @@ namespace Perspex.Themes.Default
using Perspex.Controls.Templates;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class GridSplitterStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public GridSplitterStyle()
{
this.AddRange(new[]
@@ -21,14 +27,19 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(GridSplitter.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(GridSplitter.TemplateProperty, new ControlTemplate(Template)),
new Setter(GridSplitter.WidthProperty, 4.0),
},
},
});
}
- private Control Template(GridSplitter control)
+ ///
+ /// The default template for a control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(GridSplitter control)
{
Border border = new Border
{
diff --git a/src/Perspex.Themes.Default/ItemsControlStyle.cs b/src/Perspex.Themes.Default/ItemsControlStyle.cs
index b09ef43f1e..8ee74fed92 100644
--- a/src/Perspex.Themes.Default/ItemsControlStyle.cs
+++ b/src/Perspex.Themes.Default/ItemsControlStyle.cs
@@ -12,8 +12,14 @@ namespace Perspex.Themes.Default
using Perspex.Controls.Templates;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class ItemsControlStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public ItemsControlStyle()
{
this.AddRange(new[]
@@ -22,13 +28,18 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(Button.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(Button.TemplateProperty, new ControlTemplate(Template)),
},
},
});
}
- private Control Template(ItemsControl control)
+ ///
+ /// The default template for an control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(ItemsControl control)
{
return new ItemsPresenter
{
diff --git a/src/Perspex.Themes.Default/ListBoxItemStyle.cs b/src/Perspex.Themes.Default/ListBoxItemStyle.cs
index bdb6212cfc..fecf9472b3 100644
--- a/src/Perspex.Themes.Default/ListBoxItemStyle.cs
+++ b/src/Perspex.Themes.Default/ListBoxItemStyle.cs
@@ -13,8 +13,14 @@ namespace Perspex.Themes.Default
using Perspex.Media;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class ListBoxItemStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public ListBoxItemStyle()
{
this.AddRange(new[]
@@ -23,7 +29,7 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(ListBoxItem.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(ListBoxItem.TemplateProperty, new ControlTemplate(Template)),
},
},
new Style(x => x.OfType().Class("selected").Template().Name("border"))
@@ -44,7 +50,12 @@ namespace Perspex.Themes.Default
});
}
- private Control Template(ListBoxItem control)
+ ///
+ /// The default template for a control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(ListBoxItem control)
{
return new Border
{
diff --git a/src/Perspex.Themes.Default/ListBoxStyle.cs b/src/Perspex.Themes.Default/ListBoxStyle.cs
index 5a403d3e59..2458e47c1f 100644
--- a/src/Perspex.Themes.Default/ListBoxStyle.cs
+++ b/src/Perspex.Themes.Default/ListBoxStyle.cs
@@ -13,8 +13,14 @@ namespace Perspex.Themes.Default
using Perspex.Media;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class ListBoxStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public ListBoxStyle()
{
this.AddRange(new[]
@@ -23,7 +29,7 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(ListBox.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(ListBox.TemplateProperty, new ControlTemplate(Template)),
new Setter(ListBox.BorderBrushProperty, Brushes.Black),
new Setter(ListBox.BorderThicknessProperty, 1.0),
},
@@ -31,7 +37,12 @@ namespace Perspex.Themes.Default
});
}
- private Control Template(ListBox control)
+ ///
+ /// The default template for a control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(ListBox control)
{
return new Border
{
diff --git a/src/Perspex.Themes.Default/MenuItemStyle.cs b/src/Perspex.Themes.Default/MenuItemStyle.cs
index 02b107950d..1ddce93206 100644
--- a/src/Perspex.Themes.Default/MenuItemStyle.cs
+++ b/src/Perspex.Themes.Default/MenuItemStyle.cs
@@ -17,11 +17,17 @@ namespace Perspex.Themes.Default
using Perspex.Media;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class MenuItemStyle : Styles
{
private static readonly DataTemplate AccessKeyDataTemplate =
new DataTemplate(x => new AccessText { Text = x });
+ ///
+ /// Initializes a new instance of the class.
+ ///
public MenuItemStyle()
{
this.AddRange(new[]
@@ -32,14 +38,14 @@ namespace Perspex.Themes.Default
{
new Setter(MenuItem.BorderThicknessProperty, 1.0),
new Setter(MenuItem.PaddingProperty, new Thickness(6, 0)),
- new Setter(MenuItem.TemplateProperty, new ControlTemplate(this.PopupTemplate)),
+ new Setter(MenuItem.TemplateProperty, new ControlTemplate(PopupTemplate)),
},
},
new Style(x => x.OfType().Child().OfType())
{
Setters = new[]
{
- new Setter(MenuItem.TemplateProperty, new ControlTemplate(this.TopLevelTemplate)),
+ new Setter(MenuItem.TemplateProperty, new ControlTemplate(TopLevelTemplate)),
},
},
new Style(x => x.OfType().Class("selected").Template().Name("root"))
@@ -68,7 +74,12 @@ namespace Perspex.Themes.Default
});
}
- private Control TopLevelTemplate(MenuItem control)
+ ///
+ /// The default template for a top-level control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control TopLevelTemplate(MenuItem control)
{
Popup popup;
@@ -139,7 +150,12 @@ namespace Perspex.Themes.Default
return result;
}
- private Control PopupTemplate(MenuItem control)
+ ///
+ /// The default template for a popup control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control PopupTemplate(MenuItem control)
{
Popup popup;
diff --git a/src/Perspex.Themes.Default/MenuStyle.cs b/src/Perspex.Themes.Default/MenuStyle.cs
index ce371ba3cc..400698c8c1 100644
--- a/src/Perspex.Themes.Default/MenuStyle.cs
+++ b/src/Perspex.Themes.Default/MenuStyle.cs
@@ -13,8 +13,14 @@ namespace Perspex.Themes.Default
using Perspex.Input;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class MenuStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public MenuStyle()
{
this.AddRange(new[]
@@ -23,13 +29,18 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(Menu.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(Menu.TemplateProperty, new ControlTemplate(Template)),
},
},
});
}
- private Control Template(Menu control)
+ ///
+ /// The default template for the control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(Menu control)
{
return new Border
{
diff --git a/src/Perspex.Themes.Default/PopupRootStyle.cs b/src/Perspex.Themes.Default/PopupRootStyle.cs
index 75b3d5c6a3..bbddb1ad5c 100644
--- a/src/Perspex.Themes.Default/PopupRootStyle.cs
+++ b/src/Perspex.Themes.Default/PopupRootStyle.cs
@@ -13,8 +13,14 @@ namespace Perspex.Themes.Default
using Perspex.Controls.Templates;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class PopupRootStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public PopupRootStyle()
{
this.AddRange(new[]
@@ -23,7 +29,7 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(PopupRoot.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(PopupRoot.TemplateProperty, new ControlTemplate(Template)),
new Setter(PopupRoot.FontFamilyProperty, "Segoe UI"),
new Setter(PopupRoot.FontSizeProperty, 12.0),
},
@@ -31,7 +37,12 @@ namespace Perspex.Themes.Default
});
}
- private Control Template(PopupRoot control)
+ ///
+ /// The default template for the control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(PopupRoot control)
{
return new Border
{
diff --git a/src/Perspex.Themes.Default/ProgressBarStyle.cs b/src/Perspex.Themes.Default/ProgressBarStyle.cs
index 29f6e0e896..b707fb0ed4 100644
--- a/src/Perspex.Themes.Default/ProgressBarStyle.cs
+++ b/src/Perspex.Themes.Default/ProgressBarStyle.cs
@@ -17,8 +17,14 @@ namespace Perspex.Themes.Default
using Perspex.Media;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class ProgressBarStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public ProgressBarStyle()
{
this.AddRange(new[]
@@ -27,7 +33,7 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(ProgressBar.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(ProgressBar.TemplateProperty, new ControlTemplate(Template)),
new Setter(ProgressBar.BackgroundProperty, new SolidColorBrush(0xffdddddd)),
new Setter(ProgressBar.ForegroundProperty, new SolidColorBrush(0xffbee6fd)),
},
@@ -35,7 +41,12 @@ namespace Perspex.Themes.Default
});
}
- private Control Template(ProgressBar control)
+ ///
+ /// The default template for the control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(ProgressBar control)
{
Border container = new Border
{
diff --git a/src/Perspex.Themes.Default/RadioButtonStyle.cs b/src/Perspex.Themes.Default/RadioButtonStyle.cs
index a02f6891cb..640e21291d 100644
--- a/src/Perspex.Themes.Default/RadioButtonStyle.cs
+++ b/src/Perspex.Themes.Default/RadioButtonStyle.cs
@@ -15,8 +15,14 @@ namespace Perspex.Themes.Default
using Perspex.Media;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class RadioButtonStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public RadioButtonStyle()
{
this.AddRange(new[]
@@ -25,7 +31,7 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(Button.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(Button.TemplateProperty, new ControlTemplate(Template)),
},
},
new Style(x => x.OfType().Template().Name("checkMark"))
@@ -45,7 +51,12 @@ namespace Perspex.Themes.Default
});
}
- private Control Template(RadioButton control)
+ ///
+ /// The default template for the control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(RadioButton control)
{
Border result = new Border
{
diff --git a/src/Perspex.Themes.Default/ScrollBarStyle.cs b/src/Perspex.Themes.Default/ScrollBarStyle.cs
index f76f37129b..38740e227b 100644
--- a/src/Perspex.Themes.Default/ScrollBarStyle.cs
+++ b/src/Perspex.Themes.Default/ScrollBarStyle.cs
@@ -14,8 +14,14 @@ namespace Perspex.Themes.Default
using Perspex.Media;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class ScrollBarStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public ScrollBarStyle()
{
this.AddRange(new[]
@@ -24,14 +30,13 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(ScrollBar.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(ScrollBar.TemplateProperty, new ControlTemplate(Template)),
},
},
new Style(x => x.OfType().PropertyEquals(ScrollBar.OrientationProperty, Orientation.Horizontal))
{
Setters = new[]
{
- new Setter(ScrollBar.TemplateProperty, new ControlTemplate(this.Template)),
new Setter(ScrollBar.HeightProperty, 10.0),
},
},
@@ -46,7 +51,6 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(ScrollBar.TemplateProperty, new ControlTemplate(this.Template)),
new Setter(ScrollBar.WidthProperty, 10.0),
},
},
@@ -60,7 +64,12 @@ namespace Perspex.Themes.Default
});
}
- private Control Template(ScrollBar control)
+ ///
+ /// The default template for the control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(ScrollBar control)
{
return new Border
{
@@ -76,13 +85,18 @@ namespace Perspex.Themes.Default
Thumb = new Thumb
{
Name = "thumb",
- Template = new ControlTemplate(this.ThumbTemplate),
+ Template = new ControlTemplate(ThumbTemplate),
},
},
};
}
- private Control ThumbTemplate(Thumb control)
+ ///
+ /// The default template for the 's control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control ThumbTemplate(Thumb control)
{
return new Border
{
diff --git a/src/Perspex.Themes.Default/ScrollViewerStyle.cs b/src/Perspex.Themes.Default/ScrollViewerStyle.cs
index 4444496c59..bdc4f68721 100644
--- a/src/Perspex.Themes.Default/ScrollViewerStyle.cs
+++ b/src/Perspex.Themes.Default/ScrollViewerStyle.cs
@@ -13,8 +13,14 @@ namespace Perspex.Themes.Default
using Perspex.Controls.Templates;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class ScrollViewerStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public ScrollViewerStyle()
{
this.AddRange(new[]
@@ -23,13 +29,18 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(ScrollViewer.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(ScrollViewer.TemplateProperty, new ControlTemplate(Template)),
},
},
});
}
- private Control Template(ScrollViewer control)
+ ///
+ /// The default template for the control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(ScrollViewer control)
{
var result = new Grid
{
diff --git a/src/Perspex.Themes.Default/TabControlStyle.cs b/src/Perspex.Themes.Default/TabControlStyle.cs
index fe5c941858..5976edc455 100644
--- a/src/Perspex.Themes.Default/TabControlStyle.cs
+++ b/src/Perspex.Themes.Default/TabControlStyle.cs
@@ -13,8 +13,14 @@ namespace Perspex.Themes.Default
using Perspex.Controls.Templates;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class TabControlStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public TabControlStyle()
{
this.AddRange(new[]
@@ -23,13 +29,18 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(TabControl.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(TabControl.TemplateProperty, new ControlTemplate(Template)),
},
},
});
}
- private Control Template(TabControl control)
+ ///
+ /// The default template for the control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(TabControl control)
{
return new Grid
{
diff --git a/src/Perspex.Themes.Default/TabItemStyle.cs b/src/Perspex.Themes.Default/TabItemStyle.cs
index a993894473..cad261d1bb 100644
--- a/src/Perspex.Themes.Default/TabItemStyle.cs
+++ b/src/Perspex.Themes.Default/TabItemStyle.cs
@@ -13,8 +13,14 @@ namespace Perspex.Themes.Default
using Perspex.Media;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class TabItemStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public TabItemStyle()
{
this.AddRange(new[]
@@ -25,7 +31,7 @@ namespace Perspex.Themes.Default
{
new Setter(TabItem.FontSizeProperty, 28.7),
new Setter(TabItem.ForegroundProperty, Brushes.Gray),
- new Setter(TabItem.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(TabItem.TemplateProperty, new ControlTemplate(Template)),
},
},
new Style(x => x.OfType().Class("selected"))
@@ -38,7 +44,12 @@ namespace Perspex.Themes.Default
});
}
- private Control Template(TabItem control)
+ ///
+ /// The default template for the control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(TabItem control)
{
return new ContentPresenter
{
diff --git a/src/Perspex.Themes.Default/TabStripStyle.cs b/src/Perspex.Themes.Default/TabStripStyle.cs
index ca233142bc..c13d35ad57 100644
--- a/src/Perspex.Themes.Default/TabStripStyle.cs
+++ b/src/Perspex.Themes.Default/TabStripStyle.cs
@@ -13,8 +13,14 @@ namespace Perspex.Themes.Default
using Perspex.Controls.Templates;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class TabStripStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public TabStripStyle()
{
this.AddRange(new[]
@@ -23,7 +29,7 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(TabStrip.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(TabStrip.TemplateProperty, new ControlTemplate(Template)),
},
},
new Style(x => x.OfType().Template().OfType())
@@ -37,7 +43,12 @@ namespace Perspex.Themes.Default
});
}
- private Control Template(TabStrip control)
+ ///
+ /// The default template for the control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(TabStrip control)
{
return new ItemsPresenter
{
diff --git a/src/Perspex.Themes.Default/TextBoxStyle.cs b/src/Perspex.Themes.Default/TextBoxStyle.cs
index 9b7e35e013..dbc31dbb96 100644
--- a/src/Perspex.Themes.Default/TextBoxStyle.cs
+++ b/src/Perspex.Themes.Default/TextBoxStyle.cs
@@ -13,8 +13,14 @@ namespace Perspex.Themes.Default
using Perspex.Media;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class TextBoxStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public TextBoxStyle()
{
this.AddRange(new[]
@@ -23,7 +29,7 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(TextBox.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(TextBox.TemplateProperty, new ControlTemplate(Template)),
new Setter(TextBox.BorderBrushProperty, new SolidColorBrush(0xff707070)),
new Setter(TextBox.BorderThicknessProperty, 2.0),
new Setter(TextBox.FocusAdornerProperty, null),
@@ -39,7 +45,12 @@ namespace Perspex.Themes.Default
});
}
- private Control Template(TextBox control)
+ ///
+ /// The default template for the control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(TextBox control)
{
Border result = new Border
{
diff --git a/src/Perspex.Themes.Default/ToggleButtonStyle.cs b/src/Perspex.Themes.Default/ToggleButtonStyle.cs
index af22926a74..a889c798a4 100644
--- a/src/Perspex.Themes.Default/ToggleButtonStyle.cs
+++ b/src/Perspex.Themes.Default/ToggleButtonStyle.cs
@@ -15,8 +15,14 @@ namespace Perspex.Themes.Default
using Perspex.Media;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class ToggleButtonStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public ToggleButtonStyle()
{
this.AddRange(new[]
@@ -25,7 +31,7 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(ToggleButton.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(ToggleButton.TemplateProperty, new ControlTemplate(Template)),
new Setter(ToggleButton.BackgroundProperty, new SolidColorBrush(0xffdddddd)),
new Setter(ToggleButton.BorderBrushProperty, new SolidColorBrush(0xff707070)),
new Setter(ToggleButton.BorderThicknessProperty, 2.0),
@@ -81,7 +87,12 @@ namespace Perspex.Themes.Default
});
}
- private Control Template(ToggleButton control)
+ ///
+ /// The default template for the control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(ToggleButton control)
{
Border border = new Border
{
diff --git a/src/Perspex.Themes.Default/ToolTipStyle.cs b/src/Perspex.Themes.Default/ToolTipStyle.cs
index 7b91466a23..fb046d0f42 100644
--- a/src/Perspex.Themes.Default/ToolTipStyle.cs
+++ b/src/Perspex.Themes.Default/ToolTipStyle.cs
@@ -13,8 +13,14 @@ namespace Perspex.Themes.Default
using Perspex.Media;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class ToolTipStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public ToolTipStyle()
{
this.AddRange(new[]
@@ -23,7 +29,7 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(ToolTip.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(ToolTip.TemplateProperty, new ControlTemplate(Template)),
new Setter(ToolTip.BackgroundProperty, new SolidColorBrush(0xffffffe1)),
new Setter(ToolTip.BorderBrushProperty, Brushes.Gray),
new Setter(ToolTip.BorderThicknessProperty, 1.0),
@@ -33,7 +39,12 @@ namespace Perspex.Themes.Default
});
}
- private Control Template(ToolTip control)
+ ///
+ /// The default template for the control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(ToolTip control)
{
return new Border
{
diff --git a/src/Perspex.Themes.Default/TreeViewItemStyle.cs b/src/Perspex.Themes.Default/TreeViewItemStyle.cs
index 73c43452fd..9164206060 100644
--- a/src/Perspex.Themes.Default/TreeViewItemStyle.cs
+++ b/src/Perspex.Themes.Default/TreeViewItemStyle.cs
@@ -16,8 +16,14 @@ namespace Perspex.Themes.Default
using Perspex.Media;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class TreeViewItemStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public TreeViewItemStyle()
{
this.AddRange(new[]
@@ -26,7 +32,7 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(TreeViewItem.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(TreeViewItem.TemplateProperty, new ControlTemplate(Template)),
new Setter(TreeViewItem.FocusAdornerProperty, null),
},
},
@@ -76,7 +82,12 @@ namespace Perspex.Themes.Default
});
}
- private Control Template(TreeViewItem control)
+ ///
+ /// The default template for the control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(TreeViewItem control)
{
return new StackPanel
{
diff --git a/src/Perspex.Themes.Default/TreeViewStyle.cs b/src/Perspex.Themes.Default/TreeViewStyle.cs
index ce6f61a411..20eccc1e66 100644
--- a/src/Perspex.Themes.Default/TreeViewStyle.cs
+++ b/src/Perspex.Themes.Default/TreeViewStyle.cs
@@ -13,8 +13,14 @@ namespace Perspex.Themes.Default
using Perspex.Media;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class TreeViewStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public TreeViewStyle()
{
this.AddRange(new[]
@@ -23,7 +29,7 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(TreeView.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(TreeView.TemplateProperty, new ControlTemplate(Template)),
new Setter(TreeView.BorderBrushProperty, Brushes.Black),
new Setter(TreeView.BorderThicknessProperty, 1.0),
},
@@ -31,7 +37,12 @@ namespace Perspex.Themes.Default
});
}
- private Control Template(TreeView control)
+ ///
+ /// The default template for the control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(TreeView control)
{
return new Border
{
diff --git a/src/Perspex.Themes.Default/WindowStyle.cs b/src/Perspex.Themes.Default/WindowStyle.cs
index a7fe0b322b..17af85710b 100644
--- a/src/Perspex.Themes.Default/WindowStyle.cs
+++ b/src/Perspex.Themes.Default/WindowStyle.cs
@@ -13,8 +13,14 @@ namespace Perspex.Themes.Default
using Perspex.Controls.Templates;
using Perspex.Styling;
+ ///
+ /// The default style for the control.
+ ///
public class WindowStyle : Styles
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public WindowStyle()
{
this.AddRange(new[]
@@ -23,7 +29,7 @@ namespace Perspex.Themes.Default
{
Setters = new[]
{
- new Setter(Window.TemplateProperty, new ControlTemplate(this.Template)),
+ new Setter(Window.TemplateProperty, new ControlTemplate(Template)),
new Setter(Window.FontFamilyProperty, "Segoe UI"),
new Setter(Window.FontSizeProperty, 12.0),
},
@@ -31,7 +37,12 @@ namespace Perspex.Themes.Default
});
}
- private Control Template(Window control)
+ ///
+ /// The default template for the control.
+ ///
+ /// The control being styled.
+ /// The root of the instantiated template.
+ public static Control Template(Window control)
{
return new Border
{