AjaxControlToolkit.Design.RatingExtenderDesigner.ActionList.Direction C# (CSharp) Method

Direction() private method

private Direction ( ) : void
return void
            void Direction()
            {
                var rating = ((Rating)_parent.Component);

                // Get a reference to the control's Alignment property
                var propDesc = TypeDescriptor.GetProperties(rating)["RatingDirection"];

                //Switch
                if(rating.RatingDirection == RatingDirection.LeftToRightTopToBottom)
                    propDesc.SetValue(rating, RatingDirection.RightToLeftBottomToTop);
                else
                    propDesc.SetValue(rating, RatingDirection.LeftToRightTopToBottom);
            }