From 784930fd75c59797ca37838edaa2c61ab2be618b Mon Sep 17 00:00:00 2001
From: Ivan Todorov <todorov@progress.com>
Date: Thu, 21 Jan 2021 15:54:33 +0200
Subject: [PATCH 1/9] ListView: Fix a performance problem with many items

---
 .../ListView/Layout/RenderInfo/IndexStorage.cs        | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/Controls/DataControls/DataControls.UWP/ListView/Layout/RenderInfo/IndexStorage.cs b/Controls/DataControls/DataControls.UWP/ListView/Layout/RenderInfo/IndexStorage.cs
index 4ab9ac38..b9f725ca 100644
--- a/Controls/DataControls/DataControls.UWP/ListView/Layout/RenderInfo/IndexStorage.cs
+++ b/Controls/DataControls/DataControls.UWP/ListView/Layout/RenderInfo/IndexStorage.cs
@@ -25,6 +25,7 @@ internal class IndexStorage : ICollection, IEnumerable<long>, IRenderInfo
         private int size;
         private int count;
         private object syncRoot;
+        private bool initializeStorageInProgress;
         private bool aggregateInfoUpdateInProgress;
 
         private long averageItemLength;
@@ -128,7 +129,11 @@ private long this[int index]
                 }
 
                 this.Set(index, value);
-                this.RefreshAggregateInfo();
+
+                if (!this.initializeStorageInProgress)
+                {
+                    this.RefreshAggregateInfo();
+                }
             }
         }
 
@@ -415,6 +420,8 @@ private void Initialize(IRenderInfoState loadState, int capacity, long defaultVa
             {
                 var currentValue = defaultValue;
 
+                this.initializeStorageInProgress = true;
+
                 for (int i = 0; capacity > 0; i++)
                 {
                     if (loadState != null)
@@ -428,6 +435,8 @@ private void Initialize(IRenderInfoState loadState, int capacity, long defaultVa
                     capacity--;
                 }
 
+                this.initializeStorageInProgress = false;
+
                 this.RefreshAggregateInfo();
             }
         }

From 3c3ddf3a8d4a16739db737bddc9e65a2928b8c7b Mon Sep 17 00:00:00 2001
From: Petia Vladova <petia.vladova@telerik.com>
Date: Thu, 21 Jan 2021 19:25:11 +0200
Subject: [PATCH 2/9] Update nuget restore command for Map solution

---
 BuildTools/BuildControls.UWP.proj | 2 +-
 BuildTools/Config.UWP.proj        | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/BuildTools/BuildControls.UWP.proj b/BuildTools/BuildControls.UWP.proj
index 6b4e6958..253472f3 100644
--- a/BuildTools/BuildControls.UWP.proj
+++ b/BuildTools/BuildControls.UWP.proj
@@ -40,7 +40,7 @@
 
   <Target Name="RestoreMapSolutionNuGetPackages">
 
-    <Exec Command="$(Nuget32ToolPath) restore $(UWPMapSolutionPath) -NonInteractive -Source https://api.nuget.org/v3/index.json" />
+    <Exec Command='$(Nuget32ToolPath) restore $(UWPMapSolutionPath) -NonInteractive -Source https://api.nuget.org/v3/index.json -MSBuildPath $(MSBuild16ExePath)'/>
 
   </Target>
 
diff --git a/BuildTools/Config.UWP.proj b/BuildTools/Config.UWP.proj
index db95dc5e..cfcfbc2c 100644
--- a/BuildTools/Config.UWP.proj
+++ b/BuildTools/Config.UWP.proj
@@ -16,6 +16,7 @@
     <X64Platform>x64</X64Platform>
     <ArmPlatform>ARM</ArmPlatform>
     <Arm64Platform>ARM64</Arm64Platform>
+	<MSBuild16ExePath>"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"</MSBuild16ExePath>
   </PropertyGroup>
 
 </Project>

From a4b463bccce850e31928899659ff6b32f332ac78 Mon Sep 17 00:00:00 2001
From: Petia Vladova <petia.vladova@telerik.com>
Date: Fri, 22 Jan 2021 12:43:28 +0200
Subject: [PATCH 3/9] Update nuget restore command for UWPMap.sln

---
 BuildTools/BuildControls.UWP.proj | 4 ++--
 BuildTools/Config.UWP.proj        | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/BuildTools/BuildControls.UWP.proj b/BuildTools/BuildControls.UWP.proj
index 253472f3..e81ddb27 100644
--- a/BuildTools/BuildControls.UWP.proj
+++ b/BuildTools/BuildControls.UWP.proj
@@ -39,8 +39,8 @@
   </Target>
 
   <Target Name="RestoreMapSolutionNuGetPackages">
-
-    <Exec Command='$(Nuget32ToolPath) restore $(UWPMapSolutionPath) -NonInteractive -Source https://api.nuget.org/v3/index.json -MSBuildPath $(MSBuild16ExePath)'/>
+  
+	<MSBuild Projects="$(UWPMapSolutionPath)" Targets="Restore" />
 
   </Target>
 
diff --git a/BuildTools/Config.UWP.proj b/BuildTools/Config.UWP.proj
index cfcfbc2c..db95dc5e 100644
--- a/BuildTools/Config.UWP.proj
+++ b/BuildTools/Config.UWP.proj
@@ -16,7 +16,6 @@
     <X64Platform>x64</X64Platform>
     <ArmPlatform>ARM</ArmPlatform>
     <Arm64Platform>ARM64</Arm64Platform>
-	<MSBuild16ExePath>"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"</MSBuild16ExePath>
   </PropertyGroup>
 
 </Project>

From 38c7ea7823b77ce234fd2a0de9011cf38dd22198 Mon Sep 17 00:00:00 2001
From: "atanas.popatanasov" <atanas.popatanasov@progress.com>
Date: Thu, 28 Jan 2021 17:36:49 +0200
Subject: [PATCH 4/9] Set DataContext for the HeaderContent of the Calendar in
 order to make it easier to preserve the title when new content is set.

---
 .../Input.UWP/Calendar/View/RadCalendar.cs    | 122 +++++++++---------
 1 file changed, 61 insertions(+), 61 deletions(-)

diff --git a/Controls/Input/Input.UWP/Calendar/View/RadCalendar.cs b/Controls/Input/Input.UWP/Calendar/View/RadCalendar.cs
index b1c6a83c..3413b814 100644
--- a/Controls/Input/Input.UWP/Calendar/View/RadCalendar.cs
+++ b/Controls/Input/Input.UWP/Calendar/View/RadCalendar.cs
@@ -2207,87 +2207,87 @@ internal void UpdateNavigationHeaderContent()
                 return;
             }
 
