From 63591aceb56dbc3df067fb82a26f603a09054250 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Fri, 9 Aug 2013 13:22:05 +0200 Subject: [PATCH] fix line endings and formatting in ThumbnailViewPad --- .../WpfDesign.AddIn/Src/ThumbnailViewPad.cs | 96 +++++++++---------- .../WpfDesign/WpfDesign.AddIn/WpfDesign.addin | 27 ++++-- 2 files changed, 64 insertions(+), 59 deletions(-) diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/ThumbnailViewPad.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/ThumbnailViewPad.cs index 5587cfac10..18d2fcbacf 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/ThumbnailViewPad.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/ThumbnailViewPad.cs @@ -1,57 +1,55 @@ -// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) -// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) - -using System; -using System.Windows; -using System.Windows.Controls; - +// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) +// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) + +using System; +using System.Windows; +using System.Windows.Controls; + using ICSharpCode.Core; using ICSharpCode.SharpDevelop; using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.WpfDesign.Designer.ThumbnailView; -namespace ICSharpCode.WpfDesign.AddIn -{ - - public class ThumbnailViewPad : AbstractPadContent +namespace ICSharpCode.WpfDesign.AddIn +{ + public class ThumbnailViewPad : AbstractPadContent { - ContentPresenter contentControl = new ContentPresenter(); + ContentPresenter contentControl = new ContentPresenter(); + + ThumbnailView thumbnailView = new ThumbnailView(); + + TextBlock notAvailableTextBlock = new TextBlock { + Text = StringParser.Parse("${res:ICSharpCode.SharpDevelop.Gui.OutlinePad.NotAvailable}"), + TextWrapping = TextWrapping.Wrap + }; + + public ThumbnailViewPad() + { + WorkbenchSingleton.Workbench.ActiveViewContentChanged += WorkbenchActiveViewContentChanged; + WorkbenchActiveViewContentChanged(null, null); + } - ThumbnailView thumbnailView = new ThumbnailView(); - - TextBlock notAvailableTextBlock = new TextBlock { - Text = StringParser.Parse("${res:ICSharpCode.SharpDevelop.Gui.OutlinePad.NotAvailable}"), - TextWrapping = TextWrapping.Wrap - }; - - public ThumbnailViewPad() - { - WorkbenchSingleton.Workbench.ActiveViewContentChanged += WorkbenchActiveViewContentChanged; - WorkbenchActiveViewContentChanged(null, null); - } - - void WorkbenchActiveViewContentChanged(object sender, EventArgs e) - { + void WorkbenchActiveViewContentChanged(object sender, EventArgs e) + { WpfViewContent wpfView = WorkbenchSingleton.Workbench.ActiveViewContent as WpfViewContent; - if (wpfView != null) - { - thumbnailView.DesignSurface = wpfView.DesignSurface; - contentControl.SetContent(thumbnailView); - } - else - { - - contentControl.SetContent(notAvailableTextBlock); - } - } - - /// - /// The representing the pad - /// - public override object Control { - get { - return contentControl; - } - } - } -} + if (wpfView != null) + { + thumbnailView.DesignSurface = wpfView.DesignSurface; + contentControl.SetContent(thumbnailView); + } + else + { + contentControl.SetContent(notAvailableTextBlock); + } + } + + /// + /// The representing the pad + /// + public override object Control { + get { + return contentControl; + } + } + } +} diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.addin b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.addin index 896ae6cb0d..e97bfd2d39 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.addin +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.addin @@ -1,4 +1,8 @@ - + @@ -21,16 +25,19 @@ insertbefore = "Text" fileNamePattern = "\.(xaml)$" title = "WPF designer"/>--> - + + + + - - -