当前位置: 首页>>代码示例>>C#>>正文


C# Rect.get_Height方法代码示例

本文整理汇总了C#中System.Windows.Rect.get_Height方法的典型用法代码示例。如果您正苦于以下问题:C# Rect.get_Height方法的具体用法?C# Rect.get_Height怎么用?C# Rect.get_Height使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Rect的用法示例。


在下文中一共展示了Rect.get_Height方法的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()));
//.........这里部分代码省略.........
开发者ID:guazipi,项目名称:bjAirPollution,代码行数:101,代码来源:FloatPopup.cs


注:本文中的System.Windows.Rect.get_Height方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。