using System;
using System.Collections.Generic;
using System.Text;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace StockPortfolio
{
    public class TileTemplateSelector : DataTemplateSelector
    {

        protected override DataTemplate SelectTemplateCore(object item, DependencyObject container)
        {
            DataTemplate result = null;
            FunctionGroup sampleDataGroup = item as FunctionGroup;
            if (sampleDataGroup != null)
            {
                result = Application.Current.Resources[sampleDataGroup.FunctionGroupStyle.ToString()] as DataTemplate;
                
            }
            return result;

        }
    }
}
