Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6969629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:36:21+00:00 2026-05-27T16:36:21+00:00

I’m trying to replace a Silverlight 2-era third-party menubar control in our Silverlight application

  • 0

I’m trying to replace a Silverlight 2-era third-party menubar control in our Silverlight application with this one, after upgrading to VS2010 and Silverlight 4 broke the third-party control and the vendor informed me that the version we bought won’t work on Silverlight 4. I’ve managed to replace all of the other controls of theirs that we were using with standard ones, but there’s no standard Silverlight menu control. I thought it would be fairly straightforward to replace, but apparently my XAML skills aren’t up to the task (note: I didn’t write the application myself, I’ve inherited it).

The Silverlight application consists of a Windows application-style top menubar for navigation, and a content pane. The menu should display its drop-downs overlapping the content (as it would be displayed over your code in VS, for example).

The problem that I have is that if I put the menu and content in different cells of one grid, the menu is cropped to within its grid cell (so that the drop-down menu is not shown when clicked), but if I add a canvas with 2 grids having different z-indexes I can get the menu to display properly (overlapping the content), but the application does not resize to fit the browser window.

i.e. the menu is cropped if I lay it out like this (this is simplified XAML to try to explain what I mean, I’ve tried not to exclude any important attributes, but might have):

<Grid x:Name="LayoutRoot">
    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <slm:SLMenu Grid.Row="0" Grid.Column="0"/>
        <StackPanel x:name="Content" Grid.Row="1" Grid.Column="0" />
    </Grid>
</Grid>

and if I lay it out like this the menu is fine but the control does not fill the window (adding background colours indicates that the canvas stretches to fill the grid, but its sub-grids don’t fill it, but the grid containing the menu control will resize to contain the menu control when it is displaying a drop-down):

<Grid x:Name="LayoutRoot">
    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <Canvas>
            <Grid Canvas.ZIndex="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                <!-- define grid with 2 rows, one the height of the menu -->
                <slm:SLMenu Grid.Row="0" Grid.Column="0" />
            </Grid>
            <Grid Canvas.ZIndex="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                <!-- define grid with 2 rows, one the height of the menu -->
                <StackPanel x:name="Content" Grid.Row="1" Grid.Column="0" />
            </Grid>
    </Grid>
</Grid>

I would much prefer to fix it with the first layout, as this is how it was done before. I’ve tried setting Z-index values on the menu control itself, but nothing I do seems to allow it to escape the bounds of the grid cell.

The third-party control had no issues with overlapping its grid cell, so what am I doing wrong with this one?

The CodeProject article where this new menu control is published seems to have unanswered questions, so I thought I’d try here first.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:36:21+00:00Added an answer on May 27, 2026 at 4:36 pm

    The menu control works perfectly when it is just in the LayoutRoot grid, trying to position it inside a sub-grid was what caused the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.