How to use bootstrap (or uikit)?

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
tomny
Posts: 38
Joined: Sat Nov 19, 2016 7:23 pm

How to use bootstrap (or uikit)?

Postby tomny » Fri Jan 06, 2017 2:05 am

Dear JS-Support:

How to use bootstrap (or uikit)?

I tried to bootstrap-wpf-style (https://github.com/ptddqr/bootstrap-wpf-style) to Cshtml5, but unsuccessful. Because cshtml5 some styles do not support.

But I changed to think, cshtml5 create html5 application, should be able to directly use bootstrap, it should not need to be converted to xaml. But I did not find a way to set CssClass?

In addition, the other style library uikit (https://getuikit.com/) is also very good, it also includes a lot of web components. These components can be easily used in cshtml5 inside? Thank you!

Regards,
Tomny

JS-Support @Userware
Site Admin
Posts: 1071
Joined: Tue Apr 08, 2014 3:42 pm

Re: How to use bootstrap (or uikit)?

Postby JS-Support @Userware » Mon Jan 09, 2017 5:09 am

Dear Tomny,

The recommended way to style your controls is to use XAML styles and templates. You can read more about them at:

http://cshtml5.com/links/styles-and-templates.aspx

If really want to use CSS styles, you can do so by using the method "Interop.LoadCssFile", documented at:
http://cshtml5.com/links/how-to-call-javascript.aspx#LoadCssFile

in conjunction with the new "HtmlPresenter" control (introduced in Beta 10.5 and newer) which lets you embed arbitrary HTML code in your XAML by setting the property "HtmlPresenter.Html = ...".

Regards,
JS-Support


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 1 guest

 

 

cron