Hello.
I am using a XamScheduleView.
JournalPresenter is displayed above JournalPresenter.StartLocal is even one minute earlier than ActivityPresenter.StartLocal, but I think how to display below ActivityPresenter always JournalPresenter?
<ig:XamScheduleView.Resources> <Style TargetType="igP:ScheduleActivityPanel"> <Setter Property="Control.Template"> <Setter.Value> <ControlTemplate> <StackPanel /> </ControlTemplate> </Setter.Value> </Setter> </Style> </ig:XamScheduleView.Resources>
I tried to set the style to try, but there is no change in behavior. I look at the code, but it would be useless if you do not change the implementation of ScheduleActivityPanel?
Then, it is although many things were tried. i was disappointment to bind Metadata. (--;Then, it wrote as follow code-behind.
-------------------------------Private Class HeaderInfo Property Border As Border Property CalenderId As String Property IsParent As Boolean Property ResourceId As StringEnd Class
Private _HeaderInfos As New List(Of HeaderInfo)
Private Sub CalendarHeaderVertical_Loaded(sender As Object, e As RoutedEventArgs) Dim header = TryCast(sender, CalendarHeaderVertical) Me.AddHeaderInfo(header)End Sub
Private Sub AddHeaderInfo(header As CalendarHeaderVertical) If header.Calendar Is Nothing Then Return
Dim border = TryCast(Utilities.GetDescendantFromType(header, GetType(Border), True), Border) Dim info = New HeaderInfo() With { .Border = border, .CalenderId = header.Calendar.Id, .IsParent = Not header.Calendar.Id.Contains("J"), .ResourceId = header.Calendar.OwningResourceId }
If _HeaderInfos.Where(Function(i) i.CalenderId = info.CalenderId).Count = 0 Then HeaderInfos.Add(info) End If Me.SetCalendarHeaderBackground()End Sub
Private Sub SetCalendarHeaderBackground() For Each info In _HeaderInfos Dim parent = _HeaderInfos.Where(Function(i) i.ResourceId = info.ResourceId AndAlso i.IsParent) If parent.Count <> 0 Then info.Border.Background = parent.First().Border.Background End If Next End Sub-------------------------------
This is Result View.It became the expected results a little. :)
Thanks.
Hello,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Hello Stefan.
Thank you. It's very helpful to your sample.However, it is regrettable your sample, but all Resources will become the same Background. I am looking at now, "generic.shared.xaml". I hope to set for each resource the ComputedBackground・・・I will try so that they refer to the sample of the following thread, and allowed to bind to the template.
http://ko.infragistics.com/community/forums/p/48151/297124.aspx#297124
<Style TargetType="igSchedulePrim:CalendarHeaderVertical"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="igSchedulePrim:CalendarHeaderVertical"> <Border BorderBrush="{TemplateBinding ComputedBorderBrush}" BorderThickness="1" Background="{Binding Metadata[Background]}" Padding="{TemplateBinding Padding}" igPrim:XamlHelper.SnapsToDevicePixels="True"> ・・・・・・</Style>
I have created a sample project for you with the functionality you want. Basically I created a Style for the CalendarHeaderVErtical element and handle its Loaded event. In the handler I change the Background of a border inside its template. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
I appreciate your opinion.Provisional correspondence, It corresponded with displayed separately in each of Calendar Appointments and Journals.Divide the Calendar, Background is different, so it is a little troubled.Although I hope can unify the Background for each the Resource.--;
http://cdn-ak.f.st-hatena.com/images/fotolife/h/hilapon/20140828/20140828121449.png