-            if (this.HeaderContent == null)
+            string headerContent = null;
+            switch (this.DisplayMode)
             {
-                string headerContent = null;
-
-                switch (this.DisplayMode)
-                {
-                    case CalendarDisplayMode.MonthView:
-                        headerContent = string.Format(this.currentCulture, this.MonthViewHeaderFormat, this.DisplayDate);
-                        break;
-                    case CalendarDisplayMode.YearView:
-                        headerContent = string.Format(this.currentCulture, this.YearViewHeaderFormat, this.DisplayDate);
-                        break;
-                    case CalendarDisplayMode.DecadeView:
-                        DateTime decadeStart = CalendarMathHelper.GetFirstDateOfDecade(this.DisplayDate);
-                        DateTime decadeEnd = decadeStart.AddYears(9);
+                case CalendarDisplayMode.MonthView:
+                    headerContent = string.Format(this.currentCulture, this.MonthViewHeaderFormat, this.DisplayDate);
+                    break;
+                case CalendarDisplayMode.YearView:
+                    headerContent = string.Format(this.currentCulture, this.YearViewHeaderFormat, this.DisplayDate);
+                    break;
+                case CalendarDisplayMode.DecadeView:
+                    DateTime decadeStart = CalendarMathHelper.GetFirstDateOfDecade(this.DisplayDate);
+                    DateTime decadeEnd = decadeStart.AddYears(9);
 
-                        headerContent = string.Format(this.currentCulture, this.DecadeViewHeaderFormat, decadeStart, decadeEnd);
-                        break;
-                    case CalendarDisplayMode.CenturyView:
-                        DateTime centuryStart = CalendarMathHelper.GetFirstDateOfCentury(this.DisplayDate);
-                        DateTime centuryEnd = centuryStart.AddYears(99);
+                    headerContent = string.Format(this.currentCulture, this.DecadeViewHeaderFormat, decadeStart, decadeEnd);
+                    break;
+                case CalendarDisplayMode.CenturyView:
+                    DateTime centuryStart = CalendarMathHelper.GetFirstDateOfCentury(this.DisplayDate);
+                    DateTime centuryEnd = centuryStart.AddYears(99);
 
-                        headerContent = string.Format(this.currentCulture, this.CenturyViewHeaderFormat, centuryStart, centuryEnd);
-                        break;
-                    case CalendarDisplayMode.MultiDayView:
-                        string headerText = this.MultiDayViewSettings.MultiDayViewHeaderText;
-                        if (string.IsNullOrEmpty(headerText))
+                    headerContent = string.Format(this.currentCulture, this.CenturyViewHeaderFormat, centuryStart, centuryEnd);
+                    break;
+                case CalendarDisplayMode.MultiDayView:
+                    string headerText = this.MultiDayViewSettings.MultiDayViewHeaderText;
+                    if (string.IsNullOrEmpty(headerText))
+                    {
+                        DateTime firstDateOfCurrentWeek = this.DisplayDate;
+                        DateTime lastDayOfWeek;
+                        int visibleDays = this.MultiDayViewSettings.VisibleDays;
+                        if (this.MultiDayViewSettings.WeekendsVisible)
                         {
-                            DateTime firstDateOfCurrentWeek = this.DisplayDate;
-                            DateTime lastDayOfWeek;
-                            int visibleDays = this.MultiDayViewSettings.VisibleDays;
-                            if (this.MultiDayViewSettings.WeekendsVisible)
-                            {
-                                lastDayOfWeek = firstDateOfCurrentWeek.AddDays(visibleDays);
-                            }
-                            else
-                            {
-                                firstDateOfCurrentWeek = CalendarMathHelper.SetFirstAvailableBusinessDay(firstDateOfCurrentWeek, 1);
-                                lastDayOfWeek = CalendarMathHelper.AddBusinessDays(firstDateOfCurrentWeek, visibleDays);
-                            }
+                            lastDayOfWeek = firstDateOfCurrentWeek.AddDays(visibleDays);
+                        }
+                        else
+                        {
+                            firstDateOfCurrentWeek = CalendarMathHelper.SetFirstAvailableBusinessDay(firstDateOfCurrentWeek, 1);
+                            lastDayOfWeek = CalendarMathHelper.AddBusinessDays(firstDateOfCurrentWeek, visibleDays);
+                        }
 
-                            if (visibleDays == 1)
-                            {
-                                string format = "{0:d MMMM yyyy}";
-                                headerContent = string.Format(this.currentCulture, format, firstDateOfCurrentWeek);
-                            }
-                            else
-                            {
-                                string format = firstDateOfCurrentWeek.Year == lastDayOfWeek.Subtract(TimeSpan.FromTicks(1)).Year ?
-                                  (firstDateOfCurrentWeek.Month == lastDayOfWeek.Subtract(TimeSpan.FromTicks(1)).Month ?
-                                  "{0:d } ~ {1:d MMMM yyyy}" :
-                                  "{0:d MMMM} ~ {1:d MMMM yyyy}") :
-                                  "{0:d MMMM yyyy} ~ {1:d MMMM yyyy}";
-
-                                lastDayOfWeek = lastDayOfWeek.Subtract(TimeSpan.FromTicks(1));
-                                if (!this.MultiDayViewSettings.WeekendsVisible)
-                                {
-                                    lastDayOfWeek = CalendarMathHelper.SetFirstAvailableBusinessDay(lastDayOfWeek, -1);
-                                }
-
-                                headerContent = string.Format(this.currentCulture, format, firstDateOfCurrentWeek, lastDayOfWeek);
-                            }
+                        if (visibleDays == 1)
+                        {
+                            string format = "{0:d MMMM yyyy}";
+                            headerContent = string.Format(this.currentCulture, format, firstDateOfCurrentWeek);
                         }
                         else
                         {
-                            headerContent = headerText;
+                            string format = firstDateOfCurrentWeek.Year == lastDayOfWeek.Subtract(TimeSpan.FromTicks(1)).Year ?
+                              (firstDateOfCurrentWeek.Month == lastDayOfWeek.Subtract(TimeSpan.FromTicks(1)).Month ?
+                              "{0:d } ~ {1:d MMMM yyyy}" :
+                              "{0:d MMMM} ~ {1:d MMMM yyyy}") :
+                              "{0:d MMMM yyyy} ~ {1:d MMMM yyyy}";
+
+                            lastDayOfWeek = lastDayOfWeek.Subtract(TimeSpan.FromTicks(1));
+                            if (!this.MultiDayViewSettings.WeekendsVisible)
+                            {
+                                lastDayOfWeek = CalendarMathHelper.SetFirstAvailableBusinessDay(lastDayOfWeek, -1);
+                            }
+
+                            headerContent = string.Format(this.currentCulture, format, firstDateOfCurrentWeek, lastDayOfWeek);
                         }
+                    }
+                    else
+                    {
+                        headerContent = headerText;
+                    }
 
-                        break;
-                }
+                    break;
+            }
 
+            if (this.HeaderContent == null)
+            {
                 this.navigationPanel.HeaderContent = headerContent;
             }
             else
             {
                 this.navigationPanel.HeaderContent = this.HeaderContent;
+                this.navigationPanel.DataContext = headerContent;
             }
 
             this.navigationPanel.HeaderContentTemplate = this.HeaderContentTemplate;
         }
-        
+
         internal void OnCalendarButtonClicked() 
         {
             this.FooterButtonClicked?.Invoke(this, EventArgs.Empty);

From bf29acba9bd223eccf6ae2c0bdaaa03ecf18dded Mon Sep 17 00:00:00 2001
From: Aleksandar Gerchev <gerchev@progress.com>
Date: Tue, 2 Feb 2021 10:39:32 +0200
Subject: [PATCH 5/9] Implemented event thats invokes on display mode changed.

---
 .../Calendar/DisplayModeChangedEventArgs.cs        | 14 ++++++++++++++
 .../Input/Input.UWP/Calendar/View/RadCalendar.cs   |  7 +++++++
 Controls/Input/Input.UWP/Input.UWP.csproj          |  1 +
 3 files changed, 22 insertions(+)
 create mode 100644 Controls/Input/Input.UWP/Calendar/DisplayModeChangedEventArgs.cs

diff --git a/Controls/Input/Input.UWP/Calendar/DisplayModeChangedEventArgs.cs b/Controls/Input/Input.UWP/Calendar/DisplayModeChangedEventArgs.cs
new file mode 100644
index 00000000..9dedf575
--- /dev/null
+++ b/Controls/Input/Input.UWP/Calendar/DisplayModeChangedEventArgs.cs
@@ -0,0 +1,14 @@
+using System;
+
+namespace Telerik.UI.Xaml.Controls.Input.Calendar
+{
+    public class DisplayModeChangedEventArgs : EventArgs
+    {
+        public DisplayModeChangedEventArgs(CalendarDisplayMode newDisplayMode)
+        {
+            this.NewDisplayMode = newDisplayMode;
+        }
+
+        public CalendarDisplayMode NewDisplayMode { get; set; }
+    }
+}
diff --git a/Controls/Input/Input.UWP/Calendar/View/RadCalendar.cs b/Controls/Input/Input.UWP/Calendar/View/RadCalendar.cs
index 3413b814..bffedb48 100644
--- a/Controls/Input/Input.UWP/Calendar/View/RadCalendar.cs
+++ b/Controls/Input/Input.UWP/Calendar/View/RadCalendar.cs
@@ -440,6 +440,11 @@ public event EventHandler<CurrentSelectionChangedEventArgs> SelectionChanged
             }
         }
 
+        /// <summary>
+        /// Occurs when the <see cref="DisplayMode"/> property is changed.
+        /// </summary>
+        public event EventHandler<DisplayModeChangedEventArgs> DisplayModeChanged;
+
         /// <summary>
         /// Gets the <see cref="CommandService"/> instance that manages the commanding behavior of this instance.
         /// </summary>
@@ -2681,6 +2686,8 @@ private static void OnDisplayModePropertyChanged(DependencyObject target, Depend
                 calendar.FetchNewAppointments();
                 calendar.model.multiDayViewModel.updateFlag = MultiDayViewUpdateFlag.All;
             }
+
+            calendar.DisplayModeChanged?.Invoke(calendar, new DisplayModeChangedEventArgs(calendar.DisplayMode));
         }
 
         private static void OnCalendarViewHeaderFormatPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
diff --git a/Controls/Input/Input.UWP/Input.UWP.csproj b/Controls/Input/Input.UWP/Input.UWP.csproj
index bc2ee182..103c502c 100644
--- a/Controls/Input/Input.UWP/Input.UWP.csproj
+++ b/Controls/Input/Input.UWP/Input.UWP.csproj
@@ -67,6 +67,7 @@
     <Compile Include="Calendar\AutomationPeers\CalendarViewHostAutomationPeer.cs" />
     <Compile Include="Calendar\AutomationPeers\RadCalendarAutomationPeer.cs" />
     <Compile Include="Calendar\DisplayDateChangedEventArgs.cs" />
+    <Compile Include="Calendar\DisplayModeChangedEventArgs.cs" />
     <Compile Include="Calendar\Model\CalendarTimeRulerItem.cs" />
     <Compile Include="Calendar\Model\CalendarMultiDayViewModel.cs" />
     <Compile Include="Calendar\Model\ICopyable.cs" />

From cc561e7a5486738560ff855e8fcdef1c4d865023 Mon Sep 17 00:00:00 2001
From: Aleksandar Gerchev <gerchev@progress.com>
Date: Tue, 2 Feb 2021 11:28:35 +0200
Subject: [PATCH 6/9] Removed DisplayModeChangedEventArgs.

---
 Controls/Input/Input.UWP/Calendar/View/RadCalendar.cs | 4 ++--
 Controls/Input/Input.UWP/Input.UWP.csproj             | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Controls/Input/Input.UWP/Calendar/View/RadCalendar.cs b/Controls/Input/Input.UWP/Calendar/View/RadCalendar.cs
index bffedb48..3e14d333 100644
--- a/Controls/Input/Input.UWP/Calendar/View/RadCalendar.cs
+++ b/Controls/Input/Input.UWP/Calendar/View/RadCalendar.cs
@@ -443,7 +443,7 @@ public event EventHandler<CurrentSelectionChangedEventArgs> SelectionChanged
         /// <summary>
         /// Occurs when the <see cref="DisplayMode"/> property is changed.
         /// </summary>
-        public event EventHandler<DisplayModeChangedEventArgs> DisplayModeChanged;
+        public event EventHandler<EventArgs> DisplayModeChanged;
 
         /// <summary>
         /// Gets the <see cref="CommandService"/> instance that manages the commanding behavior of this instance.
@@ -2687,7 +2687,7 @@ private static void OnDisplayModePropertyChanged(DependencyObject target, Depend
                 calendar.model.multiDayViewModel.updateFlag = MultiDayViewUpdateFlag.All;
             }
 
-            calendar.DisplayModeChanged?.Invoke(calendar, new DisplayModeChangedEventArgs(calendar.DisplayMode));
+            calendar.DisplayModeChanged?.Invoke(calendar, new EventArgs());
         }
 
         private static void OnCalendarViewHeaderFormatPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
diff --git a/Controls/Input/Input.UWP/Input.UWP.csproj b/Controls/Input/Input.UWP/Input.UWP.csproj
index 103c502c..bc2ee182 100644
--- a/Controls/Input/Input.UWP/Input.UWP.csproj
+++ b/Controls/Input/Input.UWP/Input.UWP.csproj
@@ -67,7 +67,6 @@
     <Compile Include="Calendar\AutomationPeers\CalendarViewHostAutomationPeer.cs" />
     <Compile Include="Calendar\AutomationPeers\RadCalendarAutomationPeer.cs" />
     <Compile Include="Calendar\DisplayDateChangedEventArgs.cs" />
-    <Compile Include="Calendar\DisplayModeChangedEventArgs.cs" />
     <Compile Include="Calendar\Model\CalendarTimeRulerItem.cs" />
     <Compile Include="Calendar\Model\CalendarMultiDayViewModel.cs" />
     <Compile Include="Calendar\Model\ICopyable.cs" />

From 1431b825841a3908a87726dc0c43c7107a3bc5fb Mon Sep 17 00:00:00 2001
From: Aleksandar Gerchev <gerchev@progress.com>
Date: Tue, 2 Feb 2021 11:41:42 +0200
Subject: [PATCH 7/9] Deleted file DisplayModeChangedEventArgs.

---
 .../Calendar/DisplayModeChangedEventArgs.cs        | 14 --------------
 1 file changed, 14 deletions(-)
 delete mode 100644 Controls/Input/Input.UWP/Calendar/DisplayModeChangedEventArgs.cs

diff --git a/Controls/Input/Input.UWP/Calendar/DisplayModeChangedEventArgs.cs b/Controls/Input/Input.UWP/Calendar/DisplayModeChangedEventArgs.cs
deleted file mode 100644
index 9dedf575..00000000
--- a/Controls/Input/Input.UWP/Calendar/DisplayModeChangedEventArgs.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System;
-
-namespace Telerik.UI.Xaml.Controls.Input.Calendar
-{
-    public class DisplayModeChangedEventArgs : EventArgs
-    {
-        public DisplayModeChangedEventArgs(CalendarDisplayMode newDisplayMode)
-        {
-            this.NewDisplayMode = newDisplayMode;
-        }
-
-        public CalendarDisplayMode NewDisplayMode { get; set; }
-    }
-}

From c8ee45d4f15476cefb4ff92ab810e969f9160966 Mon Sep 17 00:00:00 2001
From: polqnaP <61967449+polqnaP@users.noreply.github.com>
Date: Tue, 9 Feb 2021 17:47:38 +0200
Subject: [PATCH 8/9] Fix a bug that DrawerLocation cannot be changed
 dynamically (#484)

* Fix a bug that drawer is shown at the wrong location when the DrawerLocation is changed but ShowDrawer is called before layout is updated. For example when on button clicked the DrawerLocation is changed and right after that ShowDrawer is called. When this happens the change of the DrawerLocation calls InvalidateMeasure but before the layout pass the ShowDrawer method is called, which plays a the animation associated with the previous DrawerLocation value.
---
 .../SideDrawer/Commands/AnimationContext.cs   | 16 ++++++----
 .../RadSideDrawer.AnimationGenerator.cs       | 30 ++++++++++++++-----
 .../SideDrawer/RadSideDrawer.cs               |  9 ++++--
 3 files changed, 39 insertions(+), 16 deletions(-)

diff --git a/Controls/Primitives/Primitives.UWP/SideDrawer/Commands/AnimationContext.cs b/Controls/Primitives/Primitives.UWP/SideDrawer/Commands/AnimationContext.cs
index 0a67cea8..460b3ce2 100644
--- a/Controls/Primitives/Primitives.UWP/SideDrawer/Commands/AnimationContext.cs
+++ b/Controls/Primitives/Primitives.UWP/SideDrawer/Commands/AnimationContext.cs
@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Windows.UI.Xaml.Media.Animation;
+using Windows.UI.Xaml.Media.Animation;
 
 namespace Telerik.UI.Xaml.Controls.Primitives.SideDrawer.Commands
 {
@@ -32,6 +27,10 @@ public class AnimationContext
         /// </summary>
         public Storyboard DrawerStoryBoardReverse { get; set; }
 
+        internal DrawerLocation DrawerLocation { get; set; }
+
+        internal DrawerTransition DrawerTransition { get; set; }
+
         internal bool IsGenerated
         {
             get
@@ -39,5 +38,10 @@ internal bool IsGenerated
                 return this.MainContentStoryBoard != null && this.MainContentStoryBoardReverse != null && this.DrawerStoryBoard != null && this.DrawerStoryBoardReverse != null;
             }        
         }
+
+        internal bool IsValid(DrawerLocation location, DrawerTransition transition)
+        {
+            return this.IsGenerated && this.DrawerLocation == location && this.DrawerTransition == transition;
+        }
     }
 }
diff --git a/Controls/Primitives/Primitives.UWP/SideDrawer/RadSideDrawer.AnimationGenerator.cs b/Controls/Primitives/Primitives.UWP/SideDrawer/RadSideDrawer.AnimationGenerator.cs
index eedecb39..a6bf0196 100644
--- a/Controls/Primitives/Primitives.UWP/SideDrawer/RadSideDrawer.AnimationGenerator.cs
+++ b/Controls/Primitives/Primitives.UWP/SideDrawer/RadSideDrawer.AnimationGenerator.cs
@@ -66,7 +66,7 @@ internal AnimationContext GetAnimations(bool shouldPrepareDrawer = true)
                     return this.GetSlideAlongAnimations();
 
                 default:
-                    return new AnimationContext();
+                    return new AnimationContext() { DrawerLocation = this.DrawerLocation, DrawerTransition = this.DrawerTransition };
             }
         }
 
@@ -165,7 +165,9 @@ private AnimationContext GetPushAnimations()
                 MainContentStoryBoard = this.mainContentStoryboard,
                 MainContentStoryBoardReverse = this.mainContentStoryboardReverse,
                 DrawerStoryBoardReverse = this.sideBarStoryboardReverse,
-                DrawerStoryBoard = this.sideBarStoryboard
+                DrawerStoryBoard = this.sideBarStoryboard,
+                DrawerLocation = this.DrawerLocation,
+                DrawerTransition = this.DrawerTransition
             };
         }
 
@@ -259,7 +261,9 @@ private AnimationContext GetRevealAnimations()
                 MainContentStoryBoard = this.mainContentStoryboard,
                 MainContentStoryBoardReverse = this.mainContentStoryboardReverse,
                 DrawerStoryBoardReverse = this.sideBarStoryboardReverse,
-                DrawerStoryBoard = this.sideBarStoryboard
+                DrawerStoryBoard = this.sideBarStoryboard,
+                DrawerLocation = this.DrawerLocation,
+                DrawerTransition = this.DrawerTransition
             };
         }
 
@@ -400,7 +404,9 @@ private AnimationContext GetReverseSlideOutAnimations()
                 MainContentStoryBoard = this.mainContentStoryboard,
                 MainContentStoryBoardReverse = this.mainContentStoryboardReverse,
                 DrawerStoryBoardReverse = this.sideBarStoryboardReverse,
-                DrawerStoryBoard = this.sideBarStoryboard
+                DrawerStoryBoard = this.sideBarStoryboard,
+                DrawerLocation = this.DrawerLocation,
+                DrawerTransition = this.DrawerTransition
             };
         }
 
@@ -509,7 +515,9 @@ private AnimationContext GetScaleDownPusherAnimations()
                 MainContentStoryBoard = this.mainContentStoryboard,
                 MainContentStoryBoardReverse = this.mainContentStoryboardReverse,
                 DrawerStoryBoardReverse = this.sideBarStoryboardReverse,
-                DrawerStoryBoard = this.sideBarStoryboard
+                DrawerStoryBoard = this.sideBarStoryboard,
+                DrawerLocation = this.DrawerLocation,
+                DrawerTransition = this.DrawerTransition
             };
         }
 
@@ -651,7 +659,9 @@ private AnimationContext GetScaleUpAnimations()
                 MainContentStoryBoard = this.mainContentStoryboard,
                 MainContentStoryBoardReverse = this.mainContentStoryboardReverse,
                 DrawerStoryBoardReverse = this.sideBarStoryboardReverse,
-                DrawerStoryBoard = this.sideBarStoryboard
+                DrawerStoryBoard = this.sideBarStoryboard,
+                DrawerLocation = this.DrawerLocation,
+                DrawerTransition = this.DrawerTransition
             };
         }
 
@@ -718,7 +728,9 @@ private AnimationContext GetSlideInOnTopAnimations()
                 MainContentStoryBoard = this.mainContentStoryboard,
                 MainContentStoryBoardReverse = this.mainContentStoryboardReverse,
                 DrawerStoryBoardReverse = this.sideBarStoryboardReverse,
-                DrawerStoryBoard = this.sideBarStoryboard
+                DrawerStoryBoard = this.sideBarStoryboard,
+                DrawerLocation = this.DrawerLocation,
+                DrawerTransition = this.DrawerTransition
             };
         }
 
@@ -842,7 +854,9 @@ private AnimationContext GetSlideAlongAnimations()
                 MainContentStoryBoard = this.mainContentStoryboard,
                 MainContentStoryBoardReverse = this.mainContentStoryboardReverse,
                 DrawerStoryBoardReverse = this.sideBarStoryboardReverse,
-                DrawerStoryBoard = this.sideBarStoryboard
+                DrawerStoryBoard = this.sideBarStoryboard,
+                DrawerLocation = this.DrawerLocation,
+                DrawerTransition = this.DrawerTransition
             };
         }
 
diff --git a/Controls/Primitives/Primitives.UWP/SideDrawer/RadSideDrawer.cs b/Controls/Primitives/Primitives.UWP/SideDrawer/RadSideDrawer.cs
index 4af23b79..d33fedb2 100644
--- a/Controls/Primitives/Primitives.UWP/SideDrawer/RadSideDrawer.cs
+++ b/Controls/Primitives/Primitives.UWP/SideDrawer/RadSideDrawer.cs
@@ -428,6 +428,11 @@ public void ShowDrawer()
                 return;
             }
 
