This is a migrated thread and some comments may be shown as answers.

Calendar looks strange on mondays

12 Answers 55 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Håkan
Top achievements
Rank 1
Håkan asked on 19 Sep 2011, 08:04 AM
Hi,

I have a month view that is a bit retemplated.
First I have stretched the "GoToDay" button to fill the whole MonthViewItem lite this:
<Style x:Key="TimeRulerMonthViewItemStyle" TargetType="local:TimeRulerMonthViewItem">
       <Setter Property="Foreground" Value="{StaticResource MonthViewTimeRulerItemForeground_Normal}" />
       <Setter Property="Margin" Value="0 -1 -1 1" />
       <Setter Property="Template">
           <Setter.Value>
               <ControlTemplate TargetType="local:TimeRulerMonthViewItem">
                   <Grid>
                       <telerik:RadButton VerticalAlignment="Stretch" Padding="0" Style="{StaticResource GoToDayButtonStyle}" Command="local:RadScheduleViewCommands.SetDayViewMode" CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.DateTime.Date}">
                           <StackPanel Orientation="Vertical" VerticalAlignment="Center" IsHitTestVisible="False">
                               <TextBlock Text="{Binding Content.DateTime.Day, RelativeSource={RelativeSource TemplatedParent}}" Foreground="{StaticResource TextBrush}" Opacity="0.75" HorizontalAlignment="Center" FontSize="24" />
                               <TextBlock Text="{Binding Content.DateTime, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DateTimeConverter}, ConverterParameter='MMMM'}" Foreground="{StaticResource TextBrush}" Opacity="0.75" HorizontalAlignment="Center" FontSize="10" Margin="0,-10,0,0" />
                           </StackPanel>
                       </telerik:RadButton>
                   </Grid>
               </ControlTemplate>
           </Setter.Value>
       </Setter>
   </Style>
<Style x:Key="TimeRulerMonthViewTodayItemStyle" TargetType="local:TimeRulerMonthViewItem">
       <Setter Property="Foreground" Value="{StaticResource MonthViewTimeRulerItemForeground_Normal}" />
       <Setter Property="Margin" Value="0 -1 -1 1" />
       <Setter Property="Canvas.ZIndex" Value="1" />
       <Setter Property="Template">
           <Setter.Value>
               <ControlTemplate TargetType="local:TimeRulerMonthViewItem">
                   <Grid>
                       <telerik:RadButton VerticalAlignment="Stretch" Padding="0" Margin="0,0,1,0" Style="{StaticResource GoToDayTodayButtonStyle}" Command="local:RadScheduleViewCommands.SetDayViewMode" CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.DateTime.Date}">
                           <StackPanel Orientation="Vertical" VerticalAlignment="Center" IsHitTestVisible="False">
                               <TextBlock Text="{Binding Content.DateTime.Day, RelativeSource={RelativeSource TemplatedParent}}" Foreground="{StaticResource TextBrush}" Opacity="0.75" HorizontalAlignment="Center" FontSize="24" />
                               <TextBlock Text="{Binding Content.DateTime, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DateTimeConverter}, ConverterParameter='MMMM'}" Foreground="{StaticResource TextBrush}" Opacity="0.75" HorizontalAlignment="Center" FontSize="10" Margin="0,-10,0,0" />
                           </StackPanel>
                       </telerik:RadButton>
                   </Grid>
               </ControlTemplate>
           </Setter.Value>
       </Setter>
   </Style>

That made my colored special slots for saturdays and sundays not fill the whole area.
I got a tip from you to change the margin of my customized special slots like this:

<local:CustomSpecialSlotStyleSelector x:Key="CustomSpecialSlotStyleSelector">
          <local:CustomSpecialSlotStyleSelector.SaturdayStyle>
              <Style TargetType="telerik:HighlightItem">
                  <Setter Property="Margin" Value="0,-37,0,0" />
                  <Setter Property="Template">
                      <Setter.Value>
                          <ControlTemplate>
                              <Border Background="{StaticResource GradientLightBlue}" Opacity="0.2"/>
                          </ControlTemplate>
                      </Setter.Value>
                  </Setter>
              </Style>
          </local:CustomSpecialSlotStyleSelector.SaturdayStyle>
          <local:CustomSpecialSlotStyleSelector.SundayStyle>
              <Style TargetType="telerik:HighlightItem">
                  <Setter Property="Margin" Value="0,-37,0,0" />
                  <Setter Property="Template">
                      <Setter.Value>
                          <ControlTemplate>
                              <Border Background="{StaticResource GradientLightRed}" Opacity="0.2"/>
                          </ControlTemplate>
                      </Setter.Value>
                  </Setter>
              </Style>
          </local:CustomSpecialSlotStyleSelector.SundayStyle>
      </local:CustomSpecialSlotStyleSelector>

That made the slots fill the whole area fine, but then I got this strange behavior on mondays.
See attached images.
On mondays the orange color from "Today" is spread across the whole week as you can see.
Any other day of week it looks fine. For the second image, "correct tuesday.png" I just changed the date on my computer and reloaded the page.

I have now removed the special slots, but its still the same error. So I start to think that I have made another change that caused this, but I can't find out what.

Do you have any ideas?

Regards,
Håkan


12 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 21 Sep 2011, 10:40 AM
Hello Håkan,

