Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVsevolod Kukol <sevo@sevo.org>2015-02-04 11:52:15 +0300
committerVsevolod Kukol <sevo@sevo.org>2015-02-04 11:52:15 +0300
commitc15075d85209b12ace84991fc77e8c41d5a507f0 (patch)
treef75294e6cb23ca1d85bd68865d6aa26f92a5c311 /Xwt.WPF
parente300240cf7b71b6b868bba1a85fb14459dcb3ef3 (diff)
[Wpf] optimize CellUtil.cs formatting
Diffstat (limited to 'Xwt.WPF')
-rw-r--r--Xwt.WPF/Xwt.WPFBackend.Utilities/CellUtil.cs43
1 files changed, 18 insertions, 25 deletions
diff --git a/Xwt.WPF/Xwt.WPFBackend.Utilities/CellUtil.cs b/Xwt.WPF/Xwt.WPFBackend.Utilities/CellUtil.cs
index f450cb72..c8d9456d 100644
--- a/Xwt.WPF/Xwt.WPFBackend.Utilities/CellUtil.cs
+++ b/Xwt.WPF/Xwt.WPFBackend.Utilities/CellUtil.cs
@@ -106,8 +106,8 @@ namespace Xwt.WPFBackend.Utilities
FrameworkElementFactory factory = new FrameworkElementFactory (typeof (ImageBox));
if (imageView.ImageField != null) {
- var binding = new Binding (dataPath + "[" + imageView.ImageField.Index + "]")
- { Converter = new ImageToImageSourceConverter (ctx) };
+ var binding = new Binding (dataPath + "[" + imageView.ImageField.Index + "]");
+ binding.Converter = new ImageToImageSourceConverter (ctx);
factory.SetBinding (ImageBox.ImageSourceProperty, binding);
}
@@ -131,29 +131,22 @@ namespace Xwt.WPFBackend.Utilities
}
CheckBoxCellView cellView = view as CheckBoxCellView;
- if (cellView != null)
- {
- FrameworkElementFactory factory = new FrameworkElementFactory(typeof(SWC.CheckBox));
- if (cellView.EditableField == null)
- {
- factory.SetValue(FrameworkElement.IsEnabledProperty, cellView.Editable);
- }
- else
- {
- factory.SetBinding(SWC.CheckBox.IsEnabledProperty, new Binding(dataPath + "[" + cellView.EditableField.Index + "]"));
- }
-
- factory.SetValue(SWC.CheckBox.IsThreeStateProperty, cellView.AllowMixed);
- if (cellView.ActiveField != null)
- {
- factory.SetBinding(SWC.CheckBox.IsCheckedProperty, new Binding(dataPath + "[" + cellView.ActiveField.Index + "]"));
- }
-
- var cb = new CellViewBackend();
- cb.Initialize(view, factory);
- fr.AttachBackend(parent, cb);
- return factory;
- }
+ if (cellView != null) {
+ FrameworkElementFactory factory = new FrameworkElementFactory (typeof(SWC.CheckBox));
+ if (cellView.EditableField == null)
+ factory.SetValue (FrameworkElement.IsEnabledProperty, cellView.Editable);
+ else
+ factory.SetBinding (SWC.CheckBox.IsEnabledProperty, new Binding (dataPath + "[" + cellView.EditableField.Index + "]"));
+
+ factory.SetValue (SWC.CheckBox.IsThreeStateProperty, cellView.AllowMixed);
+ if (cellView.ActiveField != null)
+ factory.SetBinding (SWC.CheckBox.IsCheckedProperty, new Binding (dataPath + "[" + cellView.ActiveField.Index + "]"));
+
+ var cb = new CellViewBackend ();
+ cb.Initialize (view, factory);
+ fr.AttachBackend (parent, cb);
+ return factory;
+ }
throw new NotImplementedException ();
}