Current filter:
                                You should refresh the page.
                                  • We are currently using DevExpress 14.1.5 WPF Libraries, in particular the Scheduler controls etc.

                                    We are also developing a mobile counterpart in Xamarin as a result we are exploring how we can consume all Appointment data that's generated and stored from the WPF libraries.


                                    It seems like the DevExpress XtraScheduler .NET Standard libraries, vary  a little bit.

                                    For Example:

                                    [C#]
                                    var appointment = StaticAppointmentFactory.CreateAppointment(AppointmentType.Pattern); var pattern = "<RecurrenceInfo Start=\"11/25/2018 13:00:00\" End=\"12/04/2018 13:00:00\" " + "AllDay=\"True\" Id=\"a930b26f-a797-4619-b5a2-04206dbf3109\" OccurrenceCount=\"10\" Range=\"2\" />"; appointment.RecurrenceInfo.FromXml(pattern);


                                    FromXml doesn't enable us to inform the deserializer that the Start and End dates in the XML Pattern is actually UTC values.

                                    As a result, when we go and generate the occurences like this:

                                    [C#]
                                    appointment.Start = DateTime.Parse("2018-11-25T13:00:00Z", CultureInfo.CurrentCulture, DateTimeStyles.RoundtripKind).ToLocalTime(); appointment.End = DateTime.Parse("2018-11-26T13:00:00Z", CultureInfo.CurrentCulture, DateTimeStyles.RoundtripKind).ToLocalTime(); appointment.AllDay = true; var occurenceCalculator = OccurrenceCalculator.CreateInstance(appointment.RecurrenceInfo); var items = occurenceCalculator.CalcOccurrences(new TimeInterval(DateTime.MinValue, DateTime.MaxValue), appointment); Assert.Equal(10, items.Count);

                                    The count equates to 11 as opposed to 10, I am assuming the Start and End of the recurrence info is not being handled correctly.

                                    Can you please supply code examples on how we should be correctly consuming our existing RecurrenceInfo xml in the context of the DevExpress XtraScheduler .NET Standard library?

                                    Because a lot of the API and documentation appears to refer to SchedulerStorage or the SchedulerControl, all of which does not exist in the XtraScheduler .NET Standard/Cross Platform libraries.


                                    Thank you.

                                • Sasha (DevExpress Support) 11.16.2018

                                  Hello Bart,

                                  We need some time to research this behavior. Please bear with us. We will update this thread as soon as possible.

                                • Bart Vadala 11.17.2018
                                  Thank you for your reply.

                                  Looking forward to a solution as this is quite important to us to determine if we are to acquire a licence for the newer version and our continued use of DevExpress products.

                                  t‍hank you
                                • Bart Vadala 11.21.2018
                                  Hello,

                                  Has there been any updates with this?

                                  t‍hank you
                                • Svetlana (DevExpress Support) 11.21.2018

                                  Hi Bart, 

                                  Our developers are very close to complete their investigation. Let me share our intermediate results with you. We determined that in the past we saved the AllDay attribute to an XML file when saving data by using our scheduler's library. However, then we decided to change the data saving logic. Because of this, now if your text contains AllDay, we suppose that occurrences should be created for all full days regardless of the hour part of End. We are planning to fix this shortcoming in the current version 18.2. Once we do this, I will update this thread. 

                                  In the meantime, please clarify if you switch to version 18.2 from 14.1. I am asking you since the fix I am talking about will be included in version 18.2.

                                  To ensure that we completely understand the required behavior, let me describe how I get it. Originally, you saved appointments by using the UTC format to XML and now you wish to load this saved information, so that the saved UTC DateTime values are converted to your local time zone values. Please correct me if I am wrong. 

                                • Bart Vadala 11.22.2018
                                  Let me lay this out a bit more clearly for you.

                                  We have a WPF Desktop Application, using DevExpress Scheduler Controls etc targeting DevExpress version 14.1.5. We save appointment data and recurrence info from this Desktop Application.


                                  We are currently authoring a Xamarin Mobile Application, we need to show recurring appointments, and we will synchronize appointment data that is saved from our WPF Desktop Application, and consume it on this new mobile application.

                                  As a result this new mobile application requires .NET Standard Libraries. so we are evaluating the DevExpress 18.2 Cross Platform .NET Libraries.

                                1 Solution

                                Creation Date Importance Sort by
                                We have finished our investigation and fixed the issue with creation of an extra occurrence in the scope of the An extra occurrence is created after calling the Appointment.RecurrenceInfo.FromXml method if an XML file contains the AllDay attribute thread. Please add that ticket to your Favorites to know when a hotfix is ready. When you install the hotfix, try the following code and let us know if it produces the desired result: 

                                [C#]
                                var appointment = StaticAppointmentFactory.CreateAppointment(AppointmentType.Pattern); var pattern = "<RecurrenceInfo Start=\"11/25/2018 13:00:00\" End=\"12/04/2018 13:00:00\" " + "AllDay=\"True\" Id=\"a930b26f-a797-4619-b5a2-04206dbf3110\" OccurrenceCount=\"10\" Range=\"2\" />"; appointment.TimeZoneId = "UTC"; LoadRecurrenceInfo(appointment, pattern); void LoadRecurrenceInfo(Appointment pattern, string xml) { if (String.IsNullOrEmpty(xml)) return; IRecurrenceInfo rinfo = ObjectFromXml(xml, new TimeZoneEngine(), pattern.TimeZoneId, DateTimeSavingMode.Appointment); pattern.RecurrenceInfo.Assign((RecurrenceInfo)rinfo, true); } internal static IRecurrenceInfo ObjectFromXml(string xml, TimeZoneEngine timeZoneEngine, string patternTimeZoneId, DateTimeSavingMode dateTimeSavingMode) { var objectFromXml = typeof(RecurrenceInfoXmlPersistenceHelper).GetMethod("ObjectFromXml", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static, Type.DefaultBinder, new Type[] { typeof(string), typeof(TimeZoneEngine), typeof(string), typeof(DateTimeSavingMode) }, null); return (IRecurrenceInfo)objectFromXml.Invoke(null, new object[] { xml, timeZoneEngine, patternTimeZoneId, dateTimeSavingMode }); }

                                If this approach is helpful, we will consider implementing a new overload for the FromXml method. 

                                Show all comments
                                • Bart Vadala 11.22.2018
                                  Thank you for looking into this. What's the general ETA of a hot fix?

                                  Once we get our hands on the hot fix we will confirm if it fixes our problem. Thank you.
                                • Bart Vadala 11.22.2018
                                  Also, a tiny bit concerning having a look at this code. Any reason why reflection was used to call into one of your own internal methods? Is the decision to expose it as a public member still to be decided?
                                • Svetlana (DevExpress Support) 11.23.2018

                                  Hi, 

                                  Usually, we prepare hotfixes within a week. We will update this thread and notify you via email. 

                                  Bart, the current code uses our internal members. That's why we have to use Reflection. Before introducing a new public overload for the FromXml method, we need to ensure that this approach is what you are looking for. Otherwise, such an overload will be unnecessary. Once you confirm the validity of this solution, we will add a corresponding overload. 

                                • Bart Vadala 11.29.2018
                                  We have downloaded the hot fix that was posted and ran it against our unit test, however oddly this time it's not an extra day rather the calculator now has one less day.

                                  So let me post all my snippets of code.

                                  Confirming that I am using the following assemblies:

                                  .NET Standard versions of the following DLL's:

                                  DevExpress.XtraScheduler.v18.2.Core.dll - Version 18.2.3.18333
                                  DevExpress.Data.v18.2.dll - Version 18.2.3.18333

                                  The following is the unit testing snippet we are running:


                                  [C#]
                                  [Fact] public void Should_yield_correct_occurences_for_daily_recurring_events_with_an_end_date() { var appointment = StaticAppointmentFactory.CreateAppointment(AppointmentType.Pattern); var pattern = "<RecurrenceInfo Start=\"11/28/2018 13:00:00\" End=\"12/13/2018 13:00:00\" " + "AllDay=\"True\" Id=\"72d90743-d2b3-48e8-b51a-75a4666c1e6d\" OccurrenceCount=\"16\" Range=\"2\" />"; appointment.TimeZoneId = "UTC"; LoadRecurrenceInfo(appointment, pattern); appointment.Start = DateTime.Parse("2018-11-28T13:00:00Z", CultureInfo.CurrentCulture, DateTimeStyles.RoundtripKind).ToLocalTime(); appointment.End = DateTime.Parse("2018-11-29T13:00:00Z", CultureInfo.CurrentCulture, DateTimeStyles.RoundtripKind).ToLocalTime(); appointment.AllDay = true; var occurenceCalculator = OccurrenceCalculator.CreateInstance(appointment.RecurrenceInfo); var items = occurenceCalculator.CalcOccurrences(new TimeInterval(DateTime.MinValue, DateTime.MaxValue), appointment); Assert.Equal(16, items.Count); } void LoadRecurrenceInfo(Appointment pattern, string xml) { if (String.IsNullOrEmpty(xml)) return; IRecurrenceInfo rinfo = ObjectFromXml(xml, new TimeZoneEngine(), pattern.TimeZoneId, DateTimeSavingMode.Utc); pattern.RecurrenceInfo.Assign((RecurrenceInfo)rinfo, true); } internal static IRecurrenceInfo ObjectFromXml(string xml, TimeZoneEngine timeZoneEngine, string patternTimeZoneId, DateTimeSavingMode dateTimeSavingMode) { var objectFromXml = typeof(RecurrenceInfoXmlPersistenceHelper).GetMethod("ObjectFromXml", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static, Type.DefaultBinder, new Type[] { typeof(string), typeof(TimeZoneEngine), typeof(string), typeof(DateTimeSavingMode) }, null); return (IRecurrenceInfo)objectFromXml.Invoke(null, new object[] { xml, timeZoneEngine, patternTimeZoneId, dateTimeSavingMode }); }
                                  I've attached two screenshots to this post. One is showing the debug of the unit testing. The other is what yielded output is using the DevExpress 14.1.5 WPF Scheduler Controls showing a total of 16 days.

                                  Please investigate and let me know whether or not I am calling the libraries correctly.




                                • Svetlana (DevExpress Support) 11.30.2018
                                  Hi, 

                                  This approach operates properly on our side. Would you please clarify what time zone you are using here? This information is necessary to investigate the shortcoming you faced. 
                                • Bart Vadala 12.02.2018
                                  Hi,

                                  We are on Australian Eastern Daylight Time (AEDT)

                                • Svetlana (DevExpress Support) 12.03.2018

                                  Hi Bart, 

                                  We have reproduced this shortcoming with your time zone. I will re-activate the An extra occurrence is created after the Appointment.RecurrenceInfo.FromXml method call if an XML file contains the AllDay attribute thread. We will update it once we have results. 

                                • Svetlana (DevExpress Support) 12.03.2018
                                  We have found the issue with the suggested approach. To retrieve recurring appointments without converting a time part, it is necessary to pass DateTimeSavingMode.Storage to the ObjectFromXml method. This approach should properly operate with any time zone. Please correct your code accordingly and let me know your results. 
                                • Bart Vadala 12.06.2018
                                  Hello,

                                  We have changed it to DateTimeSavingMode.Storage and it does in fact work for the test scenario.

                                  However we have generated a few more recurrence permutations and have noticed it fails in two scenarios. I have attached both the entire unit test class, along with screenshots and also an excel spreadsheet detailing what type of recurrence it is and the expected result we have.

                                  I have attached it as one whole zip file to this comment.

                                  Just to remind you of the following:

                                  RecurrenceInfo xml is generated using DevExpress 14.1.5 WPF XtraScheduler components from our desktop application.

                                  We are using the DevExpress.XtraScheduler.Core 18.2.3.18333 Hot Fix for .NET Standard.

                                  We are in Australian Eastern Daylight Time (AEDT) 
                                • Svetlana (DevExpress Support) 12.07.2018
                                  Hi, 

                                  We have reproduced the issue by using your attached files. Now, we need additional time to investigate why this shortcoming occurs and how to avoid it. I will update this thread once we have results. 
                                • Aleks (DevExpress Support) 12.10.2018

                                  Hi Bart,

                                  I have some news from our R&D team so I hope you don't mind if I chime in. We added an additional overload for the IRecurrenceInfo.FromXml method that accepts DateTimeSavingMode as the second parameter. You can use it in the following manner:

                                  [C#]
                                  public void Should_yield_correct_occurences_for_daily_recurring_events_with_an_end_date() { var appointment = Compatibility.StaticAppointmentFactory.CreateAppointment(AppointmentType.Pattern); var pattern = "<RecurrenceInfo Start=\"11/28/2018 13:00:00\" End=\"12/13/2018 13:00:00\" " + "AllDay=\"True\" Id=\"72d90743-d2b3-48e8-b51a-75a4666c1e6d\" OccurrenceCount=\"16\" Range=\"2\" />"; appointment.RecurrenceInfo.FromXml(pattern, DateTimeSavingMode.Utc); appointment.Start = DateTime.Parse("2018-11-28T13:00:00Z", CultureInfo.CurrentCulture, DateTimeStyles.RoundtripKind).ToLocalTime(); appointment.End = DateTime.Parse("2018-11-29T13:00:00Z", CultureInfo.CurrentCulture, DateTimeStyles.RoundtripKind).ToLocalTime(); appointment.AllDay = true; var occurrenceCalculator = OccurrenceCalculator.CreateInstance(appointment.RecurrenceInfo); var items = occurrenceCalculator.CalcOccurrences(new TimeInterval(DateTime.MinValue, DateTime.MaxValue), appointment); Assert.AreEqual(16, items.Count); }

                                  Would you please check this with our latest intermediate build (DevExpressNETComponents-18.2.3.18344.exe)?


                                  In the meantime, I would like to clarify one point. You have the following pattern in Should_yield_correct_occurrences_for_monthly_recurring_events_on_3rd_of_every_month_end_by_04_March_2019:

                                  [C#]
                                  string pattern = "<RecurrenceInfo Start=\"12/31/2018 13:00:00\" End=\"02/02/2019 13:00:00\" AllDay=\"True\" DayNumber=\"3\" WeekOfMonth=\"0\" " + "WeekDays=\"8\" Id=\"e72ef6cb-e27f-4b86-9da0-8455b6220535\" OccurrenceCount=\"2\" Range=\"2\" Type=\"2\" />";

                                  On our sides in both versions, 14.1 and 18.2, we cannot pass this test, the result is always 2 (you check if it is 3). Would you please elaborate on this point?


                                  I look forward to your response.

                                • Bart Vadala 12.11.2018
                                  Hi Aleks,

                                  Thank you for the reply.

                                  We just tried out the intermediate build 18.2.3.18344 and have confirmed it does now pass all the unit tests.

                                  Furthermore for the test case of

                                  Should_yield_correct_occurrences_for_monthly_recurring_events_on_3rd_of_every_month_end_by_04_March_2019

                                  It appears the recurrence xml info I copied from our local store was not correct, the correct RecurrenceInfo is:

                                  [XML]
                                  <RecurrenceInfo Start=\"12/31/2018 13:00:00\" End=\"03/03/2019 13:00:00\" AllDay=\"True\" DayNumber=\"3\" WeekOfMonth=\"0\" WeekDays=\"8\" Id=\"e72ef6cb-e27f-4b86-9da0-8455b6220535\" OccurrenceCount=\"3\" Range=\"2\" Type=\"2\" />


                                  Which correctly yields 3 occurences.

                                  Thank you for your help.

                                  We are now closer to completion the evaluation of the new version of DevExpress, we created another ticket for one more thing to consider now:

                                  https://www.devexpress.com/Support/Center/Question/Details/T699191/icalendarhelper-extractrecurrencerule-does-not-support-exceptions-of-the-rrule-spec


                                  Thank you for your help.


                                • Aleks (DevExpress Support) 12.12.2018

                                  That is good news, Bart. I am happy to hear that you have found our assistance helpful.
                                  As for your new ticket, it has been placed in our queue. We will reply to you there soon.