private bool IsNear(BBCtrl b) { double d = Math.Abs(b.Margin.Top - this.Margin.Top) + Math.Abs(b.Margin.Left + b.ActualWidth - 48 - this.Margin.Left); //Console.WriteLine(d); if (d < 50) { return(true); } else { return(false); } }
public void Show() { //lab.Margin=new Thickness(vb1.ActualWidth, lab.Margin.Top, lab.Margin.Right,lab.Margin.Bottom); string caption = "缺省参数标题"; if (BindingNBT != null) { caption = BindingNBT.GetCaption(); } bBCtrl = new BBCtrl(GetsData(HeadShape), GetsData(TailShape), caption, this); g.Children.Add(bBCtrl); g.UpdateLayout(); //return Block; }