I'm trying to add some buttons in the SfSchedule Header Template (where the < and > buttons are, with the current month).
Using this style I achieved part of the functionality desired (add a text and keep de month name in another color):
<Style TargetType="schedule:HeaderTitleBarView">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="schedule:HeaderTitleBarView">
<Grid Visibility="{TemplateBinding Visibility}" x:Name="Header_Grid" HorizontalAlignment="Stretch" Margin="0" Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="55" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="1" DataContext="{TemplateBinding HeaderText}" FontWeight="Light" FontSize="24" Foreground="{TemplateBinding Foreground}"
VerticalAlignment="Bottom" TextTrimming="CharacterEllipsis" HorizontalAlignment="Stretch">
<TextBlock.RenderTransform>
<TranslateTransform Y="-10" />
</TextBlock.RenderTransform>
<Span>Agenda para </Span>
<Run Foreground="{StaticResource GreenSolidBrush}" FontWeight="SemiBold" Text="{Binding}" />
</TextBlock>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Now, I need to insert some buttons near the > button (basically, buttons to change the SfSchedule view mode (day, month, timeline, etc), and some custom buttons for some views).
I tried this:
<Style TargetType="schedule:HeaderTitleBarView">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="schedule:HeaderTitleBarView">
<Grid Visibility="{TemplateBinding Visibility}" x:Name="Header_Grid" HorizontalAlignment="Stretch" Margin="0" Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="55" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="1" DataContext="{TemplateBinding HeaderText}" FontWeight="Light" FontSize="24" Foreground="{TemplateBinding Foreground}"
VerticalAlignment="Bottom" TextTrimming="CharacterEllipsis" HorizontalAlignment="Stretch">
<TextBlock.RenderTransform>
<TranslateTransform Y="-10" />
</TextBlock.RenderTransform>
<Span>Agenda para </Span>
<Run Foreground="{StaticResource GreenSolidBrush}" FontWeight="SemiBold" Text="{Binding}" />
</TextBlock>
<Button Grid.Column="2" Content="Mama, I'm here!" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
But the following exceptions are thrown:
(When I click < or > button) System.NullReferenceException at Syncfusion.UI.Xaml.Schedule.SfSchedule.UpdateFirstItem(int selectedItem) at Syncfusion.UI.Xaml.Schedule.LoopItemsPanel.MoveToNext()
(When I click anywhere on SfSchedule) System.ArgumentException at Windows.UI.Xaml.Media.VisualTreeHelper.GetChild(DependencyObject reference, int childIndex) at Syncfusion.UI.Xaml.Schedule.Sfschedule.OnPointerPressed(PointerRoutedEventArgs e)
Also, I tried to edit and reuse the resources from the Theme folder (for SfSchedule). The problem is that some properties have Internet Set, so it is not possible to import those generic.xaml resources into my project and change them. The problem lies on the Header component, as some properties (ex.: CurrentDate) has internal set (and thus, only work inside Syncfusion assembly).
I need to do some changes in the SfSchedule but I can't =\ The header is too big, there is no possibility to include some elements in it, etc.
We've licensed those components almost exclusively for SfSchedule, but we're regret =(