Calendar looks strange on mondays

13 posts, 0 answers
  1. Håkan
    Håkan avatar
    183 posts
    Member since:
    May 2011

    Posted 19 Sep 2011 Link to this post

    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


  2. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 21 Sep 2011 Link to this post

    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 >>

  3. DevCraft banner
  4. Pooja
    Pooja avatar
    55 posts
    Member since:
    Feb 2011

    Posted 26 Sep 2011 Link to this post

    Any idea when this issue will be fixed?
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 29 Sep 2011 Link to this post

    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 >>

  6. Dani
    Admin
    Dani avatar
    848 posts

    Posted 05 Oct 2011 Link to this post

    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 >>
  7. Håkan
    Håkan avatar
    183 posts
    Member since:
    May 2011

    Posted 05 Oct 2011 Link to this post

    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


  8. Dani
    Admin
    Dani avatar
    848 posts

    Posted 07 Oct 2011 Link to this post

    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 >>
  9. Dani
    Admin
    Dani avatar
    848 posts

    Posted 07 Oct 2011 Link to this post

    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 >>
  10. Kjell
    Kjell avatar
    276 posts
    Member since:
    Jun 2010

    Posted 20 Nov 2011 Link to this post

    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.
  11. Kjell
    Kjell avatar
    276 posts
    Member since:
    Jun 2010

    Posted 20 Nov 2011 Link to this post

    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.

  12. Dani
    Admin
    Dani avatar
    848 posts

    Posted 22 Nov 2011 Link to this post

    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 >>
  13. Håkan
    Håkan avatar
    183 posts
    Member since:
    May 2011

    Posted 28 Nov 2011 Link to this post

    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



  14. Dani
    Admin
    Dani avatar
    848 posts

    Posted 29 Nov 2011 Link to this post

    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 >>
Back to Top
DevCraft banner