It seems that this is a bug in RadScheduleView control. We logged it and we will fix it for the next version of the control.

Your Telerik points have been updated.

Greetings,
Rosi
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Pooja
Top achievements
Rank 1
answered on 26 Sep 2011, 07:22 AM
Any idea when this issue will be fixed?
0
Konstantina
Telerik team
answered on 29 Sep 2011, 08:03 AM
Hello Pooja,

We have logged this issue in PITS. You can view it here. You can vote for it and track its status, so that you can see when it is going to be fixed.

Greetings,
Konstantina
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Dani
Telerik team
answered on 05 Oct 2011, 10:44 AM
Hello Håkan, Pooja

We have been investigating the issue further. This bug was reported some time ago and exists with dll version 0712, which is the 2011 Q2 release. The issue was fixed in 0920, i.e. the recent 2011 Q2 SP1 release. Please, test your application with the latest assemblies.

If the problem persists, please let me know.


Kind regards,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Håkan
Top achievements
Rank 1
answered on 05 Oct 2011, 10:56 AM
Hi,

I installed the dev release "RadControls_for_Silverlight4_2011_2_0920_Dev.msi" last week and it still looks strange.
I havent actually tested it on a monday, but I changed the date on my computer clock to monday and I got the same error.

- Regards
Håkan


0
Dani
Telerik team
answered on 07 Oct 2011, 01:44 PM
Hi Håkan,

The problem you described is not actually related to Monday as a day of the week but rather to the Today template for the group headers. Still, I tested the case with 0920 Dev version of the SIlverlight RadControls and I was unable to reproduce the issue.

Attached are screenshots of the result I get when using 0920 Dev and your customized time ruler item templates.

Is it possible that you could send us a sample project reproducing the issue, which we can test?

All the best,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Dani
Telerik team
answered on 07 Oct 2011, 03:40 PM
Hello Håkan, Pooja    

Upon further testing and investigation, the bug was identified and fixed. The fix will be available in the next LIB.

Kind regards,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Kjell
Top achievements
Rank 1
answered on 20 Nov 2011, 08:20 PM
It's Sundays in my case but I think I am experiencing the same issue with the latest DLL (1022.3.1116.1040).   It seems like kind of a big deal, one day per week there is an obvious visual blemish.  I think I'm just going to remove the today border completely as a temp work around.
0
Kjell
Top achievements
Rank 1
answered on 20 Nov 2011, 09:27 PM

I was able to kind of fix this by editing the "<VisualState x:Name="TodayHorizontal">" section of the style template.
It still highlights the vertical week but that's no big deal to me.

0
Dani
Telerik team
answered on 22 Nov 2011, 02:32 PM
Hello Kjell,

This issue has already been fixed. The fix is also available in assemblies released with 2011 Q3. If you encounter any issue, please send a reproducable sample which we can test so that we can identify the problem.

Regards,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Håkan
Top achievements
Rank 1
answered on 28 Nov 2011, 09:40 AM
Hi,

I can still reproduce the problem in the Q3 release.

I took your Theming demo and stripped it down to a minimum:
<UserControl x:Class="Telerik.Windows.Examples.ScheduleView.Theming.Example"
        xmlns:local="clr-namespace:Telerik.Windows.Examples.ScheduleView.Theming">
 
    <UserControl.Resources>
        <local:ViewModel x:Key="ViewModel" />
    </UserControl.Resources>
 
    <Grid DataContext="{StaticResource ViewModel}">
        <telerik:RadScheduleView x:Name="ScheduleView" AppointmentsSource="{Binding Appointments}">
            <telerik:RadScheduleView.ViewDefinitions>
                <telerik:MonthViewDefinition />
            </telerik:RadScheduleView.ViewDefinitions>
        </telerik:RadScheduleView>
    </Grid>
</UserControl>

And the code behind:
using System.Collections.ObjectModel;
using System.Windows.Controls;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.ScheduleView;
 
namespace Telerik.Windows.Examples.ScheduleView.Theming
{
    public partial class Example : UserControl
    {
        public Example()
        {
            this.InitializeComponent();
        }
    }
 
    public class ExampleViewModel<T> : ViewModelBase where T : IAppointment
    {
        private ObservableCollection<T> appointments;
        public ObservableCollection<T> Appointments
        {
            get
            {
                if (this.appointments == null)
                    this.appointments = new ObservableCollection<T>();
                return this.appointments;
            }
        }
    }
 
    public class ViewModel : ExampleViewModel<Appointment>
    {
    }
}

And I still get an orange border around all days in the week when today is the first day of the week, see attached image.

Regards,
Håkan



0
Dani
Telerik team
answered on 29 Nov 2011, 10:06 AM
Hello Håkan,

Thank you for your feedback.

The issue that started this thread was related to the actual group header being stretched through the entire width of the control in MonthView. That issue was fixed in 2011 Q3 release.

Yet, your feedback helped us identify another similar issue related to the today border alignment in month view, again reproducable with similar steps. The latter will be fixed and the fix will be available in the nearest LIB.

Thank you for your involvement.

Greetings,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
ScheduleView
Asked by
Håkan
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Pooja
Top achievements
Rank 1
Konstantina
Telerik team
Dani
Telerik team
Håkan
Top achievements
Rank 1
Kjell
Top achievements
Rank 1
Share this question
or