Sreginogemoh
Sreginogemoh

Reputation: 1309

How to resize WPF About Box

I have trying to use that about bopx in my WPF application http://www.nuget.org/packages/AboutBox/ but i cant figure out how to resize it and how to make it not dragable. I tried that but no way:

            About about = new About();
            about.Window.Width = 120;
            about.Window.Height = 130;
            about.Window.MaxWidth = 120;
            about.Window.MaxHeight = 130;
            about.Window.MinWidth = 120;
            about.Window.MinHeight = 130;
            about.Window.ResizeMode = ResizeMode.NoResize;
            about.Window.WindowStyle = WindowStyle.ToolWindow;
            about.Window.WindowState = WindowState.Minimized;
            about.Window.AllowDrop = false;
            about.Show();

May be some one may help. Also I would like to display close or OK button to close the window, and want to disable closing window when focus is loosing.

UPDATE: I ended up by using http://wpfmbx.codeplex.com/ it is exactly what i need

Upvotes: 0

Views: 369

Answers (1)

user786981
user786981

Reputation:

I have not tried that About box but following should be the correct order for heights:

        About about = new About();
        about.Window.MinWidth = 120;
        about.Window.MinHeight = 130;
        about.Window.MaxWidth = 120;
        about.Window.MaxHeight = 130;
        about.Window.Width = 120;
        about.Window.Height = 130;

MinWidth/MinHeight takes precedence then comes MaxWidth/MaxHeight and Width/Height. I am not 100 % sure that it is the cause of your problem, just give it a try.

To be able to make it drag-able manually, then you just need to call DragMove(), on MouseDown or some similar event.

Upvotes: 1

Related Questions