Skip to content
This repository was archived by the owner on Nov 28, 2024. It is now read-only.

Commit 350ac12

Browse files
authored
Merge pull request #473 from telerik/Aleks/calendar-uwp-background-topHeader
Apply calendar background to the top header of the multiday view.
2 parents 3f9c86b + 8894a12 commit 350ac12

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Controls/Input/Input.UWP/Calendar/View/Layers/XamlMultiDayViewLayer.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,7 @@ internal void ArrangeVisualElement()
666666
}
667667

668668
this.UpdatePanelsBackground(calendar.MultiDayViewSettings.TimelineBackground);
669+
this.UpdateTopHeaderBackground();
669670
}
670671

671672
internal void UpdatePanelsBackground(Brush background)
@@ -1224,5 +1225,19 @@ private void ApplyTimeRulerStyle(object item, FrameworkElement container)
12241225
}
12251226
}
12261227
}
1228+
1229+
private void UpdateTopHeaderBackground()
1230+
{
1231+
Brush defaultCalendarBrush = this.Owner.Background ?? MultiDayViewSettings.DefaultBackground;
1232+
if (this.topHeader.Background != defaultCalendarBrush)
1233+
{
1234+
this.topHeader.Background = defaultCalendarBrush;
1235+
}
1236+
1237+
if (this.topLeftHeaderPanel.Background != defaultCalendarBrush)
1238+
{
1239+
this.topLeftHeaderPanel.Background = defaultCalendarBrush;
1240+
}
1241+
}
12271242
}
12281243
}

0 commit comments

Comments
 (0)