Remove Borders

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.


Attachment: Project_f842c79.zip

6 Replies 1 reply marked as answer

VO Vishal Omprasad Syncfusion Team May 6, 2024 01:50 PM UTC

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.



TJ TIAGO JOSE MOTA COSTA May 6, 2024 11:54 PM UTC

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:
image_4.png


and this is the style I wish to achieve:
image_12.png

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



VM Vidyalakshmi Mani Syncfusion Team May 9, 2024 01:57 PM UTC

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.



Attachment: WpfApp2_5e42de0f.zip


TJ TIAGO JOSE MOTA COSTA May 10, 2024 12:53 PM UTC

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



VM Vidyalakshmi Mani Syncfusion Team May 13, 2024 01:43 PM UTC

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.




VM Vidyalakshmi Mani Syncfusion Team May 15, 2024 02:19 PM UTC

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.



Marked as answer
Loader.
Up arrow icon