Search This Blog
Tuesday, March 22, 2016
Web DetailView layout styling with the CustomCSSClassName attribute in the Model Editor
This small feature is available for the new XAF Web UI only, which is enabled by default in new projects starting from v15.2.7 and on. In short, the CustomCSSClassName attribute allows you to set a CSS class for a layout item or a group. Let's see how this works in practice.
For instance, to customize the color and size of the FullName view item, add the FullNameCSS CSS class in YourSolutionName.Web/Default.aspx file exactly as you would do this in a regular non-XAF ASP.NET application:
<!--...-->
<head runat="server">
<title>Main Page</title>
<meta http-equiv="Expires" content="0" />
<style type="text/css">
.FullNameCSS
{
font-size: 25px;
color: darkblue;
}
<!--...-->
The result is demonstrated in the image below:
Please let us know whether this new customization option is helpful for your projects.
BTW, if you are getting started with the new Web application style, you may find this article helpful: New Web UI FAQ
Subscribe to:
Post Comments (Atom)
Great thing, Dennis!
ReplyDeleteOne question: Is customizing the application template already possible? (like it is possible for DefaultTemplateContent and DefaultVerticalTemplateContent in classic layout)
Thanks for your feedback, Andreas!
DeleteSure, that is possible with v15.2.4+: https://documentation.devexpress.com/#eXpressAppFramework/CustomDocument113153
I hope this helps.
Sorry I noticed your reply only now. Yes this helps. I'll test it in our solution and come back to you if there are problems.
DeleteYou're always welcome!
DeleteThank you Dennis
ReplyDeleteWhy it's not applicable for the enum property editor?
I could not replicate any problems with ASPxEnumPropertyEditor in my tests with the "Title Of Courtesy" layout item in our MainDemo.Web app. Please submit a new ticket via the Support Center and attach your test project so we can see exactly what you did and what did not function as expected.
Delete