Skip to main content
All docs
V24.1

Time Marker

The Time Marker indicates the current time within Time Rulers. This element appears in the Day View, Work Week View, and Week View.

TimeMarkerIndicator

The TimeRuler.TimeMarkerVisibility property affects the element’s appearance and specifies the visibility for a particular time ruler.

The DayView.TimeMarkerVisibility property defines the visibility for all time rulers when the TimeRuler.TimeMarkerVisibility property is set to null.

Customize Time Marker Appearance

To customize the Time Marker element, use XAML resources in your application’s code. Refer to the following article for more information: Modify Theme Resources.

Time Indicator example

The code sample below illustrates these style settings.

<dx:ThemedWindow.Resources>
    <Style TargetType="dxschv:TimeMarkerControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="dxschv:TimeMarkerControl">
                    <Border
                        x:Name="border"
                        Height="4"
                        BorderBrush="Green"
                        BorderThickness="0,1,0,1" 
                        Background="Green" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
<dx:ThemedWindow.Resources>