Hello,
I'm trying to create a borderless Scheduler, but I can't seem to find any answers in regards on how to do so.
Hi TIAGO,
Regarding “create a borderless Scheduler control”:
Based on the information provided, we have reviewed the reported query, but we are having difficulty to fully comprehend the details.
To better assist you, could you please provide more information by elaborating on your query in detail? This could include sharing a picture or video demonstration of your requirement in action.
This additional information will enable us to better evaluate your scenario and offer you a more effective solution. We appreciate your cooperation in this matter.
Regards,
Vishal O.
Hello and thank you for the quick response,
There are 2 things I want to do with my design and that's removing the any borders (like in the second image) and change the color of the days that aren't part of the current month
This is what I currently have:
and this is the style I wish to achieve:
with this code:
<Syncfusion:SfScheduler x:Name="schedule" SelectedDate="{Binding SelectedDate, Mode=TwoWay}" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="32,92,0,0" ViewType="Month" Width="126" Height="263" BorderThickness="0">
<Syncfusion:SfScheduler.MonthViewSettings>
<Syncfusion:MonthViewSettings>
<Syncfusion:MonthViewSettings.MonthCellTemplate>
<DataTemplate>
<Border Background="#050214">
<TextBlock Text="{Binding DateTime.Day}" FontFamily="Nunito Bold" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="White"/>
<Style.Triggers>
<DataTrigger Binding="{Binding DateTime.DayOfWeek}" Value="sunday">
<Setter Property="Foreground" Value="#C10C99"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</Border>
</DataTemplate>
</Syncfusion:MonthViewSettings.MonthCellTemplate>
<Syncfusion:MonthViewSettings.ViewHeaderTemplate>
<DataTemplate>
<Border Background="#050214">
<TextBlock FontFamily="Nunito Bold"
Background="#050214"
Text="{Binding DayText}"
HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="White"/>
<Style.Triggers>
<DataTrigger Binding="{Binding DayText}" Value="Sun">
<Setter Property="Foreground" Value="#C10C99"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</Border>
</DataTemplate>
</Syncfusion:MonthViewSettings.ViewHeaderTemplate>
</Syncfusion:MonthViewSettings>
</Syncfusion:SfScheduler.MonthViewSettings>
<Syncfusion:SfScheduler.HeaderTemplate>
<DataTemplate>
<Grid Background="#050214">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button Command="{Binding MoveToPreviousMonthCommand}" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Click="ButtonBackward_Click" Background="Transparent" BorderThickness="0">
<Image Source="Images/MesAnterior.png"/>
</Button>
<TextBlock Text="{Binding}" Grid.Column="1" FontFamily="Nunito Bold" FontSize="17" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" Foreground="White"/>
<Button Command="{Binding MoveToNextMonthCommand}" Grid.Column="2" HorizontalAlignment="Left" VerticalAlignment="Center" Click="ButtonForward_Click" Background="Transparent" BorderThickness="0">
<Image Source="Images/MesSeguinte.png"/>
</Button>
</Grid>
</DataTemplate>
</Syncfusion:SfScheduler.HeaderTemplate>
</Syncfusion:SfScheduler>
Regards,
Tiago Costa
Hi Tiago,
To change the color of the days that aren't part of the current month, you can use the Data triggers defined in the style, as shown in the following code snippet:
|
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
<DataTrigger Binding="{Binding DateTime.DayOfWeek}" Value="sunday"> <Setter Property="Foreground" Value="#C10C99"/> </DataTrigger>
<DataTrigger Binding="{Binding Path=DayType}" Value="LeadingDay"> <Setter Property="Foreground" Value="Yellow"/> </DataTrigger>
<DataTrigger Binding="{Binding Path=DayType}" Value="TrailingDay"> <Setter Property="Foreground" Value="Chartreuse"/> </DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
|
This will change the text color of days that aren't part of the current month. We have also prepared a simple sample demonstrating this. Please see the attached sample for your reference.
Regarding your query about removing any borders, we are currently checking the reported query. We will investigate further and update you with the details on or before May 13, 2024.
Thank you for your patience and understanding.
Regards,
Vidyalakshmi M.
Thank you very much I'll implement that right away.
And I hope for a response regarding my original request as fast as possible.
Regards,
Tiago Costa
Hi Tiago,
Regarding your query about removing any borders, currently, we are analyzing the reported query at source; we will validate and update you with further details on or before May 15, 2024. We appreciate your patience until then.
Regards,
Vidyalakshmi M.
Hi Tiago,
Regarding the query about removing borders in the month view, we have investigated and found that there is a framework issue preventing the border from being made invisible. We have logged an issue report with the framework team.
You can refer to the following link for your reference: WPF-issues-9107
Rest assured, we are actively monitoring this report and will keep you informed of any updates provided by the framework. Thank you for your understanding and patience.
Regards,
Vidyalakshmi M.