/// <summary>
        /// This method sets bar on an appropriate border.
        /// </summary>
        /// <param name="alignment">
        ///            This parameter shall be RelativeLayout alignment. It indicates on which border
        ///            floating controller shall be placed initially. Its value ma be:
        ///            RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.ALIGN_PARENT_RIGHT,
        ///            RelativeLayout.ALIGN_PARENT_TOP, RelativeLayout.ALIGN_PARENT_BOTTOM. </param>
        private void putBarOnBoard(int alignment)
        {
            FrameLayout hLayout      = mPanelMap[alignment];
            View        CurrentChild = null;

            if (hLayout != null)
            {
                CurrentChild = hLayout.getChildAt(0);
            }

            if (this.mBarAlignment == alignment && CurrentChild != null && CurrentChild.Visibility == View.VISIBLE)
            {
                return;
            }

            ControlBar visibleBar = null;

            FrameLayout.LayoutParams @params;

            if (hLayout != null)
            {
                FrameLayout parentLayout = null;
                int         size         = mControlBar.Context.Resources.getDimensionPixelSize(R.dimen.default_controlbar_thickness);

                mBarAlignment = alignment;
                mOrientation  = HORIZONTAL;
                visibleBar    = mControlBar;

                @params = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, size, mGravityMap[alignment]);

                if (visibleBar != null)
                {
                    parentLayout = (FrameLayout)visibleBar.Parent;
                }

                if (parentLayout != null)
                {
                    parentLayout.removeView(visibleBar);
                }

                hLayout.addView(visibleBar, @params);

                if (visibleBar != null)
                {
                    visibleBar.CurrentPosition = mBarAlignment;
                    visibleBar.Visibility      = View.INVISIBLE;
                    visibleBar.getChildAt(0).forceLayout();
                }
            }

            if (visibleBar != null)
            {
                visibleBar.CurrentPosition = mBarAlignment;
                visibleBar.Visibility      = View.VISIBLE;
                visibleBar.expand();
            }
        }