Make a few Controls Public so they can be used from outside from own Designer Extensions
This commit is contained in:
Родитель
5c9a33ed60
Коммит
e1059504d3
|
@ -31,7 +31,7 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gray out everything except a specific area.
|
/// Gray out everything except a specific area.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
sealed class GrayOutDesignerExceptActiveArea : FrameworkElement
|
public sealed class GrayOutDesignerExceptActiveArea : FrameworkElement
|
||||||
{
|
{
|
||||||
Geometry designSurfaceRectangle;
|
Geometry designSurfaceRectangle;
|
||||||
Geometry activeAreaGeometry;
|
Geometry activeAreaGeometry;
|
||||||
|
|
|
@ -21,7 +21,6 @@ using System.Diagnostics;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Threading;
|
|
||||||
using System.Windows.Media.Animation;
|
using System.Windows.Media.Animation;
|
||||||
using ICSharpCode.WpfDesign.Adorners;
|
using ICSharpCode.WpfDesign.Adorners;
|
||||||
using ICSharpCode.WpfDesign.Designer.Services;
|
using ICSharpCode.WpfDesign.Designer.Services;
|
||||||
|
@ -29,16 +28,13 @@ using ICSharpCode.WpfDesign.Designer.Services;
|
||||||
namespace ICSharpCode.WpfDesign.Designer.Controls
|
namespace ICSharpCode.WpfDesign.Designer.Controls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gray out everything except a specific area.
|
/// A Info text area.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
sealed class InfoTextEnterArea : FrameworkElement
|
public sealed class InfoTextEnterArea : FrameworkElement
|
||||||
{
|
{
|
||||||
Geometry designSurfaceRectangle;
|
|
||||||
Geometry activeAreaGeometry;
|
Geometry activeAreaGeometry;
|
||||||
Geometry combinedGeometry;
|
|
||||||
AdornerPanel adornerPanel;
|
AdornerPanel adornerPanel;
|
||||||
IDesignPanel designPanel;
|
IDesignPanel designPanel;
|
||||||
const double MaxOpacity = 0.3;
|
|
||||||
|
|
||||||
public InfoTextEnterArea()
|
public InfoTextEnterArea()
|
||||||
{
|
{
|
||||||
|
@ -49,7 +45,6 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
|
||||||
get { return activeAreaGeometry; }
|
get { return activeAreaGeometry; }
|
||||||
set {
|
set {
|
||||||
activeAreaGeometry = value;
|
activeAreaGeometry = value;
|
||||||
combinedGeometry = activeAreaGeometry;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,8 +75,6 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
|
||||||
OptionService optionService = services.GetService<OptionService>();
|
OptionService optionService = services.GetService<OptionService>();
|
||||||
if (designPanel != null && grayOut == null && optionService != null && optionService.GrayOutDesignSurfaceExceptParentContainerWhenDragging) {
|
if (designPanel != null && grayOut == null && optionService != null && optionService.GrayOutDesignSurfaceExceptParentContainerWhenDragging) {
|
||||||
grayOut = new InfoTextEnterArea();
|
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.designPanel = designPanel;
|
||||||
grayOut.adornerPanel = new AdornerPanel();
|
grayOut.adornerPanel = new AdornerPanel();
|
||||||
grayOut.adornerPanel.Order = AdornerOrder.Background;
|
grayOut.adornerPanel.Order = AdornerOrder.Background;
|
||||||
|
@ -100,9 +93,7 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
|
||||||
designPanel.Adorners.Add(grayOut.adornerPanel);
|
designPanel.Adorners.Add(grayOut.adornerPanel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static readonly TimeSpan animationTime = new TimeSpan(2000000);
|
|
||||||
|
|
||||||
internal static void Stop(ref InfoTextEnterArea grayOut)
|
internal static void Stop(ref InfoTextEnterArea grayOut)
|
||||||
{
|
{
|
||||||
if (grayOut != null) {
|
if (grayOut != null) {
|
||||||
|
|
|
@ -16,11 +16,6 @@
|
||||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
|
@ -29,7 +24,7 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Display height of the element.
|
/// Display height of the element.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class HeightDisplay : Control
|
public class HeightDisplay : Control
|
||||||
{
|
{
|
||||||
static HeightDisplay()
|
static HeightDisplay()
|
||||||
{
|
{
|
||||||
|
@ -40,7 +35,7 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Display width of the element.
|
/// Display width of the element.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class WidthDisplay : Control
|
public class WidthDisplay : Control
|
||||||
{
|
{
|
||||||
static WidthDisplay()
|
static WidthDisplay()
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
|
||||||
public static readonly DependencyProperty OperationMenuProperty =
|
public static readonly DependencyProperty OperationMenuProperty =
|
||||||
DependencyProperty.Register("OperationMenu", typeof(Control[]), typeof(DesignerThumb), new PropertyMetadata(null));
|
DependencyProperty.Register("OperationMenu", typeof(Control[]), typeof(DesignerThumb), new PropertyMetadata(null));
|
||||||
|
|
||||||
internal PlacementAlignment Alignment;
|
public PlacementAlignment Alignment;
|
||||||
|
|
||||||
static DesignerThumb()
|
static DesignerThumb()
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
|
||||||
{
|
{
|
||||||
bool checkWidth, checkHeight;
|
bool checkWidth, checkHeight;
|
||||||
|
|
||||||
internal ResizeThumb(bool checkWidth, bool checkHeight)
|
public ResizeThumb(bool checkWidth, bool checkHeight)
|
||||||
{
|
{
|
||||||
Debug.Assert((checkWidth && checkHeight) == false);
|
Debug.Assert((checkWidth && checkHeight) == false);
|
||||||
this.checkWidth = checkWidth;
|
this.checkWidth = checkWidth;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче