Ejemplo n.º 1
0
        protected override UI.UITheme CreateValue()
        {
            var obj = AssetLocator.CreateInstance(Class);

            if (obj is UI.UITheme theme)
            {
                return(theme);
            }

            if (obj is ResourceDictionary resources)
            {
                return(new UI.UITheme(resources));
            }

            if (obj == null)
            {
                Debug.Print($"Asset not found (expected {typeof(UI.UITheme)})");
            }
            else
            {
                Debug.Print($"Invalid type of asset value {obj.GetType()} (expected {typeof(UI.UITheme)})");
            }
            return(null);
        }
Ejemplo n.º 2
0
 public object ProvideValue(IServiceProvider serviceProvider)
 {
     return(AssetLocator.CreateInstance(Class));
 }
Ejemplo n.º 3
0
 protected override object CreateValue()
 {
     return(AssetLocator.CreateInstance(Class));
 }
Ejemplo n.º 4
0
        public override Painting.Bitmap ProvideValue(IServiceProvider serviceProvider)
        {
            var resourceId = AssetLocator.GetResourceId(ResourceId);

            return(new Painting.Bitmap(resourceId));
        }