Index: Core/Gui/src/Core.Gui/Plugin/ViewInfo.cs
===================================================================
diff -u -rce7a3865e550c0ddf8680aaab9ff591763be5025 -re19f460e72a67bb4e4d7d32ced99952a3c81e432
--- Core/Gui/src/Core.Gui/Plugin/ViewInfo.cs (.../ViewInfo.cs) (revision ce7a3865e550c0ddf8680aaab9ff591763be5025)
+++ Core/Gui/src/Core.Gui/Plugin/ViewInfo.cs (.../ViewInfo.cs) (revision e19f460e72a67bb4e4d7d32ced99952a3c81e432)
@@ -75,15 +75,15 @@
public Image Image { get; set; }
///
- /// Gets or sets the symbol of the view.
+ /// Gets or sets the method used to determine the symbol for the view.
///
- public string Symbol { get; set; }
+ public Func GetSymbol { get; set; }
///
- /// Gets or sets the font family for the symbol of the view.
+ /// Gets or sets the method used to determine the font family of the symbol for the view.
///
- public FontFamily FontFamily { get; set; }
-
+ public Func GetFontFamily { get; set; }
+
///
/// Gets or sets the optional method for checking if this view info object can be
/// used for a given data object. Function arguments:
@@ -213,15 +213,15 @@
public Image Image { get; set; }
///
- /// Gets or sets the symbol of the view.
+ /// Gets or sets the method used to determine the symbol for the view.
///
- public string Symbol { get; set; }
+ public Func GetSymbol { get; set; }
///
- /// Gets or sets the font family for the symbol of the view.
+ /// Gets or sets the method used to determine the font family of the symbol for the view.
///
- public FontFamily FontFamily { get; set; }
-
+ public Func GetFontFamily { get; set; }
+
///
/// Gets or sets the optional method for checking if this view info object can be
/// used for a given data object. Function arguments:
@@ -289,8 +289,8 @@
ViewType = viewInfo.ViewType,
Description = viewInfo.Description,
Image = viewInfo.Image,
- Symbol = viewInfo.Symbol,
- FontFamily = viewInfo.FontFamily,
+ GetSymbol = viewInfo.GetSymbol,
+ GetFontFamily = viewInfo.GetFontFamily,
AdditionalDataCheck = o => viewInfo.AdditionalDataCheck == null || viewInfo.AdditionalDataCheck((TData) o),
GetViewData = o => viewInfo.GetViewData != null ? viewInfo.GetViewData((TData) o) : o,
CloseForData = (v, o) => viewInfo.CloseForData != null && viewInfo.CloseForData((TView) v, o),
Index: Core/Gui/test/Core.Gui.Test/Plugin/ViewInfoTest.cs
===================================================================
diff -u -r15d39e3773620fe0e9c23de9831e16e6cc105d01 -re19f460e72a67bb4e4d7d32ced99952a3c81e432
--- Core/Gui/test/Core.Gui.Test/Plugin/ViewInfoTest.cs (.../ViewInfoTest.cs) (revision 15d39e3773620fe0e9c23de9831e16e6cc105d01)
+++ Core/Gui/test/Core.Gui.Test/Plugin/ViewInfoTest.cs (.../ViewInfoTest.cs) (revision e19f460e72a67bb4e4d7d32ced99952a3c81e432)
@@ -46,8 +46,8 @@
Assert.IsNull(viewInfo.Description);
Assert.IsNull(viewInfo.GetViewName);
Assert.IsNull(viewInfo.Image);
- Assert.IsNull(viewInfo.Symbol);
- Assert.IsNull(viewInfo.FontFamily);
+ Assert.IsNull(viewInfo.GetSymbol);
+ Assert.IsNull(viewInfo.GetFontFamily);
Assert.IsNull(viewInfo.AdditionalDataCheck);
Assert.IsNull(viewInfo.GetViewData);
Assert.IsNull(viewInfo.AfterCreate);
@@ -71,8 +71,8 @@
const string newDescription = "";
string GetViewName(IView view, object o) => "";
Image image = Resources.abacus;
- const string symbol = "";
- var fontFamily = new FontFamily();
+ string GetSymbol() => "";
+ FontFamily GetFontFamily() => new FontFamily();
bool AdditionalDataCheck(object o) => true;
object GetViewData(object o) => 45;
void AfterCreate(IView view, object o) {}
@@ -86,8 +86,8 @@
viewInfo.Description = newDescription;
viewInfo.GetViewName = GetViewName;
viewInfo.Image = image;
- viewInfo.Symbol = symbol;
- viewInfo.FontFamily = fontFamily;
+ viewInfo.GetSymbol = GetSymbol;
+ viewInfo.GetFontFamily = GetFontFamily;
viewInfo.AdditionalDataCheck = AdditionalDataCheck;
viewInfo.GetViewData = GetViewData;
viewInfo.AfterCreate = AfterCreate;
@@ -101,8 +101,8 @@
Assert.AreEqual(newDescription, viewInfo.Description);
Assert.AreEqual((Func) GetViewName, viewInfo.GetViewName);
Assert.AreEqual(image, viewInfo.Image);
- Assert.AreEqual(symbol, viewInfo.Symbol);
- Assert.AreSame(fontFamily, viewInfo.FontFamily);
+ Assert.AreEqual((Func) GetSymbol, viewInfo.GetSymbol);
+ Assert.AreEqual((Func) GetFontFamily, viewInfo.GetFontFamily);
Assert.AreEqual((Func