private static Grid CreateContainer(IFormulaToken token)
{
// find template in FormulaTokenTemplates.xaml
FormulaTokenTemplate template;
if (!FormulaTokenTemplates.TryGetValue(token.GetType(), out template))
{
Debug.WriteLine("Please add template for \"" + token.GetType().Name +
"\" to FormulaTokenTemplates.xaml. ");
return null;
}
return template.CreateContainer(token);
}