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

ReadOnly Appointments in ScheduleView

13 Answers 367 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Hamza
Top achievements
Rank 1
Hamza asked on 09 Apr 2011, 09:29 AM
Hi,
I've been using Telerik ScheduleView for Silverlight, and It's really awesome.
But, I wanted all the appointments to be readonly. When I worked with Scheduler, it was so easy, I just had to make the IsReadOnly property of the control to true. But with the ScheduleView, it's a bit more difficult.
Please, can you tell me what's the simplest way to have this working ?

13 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 11 Apr 2011, 08:33 AM
Hi Hamza,

Our First Look example is demonstrating a more complex way to achieve read-only RadScheduleView. Please, check the following example and help article for more information:
http://www.telerik.com/help/silverlight/radscheduleview-features-speacialslots.html
http://demos.telerik.com/silverlight/#ScheduleView/SpecialSlots

Greetings,
Valeri Hristov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Hamza
Top achievements
Rank 1
answered on 11 Apr 2011, 10:34 AM
Hello, and thanks for replying
I've managed to do it following the example in the online help, and it works fine.
Still, another issue. The appointments in the special slots are also grayed, and even after changing the slot style using SpecialSlotStyleSelector, they are still grayed. I'm looking now for the way to change their style.

Regards,
Hamza

0
Pana
Telerik team
answered on 13 Apr 2011, 08:23 AM
Hi Hamza,

You need to remove the ReadOnlyVisual elements from the AppointmentItem's default Styles. I am attaching RadScheduleView's Styles from Office_Black with the appointments modified. You can use the AppointmentItemStyleSelector from the attached xaml in your project to remove the IsReadOnly gray overlay.

Greetings,
Pana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Hamza
Top achievements
Rank 1
answered on 13 Apr 2011, 08:48 AM
Hi Pana,
Actually, I found another solution in this post:
http://www.telerik.com/community/forums/wpf/scheduleview/read-only-not-supported.aspx
but I think the one you posted would be more "elegant" :) . I'll try it out later and let you know about the results.
Thank you for your help

Regards,
Hamza


0
Pana
Telerik team
answered on 13 Apr 2011, 09:08 AM
Hi Hamza,

It is up to you to decide which one to use. If you have further questions do not hesitate to contact us again.

All the best,
Pana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Hamza
Top achievements
Rank 1
answered on 04 May 2011, 04:04 PM
Hello again,Pana
I have used the style you provided in my project, and it works as it should. In fact, I could modify the appearance of the control as needed. Thank you very much, that was a great help. But, the style uses Office_Black theme, and when I changed it to Windows7 theme, it's still the old one. Another problem is that I want to set the theme at application level, so that all my controls have the same theme.
How can I work this around ?

Greetings,
Hamza
0
Pana
Telerik team
answered on 05 May 2011, 06:31 AM
Hi Hamza,

The different themes use different ControlTemplates so if you modify a theme you can not easily reuse the control for other theme.

You can find the Windows7 theme for RadScheduleView for Silverlight in your installation of Telerik's RadControls for Silverlight. For example the path to the file on my computer is:

C:\Program Files (x86)\Telerik\RadControls for Silverlight Q1 2011 SP1\Themes\Windows7\Themes\Windows7\ScheduleView.xaml

The RadScheduleView is relatively new control so its themes are still color variations on the same ControlTemplate. This makes the development of new features easier. You can try to replace the Theme resource from <telerik:Office_BlackTheme x:Key="Theme" /> to <telerik:Windows7Theme x:Key="Theme" /> and move all brush resources from the Windows7's xaml int your project.

As for the global theme you can put:
StyleManager.ApplicationTheme = new Windows7Theme();
before InitializeComponent() in your MainPage.cs.

Regards,
Pana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Hamza
Top achievements
Rank 1
answered on 05 May 2011, 09:52 AM
Hi Pana,
Thank you for the instructions, I found the theme and used it in my project.
I just want to understand more. If we use the brushes and resources from the Windows7 theme ,why should we add
<telerik:Windows7Theme x:Key="Theme" /> to the style and use it in each control template ?


Regards,
Hamza Djebli
Software Developer
0
Pana
Telerik team
answered on 09 May 2011, 06:57 AM
Hello,

If you set telerik:StyleManager.Theme="Windows7" on the RadScheduleView it will set Windows7 to all smaller controls inside its ControlTempalte using the telerik:StyleManager.Theme="{StaticResource Theme}". Otherwise the styles will work only as application theme and if the theme is set locally on the control the smaller controls (buttons for example) will not get the theme and stay Office_Black.

Kind regards,
Pana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ronak
Top achievements
Rank 1
answered on 06 Jun 2011, 03:44 PM
Thanks Pana,
I wanted to achieve same thing want to get rid of Gray slots from Office Black theme and i have copy of your attached Project do i need to copy all xaml from theme file or just some part please advise me

Thanks
Ronak
0
Pana
Telerik team
answered on 08 Jun 2011, 12:00 PM
Hi Ronak,

You need the appointment style selector. You can set it to the RadScheduleView in your application. You will also need some brushes and converters used in the Styles and ControlTemplates for the appointments.

Kind regards,
Pana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ronak
Top achievements
Rank 1
answered on 09 Jun 2011, 02:12 PM
Thanks Pana for your reply
Do i need this two Brush
<SolidColorBrush x:Key="SpecialSlotBackground" Color="#334F4F4F" />
<SolidColorBrush x:Key="SpecialSlotBackground_ReadOnly" Color="#6B4F4F4F" />
and this style selector ?

	<local:SpecialSlotStyleSelector x:Key="SpecialSlotStyleSelector">
		<local:SpecialSlotStyleSelector.DefaultStyle>
			<Style TargetType="local:HighlightItem" BasedOn="{StaticResource HighlightItemStyle}">
				<Setter Property="BorderThickness" Value="0" />
				<Setter Property="Background" Value="{StaticResource SpecialSlotBackground}" />
			</Style>
		</local:SpecialSlotStyleSelector.DefaultStyle>
		<local:SpecialSlotStyleSelector.ReadOnlyStyle>
			<Style TargetType="local:HighlightItem" BasedOn="{StaticResource HighlightItemStyle}">
				<Setter Property="BorderThickness" Value="0" />
				<Setter Property="Background" Value="{StaticResource SpecialSlotBackground_ReadOnly}" />
			</Style>
		</local:SpecialSlotStyleSelector.ReadOnlyStyle>
	</local:SpecialSlotStyleSelector>
please advise i am confused here

Thanks
Ronak
0
Pana
Telerik team
answered on 15 Jun 2011, 08:15 AM
Hello Ronak,

You need the:

<

 

 

local:OrientedAppointmentItemStyleSelector x:Key="AppointmentItemStyleSelector">

 

As well as all resources it references. For example it has 3 styles that need the

AppointmentItemBaseStyle

and

AppointmentItemVerticalControlTemplate

They from other hand require

AppointmentItemHorizontalControlTemplate

AppointmentItemTemplate

RadScheduleForeground

AppointmentItemBackground

AppointmentItemOuterBorder

And so on. I guess you can also just keep the style file as it is so it would be easier.

Greetings,
Pana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ScheduleView
Asked by
Hamza
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Hamza
Top achievements
Rank 1
Pana
Telerik team
Ronak
Top achievements
Rank 1
Share this question
or