Table of Contents

Class Layer

Namespace
HeBianGu.Control.LayerBox
Assembly
HeBianGu.Control.LayerBox.dll
public abstract class Layer : DrawingVisual, ILayer
Inheritance
Layer
Implements
Derived
Inherited Members
Extension Methods

Constructors

Layer()

public Layer()

Fields

DashProperty

public static readonly DependencyProperty DashProperty

Field Value

DependencyProperty

DescriptionProperty

public static readonly DependencyProperty DescriptionProperty

Field Value

DependencyProperty

FillProperty

public static readonly DependencyProperty FillProperty

Field Value

DependencyProperty

IconProperty

public static readonly DependencyProperty IconProperty

Field Value

DependencyProperty

IsSelectedProperty

public static readonly DependencyProperty IsSelectedProperty

Field Value

DependencyProperty

IsVisibleProperty

public static readonly DependencyProperty IsVisibleProperty

Field Value

DependencyProperty

StrokeProperty

public static readonly DependencyProperty StrokeProperty

Field Value

DependencyProperty

StrokeThicknessProperty

public static readonly DependencyProperty StrokeThicknessProperty

Field Value

DependencyProperty

TextProperty

public static readonly DependencyProperty TextProperty

Field Value

DependencyProperty

UseAsyncProperty

public static readonly DependencyProperty UseAsyncProperty

Field Value

DependencyProperty

Properties

Commands

public ObservableCollection<ICommand> Commands { get; }

Property Value

ObservableCollection<ICommand>

Dash

[Display(Name = "线条虚线", GroupName = "数据")]
public DoubleCollection Dash { get; set; }

Property Value

DoubleCollection

Description

public string Description { get; set; }

Property Value

string

Fill

[Display(Name = "背景颜色", GroupName = "数据")]
public Brush Fill { get; set; }

Property Value

Brush

Icon

[Display(Name = "图标", GroupName = "数据")]
public string Icon { get; set; }

Property Value

string

IsSelected

[Display(Name = "是否选中", GroupName = "数据")]
public bool IsSelected { get; set; }

Property Value

bool

IsVisible

[Display(Name = "是否显示", GroupName = "数据")]
public bool IsVisible { get; set; }

Property Value

bool

LayerView

protected LayerView LayerView { get; set; }

Property Value

LayerView

Order

public int Order { get; }

Property Value

int

RefreshDrawCommand

[Browsable(false)]
public DisplayerCommand RefreshDrawCommand { get; }

Property Value

DisplayerCommand

Stroke

[Display(Name = "线条颜色", GroupName = "数据")]
public Brush Stroke { get; set; }

Property Value

Brush

StrokeThickness

[Display(Name = "线条粗细", GroupName = "数据")]
public double StrokeThickness { get; set; }

Property Value

double

Text

[Display(Name = "文本", GroupName = "数据")]
public string Text { get; set; }

Property Value

string

UseAsync

public bool UseAsync { get; set; }

Property Value

bool

Methods

BeginInvokeDraw(Action<IDrawing>)

public virtual void BeginInvokeDraw(Action<IDrawing> action = null)

Parameters

action Action<IDrawing>

Clear()

public virtual void Clear()

Clear(IDrawing)

public virtual void Clear(IDrawing dc)

Parameters

dc IDrawing

Draw(IDrawing)

public virtual void Draw(IDrawing drawing)

Parameters

drawing IDrawing

Draw(LayerView)

public virtual void Draw(LayerView element)

Parameters

element LayerView

DrawPolyLine(params Point[])

protected void DrawPolyLine(params Point[] points)

Parameters

points Point[]

GetDashPen()

public Pen GetDashPen()

Returns

Pen

GetDashStyle(DoubleCollection)

protected DashStyle GetDashStyle(DoubleCollection from)

Parameters

from DoubleCollection

Returns

DashStyle

GetLogicalMousePosition()

public Point GetLogicalMousePosition()

Returns

Point

GetPen()

public virtual Pen GetPen()

Returns

Pen

OnCoordinateChanged(object, EventArgs)

public virtual void OnCoordinateChanged(object sender, EventArgs e)

Parameters

sender object
e EventArgs

OnIsVisibleChanged(bool, bool)

protected virtual void OnIsVisibleChanged(bool o, bool n)

Parameters

o bool
n bool

OnScaleChanged(object, ObjectRoutedEventArgs<Tuple<double, double>>)

public virtual void OnScaleChanged(object sender, ObjectRoutedEventArgs<Tuple<double, double>> e)

Parameters

sender object
e ObjectRoutedEventArgs<Tuple<double, double>>

RefreshDraw()

public virtual void RefreshDraw()

RefreshTransform(LayerView)

public virtual void RefreshTransform(LayerView view)

Parameters

view LayerView