Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

Silverlight Menu4U

, 14 Aug 2011
A new Silverlight menu with styling and templating.
Menu4UDemo.Web.zip
Menu4UDemo
Assets
Images
Arrow.png
BlackArrow.png
Bob.png
Checked.png
Dumbledore.jpg
Harry.jpg
Hermione.png
Hogwarts.png
Menu4U.png
Minerva.jpg
mnuAddClass.png
mnuAddExistingItem.png
mnuAddNewDataSource.png
mnuAddNewItem.png
mnuBuildSilverlightMenu.png
mnuCallStack.png
mnuCloseAllDocuments.png
mnuCloseSolution.png
mnuCommentSelection.png
mnuConnecttoDatabase.png
mnuCopy.png
mnuCut.png
mnuDatabaseExplorer.png
mnuDelete.png
mnuErrorList.png
mnuExtensionManager.png
mnuFindResults1.png
mnuFormatDocument.png
mnuFullScreen.png
mnuImmediate.png
mnuInsertSnippet.png
mnuLocals.png
mnuManageHelpSettings.png
mnuMSDNForums.png
mnuNewFile.png
mnuNewHorizontalTabGroup.png
mnuNewProject.png
mnuNewVerticalTabGroup.png
mnuNewWebSite.png
mnuNewWindow.png
mnuOpenFile.png
mnuOpenProject.png
mnuOpenWebSite.png
mnuOutput.png
mnuPageSetup.png
mnuPaste.png
mnuPrint.png
mnuPropertiesWindow.png
mnuPropertyPages.png
mnuQuickFind.png
mnuQuickReplace.png
mnuRedo.png
mnuSave.png
mnuSaveAll.png
mnuShowDataSources.png
mnuSilverlightMenuProperties.png
mnuSolutionExplorer.png
mnuSplit.png
mnuStartDebugging.png
mnuStartPage.png
mnuStepInto.png
mnuStepOver.png
mnuTechnicalSupport.png
mnuToolbox.png
mnuUncommentSelection.png
mnuUndo.png
mnuViewHelp.png
mnuWebBrowser.png
Ron.png
Scroll.png
ScrollBody.png
ScrollBottom.png
ScrollTop.png
Separator.png
Silverlight.jpg
Snape.jpg
WhiteArrow.png
Menu4UDemo.csproj.user
Menu4UDemo.suo
Properties
Views
Menu4UDemo.Web
Images
Silverlight.jpg
Menu4UDemo.Web.csproj.user
Properties
Silverlight.Controls
Converters
Properties
Silverlight.Controls.csproj.user
Themes
using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Globalization;
using System.Windows.Data;

namespace Silverlight.Controls.Converters
{
    public sealed class BooleanToCollapsedConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null)
            {
                return Visibility.Visible;
            }
            else
            {
                var val = System.Convert.ToBoolean(value, CultureInfo.InvariantCulture);

                if (val)
                {
                    return Visibility.Collapsed;
                }
                else
                {
                    return Visibility.Visible;
                }
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Marcelo Ricardo de Oliveira
Software Developer
Brazil Brazil
Marcelo Ricardo de Oliveira is a senior software developer who lives with his lovely wife Luciana and his little buddy and stepson Kauê in Guarulhos, Brazil, is co-founder of the Brazilian TV Guide TV Map and currently works for ILang Educação.
 
He is often working with serious, enterprise projects, although in spare time he's trying to write fun Code Project articles involving WPF, Silverlight, XNA, HTML5 canvas, Windows Phone app development, game development and music.
 
Published Windows Phone apps:
 
 
Awards:
 
CodeProject MVP 2012
CodeProject MVP 2011
 
Best Web Dev article of March 2013
Best Web Dev article of August 2012
Best Web Dev article of May 2012
Best Mobile article of January 2012
Best Mobile article of December 2011
Best Mobile article of October 2011
Best Web Dev article of September 2011
Best Web Dev article of August 2011
HTML5 / CSS3 Competition - Second Prize
Best ASP.NET article of June 2011
Best ASP.NET article of May 2011
Best ASP.NET article of April 2011
Best C# article of November 2010
Best overall article of November 2010
Best C# article of October 2010
Best C# article of September 2010
Best overall article of September 2010
Best overall article of February 2010
Best C# article of November 2009

| Advertise | Privacy | Mobile
Web03 | 2.8.140902.1 | Last Updated 14 Aug 2011
Article Copyright 2011 by Marcelo Ricardo de Oliveira
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid