关于windows下换行
关键的是google 关键字 wpf findResource line break
1 使用场景
先从Resource中获取资源字符串,然后再进行format,这里的format是为了进行动态的对字符串进行改变,以传参数的形式。
问题来了,在资源中的
=====================================================================================资源字符
<sys:String x:Key="TaskDetailVM_ScriptNumWarn">There are {0} script files in this folder
(including all sub-folders), are you sure to continue?\n\nClick 'OK' to continue and click
'Cancel' to cancel the process.</sys:String>
=================================================================================应用带代码
if (System.Windows.Forms.MessageBox.Show(string.Format((string)App.Current.FindResource("TaskDetailVM_ScriptNumWarn"), tempCaseList.Count), (string)App.Current.FindResource("TaskDetailVM_Continue"), System.Windows.Forms.MessageBoxButtons.OKCancel, System.Windows.Forms.MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.OK)
{
foreach (var c in tempCaseList)
{
Cases.Add(c);
}
RaisePropertyChanged(() => Cases);
saveCases();
}
关键的是google 关键字 wpf findResource line break
1 使用场景
先从Resource中获取资源字符串,然后再进行format,这里的format是为了进行动态的对字符串进行改变,以传参数的形式。
问题来了,在资源中的
=====================================================================================资源字符
<sys:String x:Key="TaskDetailVM_ScriptNumWarn">There are {0} script files in this folder
(including all sub-folders), are you sure to continue?\n\nClick 'OK' to continue and click
'Cancel' to cancel the process.</sys:String>
=================================================================================应用带代码
if (System.Windows.Forms.MessageBox.Show(string.Format((string)App.Current.FindResource("TaskDetailVM_ScriptNumWarn"), tempCaseList.Count), (string)App.Current.FindResource("TaskDetailVM_Continue"), System.Windows.Forms.MessageBoxButtons.OKCancel, System.Windows.Forms.MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.OK)
{
foreach (var c in tempCaseList)
{
Cases.Add(c);
}
RaisePropertyChanged(() => Cases);
saveCases();
}