GetDock() public method

Gets the dock setting for the provided child instance.
public GetDock ( ViewBase child ) : ViewDockStyle
child ViewBase Child view element.
return ViewDockStyle
Ejemplo n.º 1
0
        /// <summary>
        /// Gets the element that represents the foreground color.
        /// </summary>
        /// <param name="i">Index.</param>
        /// <returns>View content instance.</returns>
        protected override ViewDrawContent GetDockerForeground(int i)
        {
            // Get the indexed docker
            ViewDrawDocker viewDocker = _viewDockers[i];

            // Find the child that is used to fill docker
            foreach (ViewBase child in viewDocker)
            {
                if (viewDocker.GetDock(child) == ViewDockStyle.Fill)
                {
                    return(child as ViewDrawContent);
                }
            }

            return(null);
        }