How would you override the all day style on XamSchedule
https://drive.google.com/file/d/0B54poX_m_nCIcmZiZHhvc29KMFk/view
As you can see its blue which comes from the theme that was set, how would you override this style?
Hello,
In order to modify the elements from the attached screenshot, I can suggest to create styles for DayViewDayHeader and MultiDayActivityArea, for example:
<Style TargetType="{x:Type igPrim:DayViewDayHeader}"> <Style.Resources> <Style TargetType="{x:Type igPrim:ScheduleDateTimePresenter}"> <Style.Resources> <Style TargetType="{x:Type TextBlock}"> <Setter Property="Foreground" Value="Red"/> </Style> </Style.Resources> </Style> </Style.Resources> </Style>
<Style TargetType="igSchedulePrim:MultiDayActivityArea"> <!--<EventSetter Event="Loaded" Handler="DayArea_Loaded"/>--> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="igSchedulePrim:MultiDayActivityArea"> <Border BorderBrush="{TemplateBinding ComputedBorderBrush}" BorderThickness="{TemplateBinding ComputedBorderThickness}" Background="Yellow" Padding="{TemplateBinding Padding}" igPrim:XamlHelper.SnapsToDevicePixels="True"> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style>
If you would like to modify the AppointmentPresenter, I can say that the best approach is to copy the default template of the AppointPresetner and all the required/supporting items (i.e. converters, styles, etc.) that are referenced by the template from here: C:\Program Files (x86)\Infragistics\2016.1\WPF\DefaultStyles\Schedule\ generic.shared.xaml So you can modify the appointment style as you wish. Otherwise you may lose some of the built in functionality of the control. For example you can find the element with name equal to BorderPath and change its Fill property.
I have created simple sample application based on your scenario in order to show you how can implement my suggestions and achieve your goal. Please let me know you have further questions on this matter.
Sincerely, ZhivkoEntry Level Software Developer
Hi sorry for long delay, this was not a urgent thing but has come back round again.
https://drive.google.com/file/d/0B54poX_m_nCINWNicUYzYmdBT00/view
I've put a box around the area I'm talking about. Either the style of the text of the all day appointment or the background color.
Also is it also possible to change the color of the all day appointment area the blue color is too similar to the style around it.
Thanks for your help in advance
Hello Dev Manager,
I have been looking into the image that you have attached and it seems I am not sure what style you want to override. Are you referring to the AppointmentPresenter style? Would you please provide me with a screenshot pointing what color exactly you want to change? You can take a look at the following link from our online documentation regarding all styling points in our XamSchedule control:
http://help.infragistics.com/Help/Doc/WPF/2016.1/CLR4.0/html/Designers_Guide_Styling_Points_for_xamSchedule.html