Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoHideStrip Lost Pixel #65

Closed
fscur opened this issue Sep 20, 2012 · 3 comments
Closed

AutoHideStrip Lost Pixel #65

fscur opened this issue Sep 20, 2012 · 3 comments
Milestone

Comments

@fscur
Copy link

fscur commented Sep 20, 2012

Hi, is it only me, or there is a pixel at the top-left corner of AutoHideStrip that is not being painted over?
If you set the backcolor of the dock panel to black and the backcolor of a dockcontent to white is easy to notice.

public partial class TestForm : Form
{
    public TestForm()
    {
        InitializeComponent();
        this.StartPosition = FormStartPosition.CenterScreen;
        this.IsMdiContainer = true;
        this.dpLayout.BackColor = Color.Black;
    }

    protected override void OnLoad(System.EventArgs e)
    {
        base.OnLoad(e);

        DockContent content = new DockContent();
        content.MdiParent = this;
        content.Name = "Test";
        content.Text = "Test";
        content.BackColor = Color.White;
        content.Show(this.dpLayout, DockState.DockLeftAutoHide);
    }
}
@fscur
Copy link
Author

fscur commented Sep 20, 2012

Found it!

Why is there a dummy control in Dock Panel? I assume its not simply a "dummy" cause it has something to do with DockPanel.FocusManager... any way...

I changed this line in the DockPanel constructor:

m_dummyControl.Bounds = new Rectangle(0, 0, 1, 1);

for this one

m_dummyControl.Bounds = new Rectangle(-1, -1, 1, 1);

and it solves the problem...

@fscur
Copy link
Author

fscur commented Sep 26, 2012

Actually, I've found a drawback.. when I did this I noticed the document content is no longer drawn.
I´ve yet to check why its happening but I've not had the time yet.

@TheoryOfNekomata
Copy link

How about setting the dummy control's BackColor to Color.Transparent?

@lextm lextm closed this as completed in 86719ce Sep 14, 2016
@lextm lextm added this to the 2.11 milestone Sep 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants