From 75dcc5524ede4707cf3393c241349fbfcc878a9b Mon Sep 17 00:00:00 2001 From: brianlagunas_cp Date: Tue, 2 Aug 2011 21:25:35 +0000 Subject: [PATCH] added new MultiLineTextEditor control. PrimitiveTypeCollectionEditor now uses this control for accepting text input. --- .../CollectionEditors/Images/Notes16.png | Bin 0 -> 601 bytes .../PrimitiveTypeCollectionEditor.cs | 68 +------- .../CollectionEditors/Themes/Generic.xaml | 115 ++------------ .../Implementation/MultiLineTextEditor.cs | 147 ++++++++++++++++++ .../MultiLineTextEditor/Themes/Generic.xaml | 125 +++++++++++++++ .../WPFToolkit.Extended/Themes/Generic.xaml | 3 + .../WPFToolkit.Extended.csproj | 8 + 7 files changed, 293 insertions(+), 173 deletions(-) create mode 100644 ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CollectionEditors/Images/Notes16.png create mode 100644 ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MultiLineTextEditor/Implementation/MultiLineTextEditor.cs create mode 100644 ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MultiLineTextEditor/Themes/Generic.xaml diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CollectionEditors/Images/Notes16.png b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CollectionEditors/Images/Notes16.png new file mode 100644 index 0000000000000000000000000000000000000000..ebfaee36af66ee4d7f6628b7a77c67c812f688ed GIT binary patch literal 601 zcmV-f0;c_mP)#tDU#AZ0t#XZ6VXBt3&m8L z#3GOqXd$iA|_GqZsyJSW_E_z&LRsR-+S|RzxU0X-HouuOKWX8c6r8e z5Ds~W18atI(7u?tGCV~_Idow}Hn4F7X8(jvTy(Z<%O5$kvmHR4b9;N-JyZ~PE*u2B zynn#5YppedSw-l%pGVK}7QCMR`tEG!?!y3T8RJNivYpdVj!*SH!quTskOGJR$pytQ z4w{>`wB33(GXbC>HbTBzFq4S9d|R^od9GrGJftFAd;Gxo-d)jZ7=rhYO-syUly@_YYwD= zO&iu(m7gnBNGV}7Vn3rgIUPrn#WMOYc0nm%= 0) && (yadjust >= 0)) - { - this._textBox.Width = xadjust; - this._textBox.Height = yadjust; - } - } - - #endregion //Bass Class Overrides - - #region Event Handlers - - private void OnKeyDown(object sender, KeyEventArgs e) - { - switch (e.Key) - { - case Key.Escape: - case Key.Tab: - { - CloseEditor(); - break; - } - } - } - private void OnMouseDownOutsideCapturedElement(object sender, MouseButtonEventArgs e) - { - CloseEditor(); } - #endregion //Event Handlers + #endregion //Constructors #region Methods - private void CloseEditor() - { - if (IsOpen) - IsOpen = false; - ReleaseMouseCapture(); - } - private void PersistChanges() { IList list = ResolveItemsSource(); diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CollectionEditors/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CollectionEditors/Themes/Generic.xaml index 4ce60aaf..5ff92334 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CollectionEditors/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CollectionEditors/Themes/Generic.xaml @@ -89,75 +89,6 @@ - - - - - - - - - - - - - - - - - - - - + + + + \ No newline at end of file diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml index f2386976..8700b78a 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml @@ -16,6 +16,7 @@ + @@ -23,4 +24,6 @@ + + diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj index 1c85c907..f3319e8f 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj @@ -119,6 +119,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -204,6 +208,7 @@ + @@ -358,6 +363,9 @@ + + +