Yesterday i found from twitter as 'Coding4Fun Toolkit is Supported for Windows Phone 8.1'.And i want to be say thanks to Hermit Dave for sharing this info on twitter. Now Coding4Fun toolkit v2.0.9 for Windows Platform dev has been released and packages are available for download from Nuget.
In WindowsPhone 8.0 we got lot of additional controls from Coding4Fun,The Coding4Fun Toolkit has multiple controls and useful items for XAML based applications.And current version v2.0.9 includes following controls.
For more information, please visit this link.However from above available controls,This article will teach you about 'How to use MessagePrompt control in WindowsPhone store 8.1 ?'.
Install the Coding4Fun Toolkit nuget package into the solution by starting the Package Manager PowerShell by following:
Tools->Library Package Manager->Package Manager console
Once the powershell command prompt is running, type the following command
This will add Coding4Fun.Toolkit.Controls.dll in 'References' of the current project like below.
1.2 How to use MessagePrompt control in WindowsPhone store 8.1 ?:
In this article I am going to explain about the MessagePrompt control from the Coding4fun Toolkit.Fortunately now MessagePrompt control is available for WP8.1. As its name says it is a kind of extended popup that displays a message. MessagePrompt can display different content like Title, composite Body content, custom buttons, etc .
Let's make following UI in MainPage.xaml page to use MessagePrompt control in different ways.
Press F5 to run the project and your screen will be appeared like this,
Generally the MessagePrompt is designed to be used in code. The sample code should looks like:
Here is an example shows how to use MessagePrompt control. You can use IsCancelVisible property to Show/Hide the MessagePrompt `s cancel button.
Custom MessagePrompt Body with Xaml :
Generally the MessagePrompt is designed to be used in code but sometimes users want to put some composite elements into the popup body so in this case it is easy to define these element in XAML. Here is one possible solution with a UserControl. Just create a new UserControl named UcMsgBody.xaml and add the following code into it:
After that go back to MainPage.xaml.cs and add the following code:
Custom MessagePrompt with C#:
We can also add our custom buttons for 'Ok' & 'Cancel' buttons like this.
Here you may note some useful points:
To align center:
ObjMessagePrompt.VerticalAlignment = VerticalAlignment.Center;//Align message prompt to center.
2)To Remove MessagePrompt Default 'Ok' Symbol:
ObjMessagePrompt.ActionPopUpButtons.Clear();//Clearing all defualt messageprompt buttons.
3)To add custom button:
You may read more about this at MyBlog
Help me with feedback:
Thank you for reading my article. Drop all your questions/comments in QA tab give me your feedback with star rating (1 Star - Very Poor, 5 Star - Very Nice).