Make a few Controls Public so they can be used from outside from own Designer Extensions

This commit is contained in:
jkuehner 2015-10-17 10:24:47 +02:00
Родитель 5c9a33ed60
Коммит e1059504d3
5 изменённых файлов: 8 добавлений и 22 удалений

Просмотреть файл

@ -31,7 +31,7 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
/// <summary>
/// Gray out everything except a specific area.
/// </summary>
sealed class GrayOutDesignerExceptActiveArea : FrameworkElement
public sealed class GrayOutDesignerExceptActiveArea : FrameworkElement
{
Geometry designSurfaceRectangle;
Geometry activeAreaGeometry;

Просмотреть файл

@ -21,7 +21,6 @@ using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Threading;
using System.Windows.Media.Animation;
using ICSharpCode.WpfDesign.Adorners;
using ICSharpCode.WpfDesign.Designer.Services;
@ -29,16 +28,13 @@ using ICSharpCode.WpfDesign.Designer.Services;
namespace ICSharpCode.WpfDesign.Designer.Controls
{
/// <summary>
/// Gray out everything except a specific area.
/// A Info text area.
/// </summary>
sealed class InfoTextEnterArea : FrameworkElement
public sealed class InfoTextEnterArea : FrameworkElement
{
Geometry designSurfaceRectangle;
Geometry activeAreaGeometry;
Geometry combinedGeometry;
AdornerPanel adornerPanel;
IDesignPanel designPanel;
const double MaxOpacity = 0.3;
public InfoTextEnterArea()
{
@ -49,7 +45,6 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
get { return activeAreaGeometry; }
set {
activeAreaGeometry = value;
combinedGeometry = activeAreaGeometry;
}
}
@ -80,8 +75,6 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
OptionService optionService = services.GetService<OptionService>();
if (designPanel != null && grayOut == null && optionService != null && optionService.GrayOutDesignSurfaceExceptParentContainerWhenDragging) {
grayOut = new InfoTextEnterArea();
grayOut.designSurfaceRectangle = new RectangleGeometry(
new Rect(0, 0, ((Border)designPanel.Child).Child.RenderSize.Width, ((Border)designPanel.Child).Child.RenderSize.Height));
grayOut.designPanel = designPanel;
grayOut.adornerPanel = new AdornerPanel();
grayOut.adornerPanel.Order = AdornerOrder.Background;
@ -100,9 +93,7 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
designPanel.Adorners.Add(grayOut.adornerPanel);
}
}
static readonly TimeSpan animationTime = new TimeSpan(2000000);
internal static void Stop(ref InfoTextEnterArea grayOut)
{
if (grayOut != null) {

Просмотреть файл

@ -16,11 +16,6 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
@ -29,7 +24,7 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
/// <summary>
/// Display height of the element.
/// </summary>
class HeightDisplay : Control
public class HeightDisplay : Control
{
static HeightDisplay()
{
@ -40,7 +35,7 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
/// <summary>
/// Display width of the element.
/// </summary>
class WidthDisplay : Control
public class WidthDisplay : Control
{
static WidthDisplay()
{

Просмотреть файл

@ -46,7 +46,7 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
public static readonly DependencyProperty OperationMenuProperty =
DependencyProperty.Register("OperationMenu", typeof(Control[]), typeof(DesignerThumb), new PropertyMetadata(null));
internal PlacementAlignment Alignment;
public PlacementAlignment Alignment;
static DesignerThumb()
{

Просмотреть файл

@ -29,7 +29,7 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
{
bool checkWidth, checkHeight;
internal ResizeThumb(bool checkWidth, bool checkHeight)
public ResizeThumb(bool checkWidth, bool checkHeight)
{
Debug.Assert((checkWidth && checkHeight) == false);
this.checkWidth = checkWidth;