我是XAML和WPF的新手,我认为这是我不能得到的小事.无论如何这是XAML代码的开头:
<Window x:Class="SchoolApp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:vm="clr-namespace:School.ViewModel"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<x:Array x:Key="ColorListString" Type="local:ComboBoxItemString"/>
<local:ComboBoxItemString ValueString = "Red" />
<local:ComboBoxItemString ValueString = "Green"/>
<local:ComboBoxItemString ValueString = "Blue"/>
</x:array>
</Window.Resources>
<Grid Background="#FF99993A"....
Run Code Online (Sandbox Code Playgroud)
而错误是:
the closing tag "Window.Resourses" is mismatched
Run Code Online (Sandbox Code Playgroud)
感谢任何可以帮助的人:)
改变线
<x:Array x:Key="ColorListString" Type="local:ComboBoxItemString"/>
Run Code Online (Sandbox Code Playgroud)
至
<x:Array x:Key="ColorListString" Type="local:ComboBoxItemString">
Run Code Online (Sandbox Code Playgroud)
否则数组的内容及其结束标记将不匹配...
归档时间: |
|
查看次数: |
277 次 |
最近记录: |