WPF RadScheduleView TimeLine

1 Answer 116 Views
Forum suggestions
Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
Ohad asked on 28 Dec 2021, 09:39 AM

Hi,

I want to change the color of what I marked here,

I would be happy for help on how to do this.

Thanks.

 

 

1 Answer, 1 is accepted

Sort by
0
Stenly
Telerik team
answered on 30 Dec 2021, 11:05 AM

Hello Ohad,

To achieve the wanted result, you could subscribe to the Loaded event of the RadScheduleView control, and utilizing the ChildrenOfType extension method, get the Border element with x:Name="NavigationHeader". On the returned Border control, you could set its Background property to the desired value. The following code snippet shows the Loaded event's implementation, to target the specified Border element and modify its background color:

private void RadScheduleView_Loaded(object sender, RoutedEventArgs e)
{
    var scheduleView = (RadScheduleView)sender;

    var navigationBorder = scheduleView.ChildrenOfType<Border>().FirstOrDefault(x => x.Name == "NavigationHeader");
    if (navigationBorder != null)
    {
        navigationBorder.Background = Brushes.Red;
    }
}

The result when the control loads, is as follows:

With that said, I hope the provided information is of help to you.

Regards,
Stenly
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
commented on 02 Jan 2022, 08:05 AM

Thanks!
Tags
Forum suggestions
Asked by
Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
Answers by
Stenly
Telerik team
Share this question
or