xamarin.android - Reading XAML via string in Code behind Xamarin Forms -


i trying create xamarin pcl project multiple resource dictionary 's in sane project.

all resource dictionary 's have same key defined (these keys being referenced dynamic resources) in project xaml files different screens, values in each resource dictionary 's different(purpose having separate resource dictionary 's specific client requirements).

am able load resource dictionary 's in code behind of app.xaml using

current.resources = new resourcedictionary(); resources.mergedwith = typeof(sales); // sales.xaml resource dictionary.

now trying pass name of resource dictionary app.config (using pclappconfig nuget package) , name of xaml file along path.

am unable read xaml file in code behind use in wpf using xamlreader.load

any appreciated.

each resourcedictionary have own type, e.g. sales.

hence if want type dependant upon name, type via reflection.

var namefromconfig = "sale"; // change config file var type = type.gettype(namefromconfig); current.resources = new resourcedictionary();  resources.mergedwith =  type; 

Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -