From 175403f03076907a0c712f136a5619084b6d70e5 Mon Sep 17 00:00:00 2001 From: brianlagunas_cp Date: Mon, 28 Nov 2011 15:57:26 +0000 Subject: [PATCH] MessageBox: fixed messageBox drag when FlowDirection set RightToLeft --- .../MessageBox/Implementation/MessageBox.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Implementation/MessageBox.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Implementation/MessageBox.cs index b820aee1..560edb9d 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Implementation/MessageBox.cs +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Implementation/MessageBox.cs @@ -500,7 +500,14 @@ namespace Microsoft.Windows.Controls /// The instance containing the event data. private void ProcessMove(DragDeltaEventArgs e) { - Container.Left = Container.Left + e.HorizontalChange; + double left = 0.0; + + if (FlowDirection == System.Windows.FlowDirection.RightToLeft) + left = Container.Left - e.HorizontalChange; + else + left = Container.Left + e.HorizontalChange; + + Container.Left = left; Container.Top = Container.Top + e.VerticalChange; }