0
我想授予用户重新命名文件的权限。为此当用户点击菜单项'重命名'弹出对话框和可编辑文本框应显示'确定'和'取消'按钮?我如何实现它?如果有任何请分享代码。在windows phone 7中弹出可编辑文本
BR, 急怒
我想授予用户重新命名文件的权限。为此当用户点击菜单项'重命名'弹出对话框和可编辑文本框应显示'确定'和'取消'按钮?我如何实现它?如果有任何请分享代码。在windows phone 7中弹出可编辑文本
BR, 急怒
您可以使用InputPrompt
从Coding4fun Tookit
该文档可在Codeplex:http://coding4fun.codeplex.com/wikipage?title=InputPrompt&referringTitle=Documentation
调用它很简单:
var input = new InputPrompt();
input.Completed += InputCompleted;
input.Title = "Rename file";
input.Message = "Enter a new name for the file:";
input.Show();
然后你只需检索回调中的值:
private void InputCompleted(object sender, PopUpEventArgs<object, PopUpResult> e)
{
MessageBox.Show(e.Result);
}
Thanks.Laying使用第三方库,我可以使用silverlite本身的一些类吗? –
你当然可以。使用例如'Popup'控件,可以自由构建您自己的InputPrompt。 –