Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 75885

Is it possible to instantiate a class at runtime from a string contained in a XAML resource?

$
0
0

Hi,

In Microsoft's full implementation of XAML, you can instantiate a class at runtime from XAML read into the XamlReader class. Is anything similar to this possible in Xamarin.Forms? If not, can anyone suggest a way to instantiate a custom (non UI) class at runtime.

I guess what I am talking about really is being able to write a factory method to instantiate objects, but I'd prefer not to have the types of the classes hard-coded in the normal C#. It seems better to me if this is stored in a XAML resource file.

Any advice would be welcome.

Kind wishes ~ Patrick


Viewing all articles
Browse latest Browse all 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>