+            if (!this.Context.IsValid(this.DrawerLocation, this.DrawerTransition))
+            {
+                this.UpdateLayout();
+            }
+
             if (this.DrawerState == DrawerState.Closed)
             {
                 this.Context.MainContentStoryBoard.Begin();
@@ -674,7 +679,7 @@ protected override AutomationPeer OnCreateAutomationPeer()
         private static void OnDrawerTransitionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
         {
             var sideDrawer = d as RadSideDrawer;
-            if (sideDrawer.drawer != null)
+            if (sideDrawer.drawer != null && (DrawerTransition)e.NewValue != (DrawerTransition)e.OldValue)
             {
                 sideDrawer.ResetDrawer();
             }
@@ -720,7 +725,7 @@ private static void OnDrawerStateChanged(DependencyObject d, DependencyPropertyC
         private static void OnDrawerLocationChagned(DependencyObject d, DependencyPropertyChangedEventArgs e)
         {
             var sideDrawer = d as RadSideDrawer;
-            if (sideDrawer.drawer != null)
+            if (sideDrawer.drawer != null && (DrawerLocation)e.NewValue != (DrawerLocation)e.OldValue)
             {
                 sideDrawer.ResetDrawer();
             }

From 2964601c51b7dd93d4926e8e5f3b2692af8620a1 Mon Sep 17 00:00:00 2001
From: Polya Pelova <pelova@progress.com>
Date: Wed, 24 Feb 2021 12:59:39 +0200
Subject: [PATCH 9/9] Update the nuget version

---
 BuildTools/BuildNuGet.bat                                      | 2 +-
 BuildTools/BuildNuget.UWP.proj                                 | 2 +-
 BuildTools/Nuspecs.UWP/Package.UniversalWindowsPlatform.nuspec | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/BuildTools/BuildNuGet.bat b/BuildTools/BuildNuGet.bat
index de44eede..7afea25f 100644
--- a/BuildTools/BuildNuGet.bat
+++ b/BuildTools/BuildNuGet.bat
@@ -1,2 +1,2 @@
 SET MSBUILD=%WINDIR%\microsoft.net\framework\v4.0.30319\MSBuild.exe
-%MSBUILD% BuildNuget.UWP.proj /property:Version=1.0.2.2
\ No newline at end of file
+%MSBUILD% BuildNuget.UWP.proj /property:Version=1.0.2.3
\ No newline at end of file
diff --git a/BuildTools/BuildNuget.UWP.proj b/BuildTools/BuildNuget.UWP.proj
index a86b5aaa..36bcdb2c 100644
--- a/BuildTools/BuildNuget.UWP.proj
+++ b/BuildTools/BuildNuget.UWP.proj
@@ -15,7 +15,7 @@
     <Target Name="PrepareNugetProperties">
 
         <PropertyGroup>
-            <Version Condition= " '$(Version)' == '' ">1.0.2.2</Version>
+            <Version Condition= " '$(Version)' == '' ">1.0.2.3</Version>
             <FullPathDeployDirectory>$([System.IO.Path]::GetFullPath('$(DeployDirectory)'))</FullPathDeployDirectory>
             <BinariesSubDir>$(BinariesTargetDirectory)</BinariesSubDir>
 
diff --git a/BuildTools/Nuspecs.UWP/Package.UniversalWindowsPlatform.nuspec b/BuildTools/Nuspecs.UWP/Package.UniversalWindowsPlatform.nuspec
index 78f009d2..cf7a843c 100644
--- a/BuildTools/Nuspecs.UWP/Package.UniversalWindowsPlatform.nuspec
+++ b/BuildTools/Nuspecs.UWP/Package.UniversalWindowsPlatform.nuspec
@@ -11,7 +11,7 @@
         <iconUrl>http://www.telerik.com/docs/default-source/nuget-feed-product-files/nugeticon_uwp.png?sfvrsn=2</iconUrl>
         <requireLicenseAcceptance>true</requireLicenseAcceptance>
         <description>UI for Universal Windows Platform is a toolset for building Universal Windows Platform apps for the Windows Store and the enterprise. The library is designed to offer the same user experience, functionality and behavior on Windows devices of all form factors.</description>
-		<releaseNotes>For full release notes see https://github.com/telerik/UI-For-UWP/releases/tag/1.0.2.2</releaseNotes>
+		<releaseNotes>For full release notes see https://github.com/telerik/UI-For-UWP/releases/tag/1.0.2.3</releaseNotes>
 		<tags>UWP Windows Telerik Controls XAML C#</tags>
         <language>en-US</language>
     </metadata>