Reputation: 7900
I am developing Windows Phone app and i want to add something like Dialog(Android) that popup and show a ListBox
\ LongListSelector
in this Dialog.
I use something called InputPrompt
to show dialog with TextBox. There is something like this that show ListBox
\ LongListSelector
?
Upvotes: 1
Views: 195
Reputation: 16826
You can use the CustomMessageBox
, available through the WPToolkit.
You're looking to create something like this to solve your problem:
ListPicker picker = new ListPicker()
{
Header = "SOME HEADER",
ItemsSource = YourViewModel.SomeCollectionWithItems,
Margin = new Thickness(12, 42, 24, 18)
};
CustomMessageBox messageBox = new CustomMessageBox()
{
Caption = "This is a message box",
Message = "Select one of the items from the list.",
Content = picker,
LeftButtonContent = "ok",
RightButtonContent = "cancel"
};
Obviously, the content property can be set to a wide variety of UI controls, so feel free to switch around. The provided out-of-the-box samples covers possible implementations.
Upvotes: 1