本文整理汇总了C#中System.Windows.Rect.get_Left方法的典型用法代码示例。如果您正苦于以下问题:C# Rect.get_Left方法的具体用法?C# Rect.get_Left怎么用?C# Rect.get_Left使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Rect
的用法示例。
在下文中一共展示了Rect.get_Left方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Open
public void Open(Point point, Rect rect)
{
this.rect = rect;
switch (this.ArrowPlacement)
{
case Dock.Left:
this.PathPoint3.set_Size(new Size(this.CornerRadius.get_TopLeft(), this.CornerRadius.get_TopLeft()));
this.PathPoint5.set_Size(new Size(this.CornerRadius.get_TopRight(), this.CornerRadius.get_TopRight()));
this.PathPoint7.set_Size(new Size(this.CornerRadius.get_BottomRight(), this.CornerRadius.get_BottomRight()));
this.PathPoint9.set_Size(new Size(this.CornerRadius.get_BottomLeft(), this.CornerRadius.get_BottomLeft()));
this.RootPopup.set_HorizontalOffset(point.get_X() + this.HOriginOffset);
if ((this.RootPopup.get_HorizontalOffset() + base.get_Width()) <= rect.get_Width())
{
if (this.RootPopup.get_HorizontalOffset() < rect.get_Left())
{
this.RootPopup.set_HorizontalOffset(rect.get_Left());
}
break;
}
this.RootPopup.set_HorizontalOffset(rect.get_Width() - base.get_Width());
break;
case Dock.Right:
this.PathPoint3.set_Size(new Size(this.CornerRadius.get_BottomRight(), this.CornerRadius.get_BottomRight()));
this.PathPoint5.set_Size(new Size(this.CornerRadius.get_BottomLeft(), this.CornerRadius.get_BottomLeft()));
this.PathPoint7.set_Size(new Size(this.CornerRadius.get_TopLeft(), this.CornerRadius.get_TopLeft()));
this.PathPoint9.set_Size(new Size(this.CornerRadius.get_TopRight(), this.CornerRadius.get_TopRight()));
this.RootPopup.set_HorizontalOffset((point.get_X() - this.HOriginOffset) - base.get_Width());
if ((this.RootPopup.get_HorizontalOffset() + base.get_Width()) <= rect.get_Width())
{
if (this.RootPopup.get_HorizontalOffset() < rect.get_Left())
{
this.RootPopup.set_HorizontalOffset(rect.get_Left());
}
}
else
{
this.RootPopup.set_HorizontalOffset(rect.get_Width() - base.get_Width());
}
this.RootPopup.set_VerticalOffset((point.get_Y() - base.get_Height()) + this.VOriginOffset);
if ((this.RootPopup.get_VerticalOffset() + base.get_Height()) > rect.get_Height())
{
this.RootPopup.set_VerticalOffset(rect.get_Height() - base.get_Height());
}
else if (this.RootPopup.get_VerticalOffset() < rect.get_Top())
{
this.RootPopup.set_VerticalOffset(rect.get_Top());
}
this.HOffsetAnimation.set_From(new double?(point.get_X()));
this.HOffsetAnimation.set_To(new double?(this.RootPopup.get_HorizontalOffset()));
this.VOffsetAnimation.set_From(new double?(point.get_Y()));
this.VOffsetAnimation.set_To(new double?(this.RootPopup.get_VerticalOffset()));
this.WidthAnimation.set_From(0.0);
this.WidthAnimation.set_To(new double?(base.get_Width()));
this.HeightAnimation.set_From(0.0);
this.HeightAnimation.set_To(new double?(base.get_Height()));
this.StartPointAnimation.set_From(new Point(0.0, 0.0));
this.StartPointAnimation.set_To(new Point(point.get_X() - this.RootPopup.get_HorizontalOffset(), point.get_Y() - this.RootPopup.get_VerticalOffset()));
this.PathPoint1Animation.set_From(new Point(0.0, 0.0));
this.PathPoint1Animation.set_To(new Point(base.get_Width() + this.BorderWidth, (base.get_Height() / 2.0) + this.HalfArrowWidth));
this.PathPoint2Animation.set_From(new Point(0.0, 0.0));
this.PathPoint2Animation.set_To(new Point(base.get_Width() + this.BorderWidth, (base.get_Height() + this.BorderWidth) - this.CornerRadius.get_BottomRight()));
this.PathPoint3Animation.set_From(new Point(0.0, 0.0));
this.PathPoint3Animation.set_To(new Point((base.get_Width() + this.BorderWidth) - this.CornerRadius.get_BottomRight(), base.get_Height() + this.BorderWidth));
this.PathPoint4Animation.set_From(new Point(0.0, 0.0));
this.PathPoint4Animation.set_To(new Point((-1.0 * this.BorderWidth) + this.CornerRadius.get_BottomLeft(), base.get_Height() + this.BorderWidth));
this.PathPoint5Animation.set_From(new Point(0.0, 0.0));
this.PathPoint5Animation.set_To(new Point(-1.0 * this.BorderWidth, (base.get_Height() + this.BorderWidth) - this.CornerRadius.get_BottomLeft()));
this.PathPoint6Animation.set_From(new Point(0.0, 0.0));
this.PathPoint6Animation.set_To(new Point(-1.0 * this.BorderWidth, (-1.0 * this.BorderWidth) + this.CornerRadius.get_TopLeft()));
this.PathPoint7Animation.set_From(new Point(0.0, 0.0));
this.PathPoint7Animation.set_To(new Point((-1.0 * this.BorderWidth) + this.CornerRadius.get_TopLeft(), -1.0 * this.BorderWidth));
this.PathPoint8Animation.set_From(new Point(0.0, 0.0));
this.PathPoint8Animation.set_To(new Point((base.get_Width() + this.BorderWidth) - this.CornerRadius.get_TopRight(), -1.0 * this.BorderWidth));
this.PathPoint9Animation.set_From(new Point(0.0, 0.0));
this.PathPoint9Animation.set_To(new Point(base.get_Width() + this.BorderWidth, (-1.0 * this.BorderWidth) + this.CornerRadius.get_TopRight()));
this.PathPoint10Animation.set_From(new Point(0.0, 0.0));
this.PathPoint10Animation.set_To(new Point(base.get_Width() + this.BorderWidth, (base.get_Height() / 2.0) - this.HalfArrowWidth));
goto Label_0DE2;
default:
goto Label_0DE2;
}
this.RootPopup.set_VerticalOffset((point.get_Y() - base.get_Height()) + this.VOriginOffset);
if ((this.RootPopup.get_VerticalOffset() + base.get_Height()) > rect.get_Height())
{
this.RootPopup.set_VerticalOffset(rect.get_Height() - base.get_Height());
}
else if (this.RootPopup.get_VerticalOffset() < rect.get_Top())
{
this.RootPopup.set_VerticalOffset(rect.get_Top());
}
this.HOffsetAnimation.set_From(new double?(point.get_X()));
this.HOffsetAnimation.set_To(new double?(this.RootPopup.get_HorizontalOffset()));
this.VOffsetAnimation.set_From(new double?(point.get_Y()));
this.VOffsetAnimation.set_To(new double?(this.RootPopup.get_VerticalOffset()));
this.WidthAnimation.set_From(0.0);
this.WidthAnimation.set_To(new double?(base.get_Width()));
this.HeightAnimation.set_From(0.0);
this.HeightAnimation.set_To(new double?(base.get_Height()));
//.........这里部分代码省略.........