0
我想用我的自定义设计视图来显示我的资源字典项目,我想使ListView
显示带有值的键。并可以通过设计视图进行编辑。 -i希望能够在visual studio desiner中编辑我的字典。如何在设计视图中显示资源字典项目?
我想用我的自定义设计视图来显示我的资源字典项目,我想使ListView
显示带有值的键。并可以通过设计视图进行编辑。 -i希望能够在visual studio desiner中编辑我的字典。如何在设计视图中显示资源字典项目?
我认为你可以使用键和值以下的ResourceDictionary实例的属性。
string exeFilePath = System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase;
string exeDirPath = System.IO.Path.GetDirectoryName(exeFilePath);
string targetFile = "subFolder\\ResourceDictionary.xaml";
string dictionaryPath = new Uri(System.IO.Path.Combine(exeDirPath, targetFile)).LocalPath;
string xamlString = File.ReadAllText(dictionaryPath);
ResourceDictionary resourceDictionary = (ResourceDictionary)XamlReader.Parse(xamlString);
感谢您的回复,但我的意思是在设计模式,我想说明的键和值在ListView,像用户控件可以对其进行编辑,在Visual Studio设计,你可以在代码编辑。所以我想在设计时为我的资源字典制作可视化视图。 – 2014-10-06 09:49:57