Vectorlight News

  • Chat App Converted to HTML and JQuery
    Sep 08, 2011

    Converted from Silverlight to HTML and Javascript/JQuery is the Vectorlight Chat App. Login using your Vectorlight password to chat using your username and avatar.

  • HTML5 iPhone,Android Big Guns Tower Defense
    Jul 02, 2011

    Big Guns has made the leap from Windows Phone 7 (XNA) to HTML5 so you can now play it on your iPhone, Android and other HTML5 compatible devices.

  • HTML5 Games - Word Poppers and Batty
    Jun 04, 2011

    As the take-up of HTML5 quickens (74% of users currently have a browser capable of HTML5 Canvas) we present two more games for both your browser and mobile.

  • Big Guns Tower Defense on Windows Phone 7
    May 06, 2011

    Coming soon to Windows Phone 7 is an XNA port of the popular Vectorlight tower defense game Super Tower Defense. Whilst retaining many of the graphical and gameplay features of the original Silverlight game.

  • Wakacube WP7 Update
    Apr 26, 2011

    Released to the Windows Phone 7 marketplace today is Version 1.1 of Wakacube the 3D physics game of skill. Included in the update are more levels (30 in total) and new mode Wakatime which generates random crate structures to keep players entertained long after the levels have been completed.

  • Home Page News
stakejunior
stakejunior
Dropdown menus are not shown Posted: Sep 18, 2010
 

hi,

i created a silverlight application in VS2010 and trying your demo menu.

i added the dll as reference + xmlns reference and pasted the demo code into my test project (the layout canvas).

when running the project the MainMenuItem do appear and get highlighted on hovering or clicking but no dropdown menu appears.

the funny thing is when doing the exact same test in expression blend 4 (creating a new project and using the demo code) everything works fine.


what am i doing wrong?

thanx + the right to left support is great


here's the code from VS2010:


<UserControl xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" x:Class="CabManage.MainPage"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

    xmlns:liquidMenu="clr-namespace:Liquid;assembly=Liquid.Menu"

    mc:Ignorable="d"

    d:DesignHeight="530" d:DesignWidth="970" FlowDirection="RightToLeft">

<Canvas x:Name="LayoutRoot" Background="White">

        <liquidMenu:MainMenu x:Name="testMenu" ItemSelected="testMenu_ItemSelected">

            <liquidMenu:MainMenu.Items>

                <liquidMenu:MainMenuItem Text="Menu 1">

                    <liquidMenu:Menu>

                        <liquidMenu:MenuItem ID="item11" Icon="images/document.png" Text="Item 1" />

                        <liquidMenu:MenuDivider />

                        <liquidMenu:MenuItem ID="item12" Icon="images/save.png" Shortcut="Ctrl+S" Text="Item 2" />

                        <liquidMenu:MenuDivider />

                        <liquidMenu:MenuItem ID="item13" Text="Item 3" />

                    </liquidMenu:Menu>

                </liquidMenu:MainMenuItem>

                <liquidMenu:MainMenuItem Text="Menu 2">

                    <liquidMenu:Menu>

                        <liquidMenu:MenuItem ID="item21" Text="Item 1" />

                        <liquidMenu:MenuItem ID="item22" Text="Item 2" />

                        <liquidMenu:MenuItem ID="item23" Text="Item 3" />

                    </liquidMenu:Menu>

                </liquidMenu:MainMenuItem>

                <liquidMenu:MainMenuItem Text="Menu 3">

                    <liquidMenu:Menu>

                        <liquidMenu:MenuItem ID="item31" Text="Item 1" />

                        <liquidMenu:MenuItem ID="item32" Text="Item 2" />

                        <liquidMenu:MenuDivider />

                        <liquidMenu:MenuItem ID="item33" Text="Item 3" />

                    </liquidMenu:Menu>

                </liquidMenu:MainMenuItem>

            </liquidMenu:MainMenu.Items>

        </liquidMenu:MainMenu>

    </Canvas>

</UserControl>

 
 
stakejunior
stakejunior
RE: Dropdown menus are not shown Posted: Sep 21, 2010
 

well, seems like an inactive furom.

if you do read this, Dan, i made some more tests:


the same code works good when using the old assembly (Version 5.2.7) but not with the new (Version 5.3.2) - child menus just won't open.

its a silverlight 4 project on a WIN7 x64 using VS2010 with toolkit and RIA Services and every possible update installed (dont know if it's relevant).


any idea? someone?

 
 
stakejunior
stakejunior
RE: Dropdown menus are not shown Posted: Sep 21, 2010
 

i meant forum.

 
 
stakejunior
stakejunior
RE: Dropdown menus are not shown Posted: Sep 21, 2010
 

found the problem.


the menu control does not show the menu item on mouse click when using scroll viewer in the root visual of the application.


private void Application_Startup(object sender, StartupEventArgs e)

        {            

            ScrollViewer rootScrollViewer = new ScrollViewer();

            rootScrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;

            rootScrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;            

            this.RootVisual = rootScrollViewer;            

            rootScrollViewer.Content = new MainPage();

            //this.RootVisual = new MainPage();            

        }


when using the default app startup event the menu works well.

any idea how to fix that?

 
 
dan
dan
RE: Dropdown menus are not shown Posted: Sep 27, 2010
 

Hi,


This problem is due to the menu responding to a LostFocus event which forces the menu to close before it has been displayed.  The solution is to add IsTabStop="False" to both the MainMenu and ScrollViewer controls.


In the next version the MainMenu control will have IsTabStop="False" set as default.


Thanks!

 
 
stakejunior
stakejunior
RE: Dropdown menus are not shown Posted: Oct 10, 2010
 

thanks Dan, but didn't work out.

here's the code:


private void Application_Startup(object sender, StartupEventArgs e)

        {            

            ScrollViewer rootScrollViewer = new ScrollViewer();

            rootScrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;

            rootScrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;            

rootScrollViewer

            this.RootVisual = rootScrollViewer;            

            rootScrollViewer.Content = new MainPage();

            //this.RootVisual = new MainPage();            

        }

 
 
stakejunior
stakejunior
RE: Dropdown menus are not shown Posted: Oct 10, 2010
 

thanks Dan, but didn't work out.

here's the code:


private void Application_Startup(object sender, StartupEventArgs e)

        {            

            ScrollViewer rootScrollViewer = new ScrollViewer();

            rootScrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;

            rootScrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;            

            rootScrollViewer.IsTabStop = false;

            this.RootVisual = rootScrollViewer;            

            rootScrollViewer.Content = new MainPage();

            //this.RootVisual = new MainPage();            

        }


<liquidMenu:MainMenu x:Name="MainMenuBar" ID="MainMenuBar" ItemSelected="MainMenuBar_ItemSelected" Margin="4,3,0,0" IsTabStop="False">

                        <liquidMenu:MainMenu.Items>

                            <liquidMenu:MainMenuItem Text="File" FontSize="14">

                                <liquidMenu:Menu Name="Menu1">

                                    <liquidMenu:MenuItem ID="HomeMenuItem" Text="sub" />

                                    <liquidMenu:MenuItem ID="ManagementSearchMenuItem" Text="sub1" />

                                    <liquidMenu:MenuItem ID="ManagementEditMenuItem" Text="sub2" />

                                </liquidMenu:Menu>

                            </liquidMenu:MainMenuItem>

                        </liquidMenu:MainMenu.Items>

                    </liquidMenu:MainMenu>

 
 
dan
dan
RE: Dropdown menus are not shown Posted: Oct 24, 2010
 

Hi,


This is strange.  I have taken your code from above and created a new VS2010 project and the menu seems to work fine (the test project is here).  Is there anything else you are doing to the menu?


Thanks!

 
 
stakejunior
stakejunior
RE: Dropdown menus are not shown Posted: Oct 24, 2010
 

Hey Dan,


yes. i have a MainMenu and a StackPanel Inside a Grid, one next to the other.

the StackPanel contains a HyperlinkButton and it causes the same problem.


Code:


<Grid x:Name="LayoutRoot" Background="White">

        <StackPanel Orientation="Vertical">

            <StackPanel Orientation="Vertical">

                <Grid Name="HeaderPanel" Height="30" Background="AliceBlue">


                    <!--master page header-->

                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,7,0">

                        <HyperlinkButton Name="LogoutButton" Content="Logout" Margin="0,2,2,2" Click="LogoutButton_Click" FontSize="13" Foreground="Blue" VerticalAlignment="Center" />

                        <sdk:Label Name="LoggedMessage" Content="Hello, " Margin="7,0,0,0" FontSize="13" />

                        <sdk:Label Name="LoggedUser" Margin="5,0,15,0" FontSize="13" />

                        <TextBlock Name="AppHeader" Text="App Name" FontSize="22" FontFamily="Tahoma" />

                        <Image Source="Images/sl_logo.png" Margin="7,0,0,0" />

                    </StackPanel>


                    <!--main menu bar-->

                    <liquidMenu:MainMenu x:Name="MainMenuBar" ID="MainMenuBar" ItemSelected="MainMenuBar_ItemSelected" Margin="4,3,0,0" IsTabStop="False">

                        <liquidMenu:MainMenu.Items>

                            <liquidMenu:MainMenuItem Text="File" FontSize="14" ShowChildMenuOnHover="True">

                                <liquidMenu:Menu Name="Menu1">

                                    <liquidMenu:MenuItem ID="HomeMenuItem" Text="Open" />

                                    <liquidMenu:MenuItem ID="ManagementSearchMenuItem" Text="Save" />

                                    <liquidMenu:MenuItem ID="ManagementEditMenuItem" Text="Exit" />

                                </liquidMenu:Menu>

                            </liquidMenu:MainMenuItem>

                        </liquidMenu:MainMenu.Items>

                    </liquidMenu:MainMenu>

                </Grid>

            </StackPanel>


            <!--content navigation frame-->

            <sdk:Frame Name="ContentFrame" Margin="0,5,0,0" Navigated="ContentFrame_Navigated" Source="/Views/Home.xaml" Canvas.ZIndex="-1">

                <sdk:Frame.UriMapper>

                    <sdk:UriMapper>

                        <sdk:UriMapping Uri="" MappedUri="/Views/Home.xaml"></sdk:UriMapping>

                    </sdk:UriMapper>

                </sdk:Frame.UriMapper>

            </sdk:Frame>

        </StackPanel>

    </Grid>

 
 
dan
dan
RE: Dropdown menus are not shown Posted: Oct 25, 2010
 

Hi,


I must be missing something, having pasted your code in to my test project the menu shows fine.  Are you able to package your code into a test project and email it to me and I will have another go here?  I'm sure theres something really obvious missing here but just cant find it!


Thanks!