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

NativeCSS with .css file

$
0
0

Has someone been able to use nativeCSS with a "local" file?

when I add:

using Style;

...onCreate(Bundle bundle) { 
base.OnCreate (bundle); 
Xamarin.Forms.Forms.Init (this, bundle);  
SetPage (UI.GetMainPage ()); 
NativeCSS.StyleWithCSS("default.css");  
} 

doesn't do anything to my controls
I've added the 'default.css' file to "myProjectAndroid\Assets\"

containing
view{ background:red }

But if i just use the css directly in the MainActivity it will work
NativeCSS.StyleWithCSS("view{background:red}");

Thank you in advance


Viewing all articles
Browse latest Browse all 58056

Trending Articles