SchedulerFormLayoutItemBase.CaptionCssClass Property
Assign a CSS class to the layout item’s caption.
Namespace: DevExpress.Blazor.Base
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public string CaptionCssClass { get; set; }
Property Value
Type | Description |
---|---|
String | CSS class names delimited by spaces. |
Remarks
You can use the following properties to create a custom edit form for appointments:
- AppointmentCompactFormLayout - the layout of the compact form that appears when a user creates or edits an appointment.
- AppointmentFormLayout - the layout of the extended form that opens when a user clicks the expand button in the compact form.
Construct the form based on layout items in the same way as when you use the DxFormLayout component. The Scheduler ships with a set of predefined layout items that correspond to items of the default edit form.
You can customize settings of these predefined items. Use the CaptionCssClass
property to customize the appearance of the layout item’s caption. To customize the appearance of the entire layout item, use the CssClass property.
<style>
.my-style-caption {
font-style: italic;
color: white;
background-color: mediumpurple
}
</style>
<DxScheduler StartDate="@DateTime.Today"
DataStorage="@DataStorage"
ActiveViewType="SchedulerViewType.WorkWeek">
<Views>
<DxSchedulerWorkWeekView VisibleTime="@(new DxSchedulerTimeSpanRange(TimeSpan.FromHours(8),
TimeSpan.FromHours(19)))">
@*...*@
</DxSchedulerWorkWeekView>
</Views>
<AppointmentFormLayout >
<DxSchedulerSubjectFormLayoutItem CaptionCssClass="my-style-caption"/>
@*...*@
</AppointmentFormLayout>
</DxScheduler>
For more information, refer to the following help topic: Custom Appointment Form.
For more information on how to apply CSS classes to DevExpress Blazor components, refer to the following help topic: CSS Classes.
If your custom CSS ruleset includes only one class selector (.my-style-caption
in the code sample above), some property declarations can be ignored. DevExpress themes can apply predefined CSS rules that are more specific and have higher priority than a single-selector rule.
Make your rule more specific to increase the priority of your ruleset. See the following help topic for an example: Apply Styles to Components. For more information about how a browser calculates rule priority, refer to the following topic: Understanding the cascade.
You can use the !important flag to override other CSS rules. However, note that this flag modifies the standard behavior of the cascade, which can make troubleshooting CSS issues quite challenging, particularly in large stylesheets.