radMenu on MDI

2 posts, 0 answers
  1. MVeranis
    MVeranis avatar
    14 posts
    Member since:
    Jun 2006

    Posted 26 Jan 2011 Link to this post

    I've created a new project and am trying to do the following:

    1. created a ShapedForm as MDI Parent
    2. put a radPanel at the top of the ShapedForm
    3. put a radMenu on the radPanel
    4. set all of the above to Windows7 theme
    5. in page load of the MDI (ShapedForm), i want to display a login form (Login) in the center of the MDI (Shaped form) via code below:
    Dim fLogin As Form
            fLogin = New Login
            fLogin.MdiParent = Me
            fLogin.StartPosition = FormStartPosition.CenterParent
            fLogin.WindowState = FormWindowState.Normal
            fLogin.Show()

    PROBLEMS:
    1. the radmenu has no theme
    2. in the radmenu, i have a radmenuHeaderItem - it is aligned on the top no matter what i try - so does not line up with the menu items (not aligned middled like the menu items).
    3. the login page appears in the upper top left corner not centered.

    i've looked for examples but none of what i'm trying to accomplish.
    please help. i've been on asp.net for the past 5 years so it's frustrating.
    thanks!

  2. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 31 Jan 2011 Link to this post

    Hi MVeranis,

    Thank you for writing.

    Please find the answers to your questions below:
    1. The easiest way to set a theme for the whole application is to use the ThemeResolutionService. Here is how to do that:
    new Windows7Theme();
    ThemeResolutionService.ApplicationThemeName = "Windows7";

    2. I am not sure if I understand this one correctly, but the header menu item takes the whole width of its row and its text is aligned with the vertical line on the left hand side of the menu's drop down. If you want to adjust the position of the item and the text position in it, you can use the Padding and Margin properties. If you still are not able to achieve what you are looking for, I would kindly ask you to provide a more detailed explanation of what you want to achieve.

    3. The Log in form appears in the upper left corner due to the MDI mechanism. It stacks forms onto one another with a little offset starting from the top left corner and going towards the bottom right corner of the MDI parent.

    Another thing is that if you want the user to authenticate him/herself you will want to show the log in form as a dialog. If you set it up as an MDI child of the main form you will not be able to show it as a dialog and the user can just ignore it.

    I hope this will be useful. If you need further questions, I would be happy to help.

    All the best,
    Ivan Petrov
    the Telerik team
    Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top