コード例 #1
0
        internal static void MeasureView(WorkflowViewElement view, bool measureAsCollapsed)
        {
            bool expandState = view.ExpandState;
            bool pinState    = view.PinState;

            if (measureAsCollapsed)
            {
                view.ForceCollapse();
            }

            view.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
            view.UpdateLayout();

            if (view.ExpandState != expandState)
            {
                view.ExpandState = expandState;
            }
            if (view.PinState != pinState)
            {
                view.PinState = pinState;
            }
        }
コード例 #2
0
        internal static void MeasureView(WorkflowViewElement view, bool measureAsCollapsed)
        {
            bool expandState = view.ExpandState;
            bool pinState = view.PinState;
         
            if (measureAsCollapsed)
            {
                view.ForceCollapse();
            }

            view.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
            view.UpdateLayout();

            if (view.ExpandState != expandState)
            {
                view.ExpandState = expandState;
            }
            if (view.PinState != pinState)
            {
                view.PinState = pinState;
            }
        }