I have a request from a client to create a new interface for some proprietary scheduling data we have in our SQL database.
The requirements are as follows:
The scheduling data needs to be laid out in a calendar format to be able to be viewed 1 day/week/2 week/month at a time and be able to switch between these views.Inside each day there needs to be detail and summary data. That detail and summary data can consist of multiple rows (tasks) and columns of data, all of which could have a custom format (text/back color) applied to them.They also want to see something like a progress bar as a background of each row that shows the percent completion of each task (row).
I was wondering if I could use an UltraMonthViewMulti or a UltraMonthViewSingle as the primary calendar control for this, possibly inject 2 wingrids to get the rows & columns (with formatting ability), but I am not sure if it would be the right way to go, or truly even how to accomplish this.
I appreciate any help or suggestions in this matter.
Seradex
I have actually just been playing in the DataBound Calendar sample. This is where I have experienced this behaviour. I don't know what style library it uses, but I suspect it is a default one. I have attached my current version of that project (VB format) including the shared GetStyleLibrary.vb file to show that I have not changed the shared file. Currently the code to use a custom draw filter is commented out.
My concerns are as follows (when UseAppStyling set to False) in order of importance (first is most important). All of these can be seen in the screenshot from my previous post (left side of image has UseAppStyling set to False) 1. The description of the appointment shows the start & end time in the UltraDayView. - must change this back to only the description.
If not possible to do these then we can live with current behaviour. 2. The day header shows "Friday, November 20" instead of "Friday" centered and "20" at the left side. - Would be very nice to determine how to control this.
Nice to haves 3. Appointment border is black and square instead of same as back color and with rounded corners. 4. Day back color is aweful yellow instead of a nicer light green or blue like in office or light gray as in right side of screen shot.
Must not have the dark gray/black scroll bar as this is inconsistent with the rest of our application which uses the standard gray windows forms scroll bars.
My preference would be to do this via code instead of a stylesheet file (.isl) as my guess is that it would be easier to read & understand. Note that I am unfamiliar with the .isl format. If it is actually like web css (i.e. is a simple text file), and can be embedded in the dll, then this may be easier to use.
As always, I greatly appreciate all of your help with this.
Hi,
Which Style Library (isl file) are you using? Is it one of the ones we provide or did you create your own?
Style Libraries override any settings on the control. This allows you to load one into an existing app and have it override any appearances you already set.
So if you want to use an isl and also set some colors in the app, you have two options.
1) You can modify the isl file so that it doesn't set those colors - thus the isl will not override the app settings so you can set those colors in the application.
2) Set the colors you want in the isl file itself.
I'm afraid I can't tell you off the top of my head exactly which properties you need to set in the isl to achieve what you want. The resolution process is quite complex and the override could be coming from any one of a dozen different objects. What I usually do in situations like this is I run AppStylist and go to the canvas that has the control I want. In this case, you would go to the schedule tab and find a DayView control.
Then mouse over the DayView and when the RoleTip comes up, you can press 'C'. This will bring you to the Control role for that control. On the bottom, you will see one or two property grids with properties applied to that control by the isl. You can try changing or resetting these to see if you get the effect you want. My guess is that a lot of the settings in the isl are applied via the ViewStyle or Style property.
If the control role doesn't help, you can try going back to the DayView and pressing the number '1'. This will bring you to the UIRole of whatever element you happen to have the mouse over. You probably want to have the mouse over an appointment when you do this, since that's what you are concerned with here. You can then Reset the entire UIRole and see what happens. This will tell you if that's where the colors are coming from. If not, you can walk up the parent chain and reset each role in turn to find the one you need by process of elimination.
If even the DrawFilter has no effect, then the problem might be that the control is drawing using OS Themes, but that seems unlikely, as all of our isl files turn off themes.
If you could send me a sample showing the problem and explain what you want to do, I could look into it further and try to point you in the right direction.
Hopefully this is the last question/problem before we start coding.
I was playing with the sample and attempted to apply Category Colors like in Outlook, but that ability appears to be missing from this version of the controls. I tried to set the back color of the appointment to get the same effect as using category colors, but it refused to have an effect. I finally determined that it was because the UltraDayView control had the UseAppStyling set to True. Once I set it to false, the back colors appeared as I wanted them to, however now the UltraDayView control and appointment look very different compared to before.
Most of the differences are just round vs square style, a shadow effect, how the day header is shown, and color differences, which can be either dealt with or ignored, although I would prefer it to look more modern like it does when using AppStyling, but this is definitely not a showstopper.
I tried to use the Infragistics "AppStylist for Windows Forms", but am completely lost trying to navigate through it and to even start with it.
I also found this: http://ko.infragistics.com/community/forums/t/37675.aspx, and tried to use a draw filter with UseAppStyling set to True, but it had no effect. I even tried overriding additional DrawPhases, to no affect.
The biggest concern is with UseAppStyling set to False, it now shows the start & end times with the appointment description. The attachment shows UseAppStyling set to False on the left side and set to True on the right side.
Any info you can provide to correct this would be greatly appreciated. If you have any info on how to re-apply any of the other missing changes as well, that would be appreciated (you can forget about the scroll bar difference since the new style with be inconsistent with the rest of our app).
I am basically trying to figure out what are the obstacles we may encounter when coding to reduce the amount of time spent on it and to ensure that there are no show stoppers for this project.
For the locking I determined that the following appears to be sufficient to prevent the unwanted changes (and to launch a custom form).
Private Sub ultraCalendarInfo1_BeforeDisplayAppointmentDialog(sender As Object, e As Infragistics.Win.UltraWinSchedule.DisplayAppointmentDialogEventArgs) Handles ultraCalendarInfo1.BeforeDisplayAppointmentDialog e.Cancel = True Dim frm As Form2 frm = New Form2 frm.ShowDialog() frm.Close() frm.Dispose() frm = Nothing End Sub Private Sub ultraDayView1_BeforeAppointmentEdited(sender As Object, e As Infragistics.Win.UltraWinSchedule.CancelableAppointmentEventArgs) Handles ultraDayView1.BeforeAppointmentEdited e.Cancel = True End Sub Private Sub ultraDayView1_BeforeAppointmentResized(sender As Object, e As Infragistics.Win.UltraWinSchedule.BeforeAppointmentResizedEventArgs) Handles ultraDayView1.BeforeAppointmentResized e.Cancel = True End Sub Private Sub ultraDayView1_BeforeAppointmentsDeleted(sender As Object, e As Infragistics.Win.UltraWinSchedule.BeforeAppointmentsDeletedEventArgs) Handles ultraDayView1.BeforeAppointmentsDeleted e.Cancel = True End Sub Private Sub ultraCalendarInfo1_BeforeDisplayAppointmentRecurrenceDialog(sender As Object, e As Infragistics.Win.UltraWinSchedule.DisplayAppointmentRecurrenceDialogEventArgs) Handles ultraCalendarInfo1.BeforeDisplayAppointmentRecurrenceDialog e.Cancel = True End Sub
Okay. I get the impression that you are in a sort've research phase right now and aren't ready to start coding. So unless you have more questions I'm thinking it will be a good idea to close this case for now, and then when you reach the point where you need to put the ProgressBars into the tasks or you have some other questions, you can start a new one. Does that make sense? Or do you still have more questions to discuss now? :)