Hi,
I saw the outlook sample, and I need to show a week view with days side by side like outlook 2007.
When I click "show work week" I see what I want, and I tried to figure out how to do it but no luck (I looked at the code). My week view looks like two columns with 3 or 4 days in the same column (like outlook 2003).
Also, is it possible to show the days from right to left?
Thanks
Amiram Korach said: I saw the outlook sample, and I need to show a week view with days side by side like outlook 2007. When I click "show work week" I see what I want, and I tried to figure out how to do it but no luck (I looked at the code). My week view looks like two columns with 3 or 4 days in the same column (like outlook 2003).
Please see this thread.
Amiram Korach said:Also, is it possible to show the days from right to left?
I have never tried to do this, but, as a suggestion, isn't the RightToLeft property what you are looking for?
HTH,
Emanuel
About the RightToLeft, as I said Infragistics has ignored that as far as I know, but I tried today to create my first creation filter and looks like it is very simple to do it:
{
parent.ChildElements[i].Rect = parent.ChildElements[parent.ChildElements.Count - (i + 1)].Rect;
parent.ChildElements[parent.ChildElements.Count - (i + 1)].Rect = rect;
}
I wonder if I can make more controls be right-to-left like that.
This post is a little old. But I thought there might be lots of Arabic, Persian and Hebrew users who would want to make the DayView right to left. I did it like this:
public partial class Form1: Form, Infragistics.Win.IUIElementCreationFilter {
private void Form1_Load(object sender, EventArgs e) { ultraDayView1.CreationFilter=this; }
public void AfterCreateChildElements(UIElement parent) {
// if the mainUIElement of the DayView is being added if (parent is MainUIElement) {
// ChildElements 1-to-8 are the 7 days of the week, // invert their positions (1 to 7, 2 to 5, 3 to 4) for (int i = 1; i < 4; i++) { GroupUIElement col1 = (GroupUIElement)parent.ChildElements[i]; GroupUIElement col2 = (GroupUIElement)parent.ChildElements[8-i]; Rectangle rect1 = ((GroupUIElement)parent.ChildElements[i]).Rect; Rectangle rect2 = ((GroupUIElement)parent.ChildElements[8-i]).Rect; col1.Rect = rect2; col2.Rect = rect1; } } } public bool BeforeCreateChildElements(UIElement parent) { return false; }
Note that this only works if DayView is displaying 7 days of the week. For 5 days or any other number, you should make a little change to the numbers in the "for" clause (you should use something else instead of 4 & 8).
And please note that after doing this, a lot things won't work. like dragging appointments, or changing the days with keyboard arrows, or resizing day columns. So you better disable or rewrite them.