Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Time Labels Disappear from Timetable View (Read 4114 times)
AJ
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Apr 22nd, 2022
Time Labels Disappear from Timetable View
Apr 22nd, 2022 at 9:06am
Print Post  
Hi All!

First post here and I'm very new to the calendar control. I've just started playing with it and am particularly interested in Timetable view. I have no problem creating multiple days, setting up day start, time intervals, work day and adding appointments to the calendar. My problem is disappearing time labels to the left of the control.

Here's my XAML:

Code (HTML)
Select All
<mf:Calendar Grid.Row="1" Theme="Windows2003" Name="calDiary" CurrentView="{Binding ElementName=cbView, Path=SelectedItem}"
                 LicenseKey="...">
 



and my code behind:

Code (C++)
Select All
        public void Reset()
        {
            if (_calendar is not null)
            {
                _calendar.BeginInit();
                _calendar.TimetableSettings = TimetableSettings;
                _calendar.TimetableSettings.Dates.Clear();

                DateTime start = new(2022, 04, 22);
                for (int i = 0; i < 3; i++)
                {
                    _calendar.TimetableSettings.Dates.Add(start + new TimeSpan(i, 0, 0, 0));
                }

                _calendar.Schedule.Items.Add(new Appointment()
                    {
                        HeaderText = "Meet Person A",
                        DescriptionText = "This is a test appointment",
                        StartTime = start + new TimeSpan(9, 0, 0),
                        EndTime = start + new TimeSpan(9, 30, 0)

                    }
                );

                _calendar.Schedule.Items.Add(new Appointment()
                {
                    HeaderText = "Meet Person B",
                    DescriptionText = "This is another test appointment",
                    StartTime = start + new TimeSpan(1, 10, 0, 0),
                    EndTime = start + new TimeSpan(1, 10, 30, 0)

                }
                );

                _calendar.EndInit();
            }

            NotifyPropertyChanged(nameof(Calendar));
        }

        public static TimetableSettings TimetableSettings
        {
            get;
            private set;
        } = new()
            {
                StartTime = 8 * 60,
                EndTime = 18 * 60,
                WorkTimeStarts = new() { new(9, 0, 0), new(14, 0, 0) },
                WorkTimeEnds = new() { new(13, 0, 0), new(17, 0, 0) },
                CellTime = new(0,5,0),
                ShowWorkTime = true,
                ShowAM = true
            };
 



My first instinct is that there's something else I should be adding to TimetableSettings to enable these labels. Other than that, everything works as expected - the Month View has all its labels. PS: This is a small test project so sorry for the code!

Any suggestions welcome!

Cheers,
Adam
  

tt.png ( 19 KB | 122 Downloads )
tt.png
Back to top
 
IP Logged
 
AJ
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Apr 22nd, 2022
Re: Time Labels Disappear from Timetable View
Reply #1 - Apr 22nd, 2022 at 11:36am
Print Post  
Solution Found! I'll post here for anyone experiencing the same thing:

I use the Xceed WPF Toolkit and was displaying the calendar in an Xceed Grid. If I display in a MS WPF grid, this solves the problem. Annoying, because I used Xceed for everything. Even if I add a ContentControl inside the grid the problem persists. But at least I've solved the problem. I don't know what causes the issue but it's probably worth looking at for a bug fix, as I can't be the only one who uses Xceed. I'll raise it as an issue with Xceed too as the bug could be their end!

Cheers,
Adam
  
Back to top
 
IP Logged
 
Slavcho
God Member
*****
Offline


tech.support

Posts: 3207
Joined: Oct 19th, 2005
Re: Time Labels Disappear from Timetable View
Reply #2 - Apr 22nd, 2022 at 3:45pm
Print Post  
Hi!

Thanks for letting us know. Maybe the parent grid affects some defaults for font size or text color / padding, making labels invisible or not fitting inside header area. Our developer will investigate when we have the chance.

Regards,
Slavcho
Mindfusion

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint