Menu control in silverlight 4 similar to WPF Menu - silverlight

I want a menu control for my silverlight 4.0 application.
The functionality should be similar to a WPF menu control,
Can you suggest me the solution.
Thanks.

Try
http://silverlightpopupmenu.codeplex.com/
http://slmenu.codeplex.com/
http://www.vectorlight.net/silverlight/controls/menu_(popup).aspx
You could also try paid components such as
http://www.devexpress.com/products/net/controls/silverlight/menu/
http://www.telerik.com/products/silverlight/menu.aspx

Here are two other ones you might want to try:
http://sl4popupmenu.codeplex.com/
http://www.viblend.com/products/net/silverlight/controls/silverlight_menu_control.aspx

Related

Context menu in WinRT Xaml

Is there any default way to have context menu in WinRT.
am migrating my WPF application to WinRT Xaml, and am in search of Context menu support in WinRT.
How could i achieve this?
Typically the AppBar is the best replacement for a ContextMenu. If you really need a hidden touch&hold sort of a context menu you could try the context Menu control from Callisto. Windows 8.1 adds a MenuFlyout control which I think is similar to the one in Callisto.
Why not opt for FlyOut Control?! IMHO it should support for any framework.
PopupMenu is the built-in class for context menu functionality. It has a limitation of 6 commands and provides a separator support. It is not a control, so it has no UI customization or design time support. You can look at this example for how it is used.

Custom Wpf ListBox Control

I'm new to wpf and have just been given a project to create a set of custom controls which will be used to make a previous windows forms application more manageable and current. However I cannot seem to find much info with regards to customising the built in Listbox, this would involve preferably replacing the scroll bar and the +/- buttons with custom images etc..
Just wondered if anyone knows how to get at these ?
Thanks in advance.
Check here for the default control template of the listbox.You can customize the scrollviewer there to do what you are looking for.Check the below article to get started
Using Templates to Customize WPF Controls
Learn about WPF styling and templating. Other than that, the question is too generic for SO. Read the article (and perhaps google some more articles on the topic), try to style the listbox and come back with specific issues. WPF is not easy to get into, but it is definitely worth the time.

WPF Menu on Winforms

Is it possible to show WPF Context menu on WinForms?
If yes, how could we do that?
OK, so I've found the answer myself... (I tried to give a 50 point bounty, but I don't think I can award myself :P)
We have a lot of legacy WinForms... forms... still in our project at work. And here's the secret code that is needed to display a WPF Context Menu in a WinForms project!
var myMenu = new System.Windows.Controls.ContextMenu();
myMenu.Items.Add("One");
myMenu.Items.Add("Two");
myMenu.Items.Add("Three");
myMenu.IsOpen = true;
Tada!!! - There is no secret code needed... you can write this code in a WPF App or a WinForms app and it works the same.
And there's your answer :)
You can mix the 2 technologies using WindowsFormsHost (WinForm inside WPF window) and ElementHost (WPF inside WinForm window).
You will not encounter the Airspace issue as you are adding a WPF menu into a Winform application. But you will if you create WPF windows with Winform UserControls. This Blog post has some ideas about solving it, but it is not pretty.
I don't know if it can be done, but this article might help point you in the right direction. As a WPF developer, it seems strange to me to want to mix winforms and wpf, but i can see the case for re-use.

Is there a ChildWindow equivalent on Windows Phone 7? How to do rich modal popups

I'm developing a phone app and need a modal dialog with some "rich" content - a few text boxes and a drop down. OK, not very rich but more than a MessageBox. :>
In regular Silverlight I know there's the ChildWindow control - but can't find the equivalent in Phone 7.
How have other folks done rich popup dialogs on the phone?
Thanks!
Silverlight actually has a control called a Popup. Here's the MSDN documentation.
It's incredibly simple to use (just set IsOpen to true to dispay) and quite effective. The only reason you might use a Panel with manual state control would be is you want precision control over animations etc.
Where I've seen people implement something like this they just have added a panel to the page and made this visible to act as a modal popup.
If you do this, be sure to handle use of the back button correctly.
Actually, there is ChildWindow on Windows Phone 7 in System.Windows.Controls library.
These are some examples:
http://www.c-sharpcorner.com/uploadfile/raj1979/how-to-implement-childwindow-in-windows-phone-7/
http://blog.deepwire.co.uk/?p=434
http://www.31a2ba2a-b718-11dc-8314-0800200c9a66.com/2011/06/how-to-create-childwindow-login-popup.html

Textbox with a popup in Silverlight

I'd like to build an own control, but therefore I need to know if its possible to combine a Textbox event with a Popup more or less like the Datepicker Control.
Or is there a better way to do this than with a Popup?
Greets
Patrick
Sure you could do this. In fact look at the DatePicker as an example of how you might do that. I'd imagine your control would be a composite of TextBox, Button and Popup controls.
You can download the complete source to the Silverlight Toolkit from the CodePlex Silverlight Toolkit project site.
And you can get the source and unit tests for the Beta 2 Release 1 controls at Shawn Burke's blog.
Neither of these may be exactly what you're looking for, but they might get you on the right track.

Resources