Unterstützt Silverlight XAML den Byte-Datentyp?
Hier ist mein Datentyp:
using System;
namespace UI
{
public class AddressType
{
public byte ID { get; set; }
public string Name { get; set; }
}
}
Hier ist meine Sammlung:
using System.Collections.ObjectModel;
namespace UI
{
public class AddressTypes : ObservableCollection<AddressType>
{
}
}
Here is my XAML from my UserControl.Resources section of my page:
<local: AddressTypes x: Name = "AddressTypesList">
<local:AddressType ID="0" Name="Select"/>
<local:AddressType ID="1" Name="Office"/>
<local:AddressType ID="2" Name="Shipping"/>
<local:AddressType ID="3" Name="Warehouse"/>
<local:AddressType ID="4" Name="Home"/>
<local:AddressType ID="5" Name="Foreign"/>
</local:AddressTypes>
Wenn ich versuche, der ID-Eigenschaft einen Wert in XAML zuzuweisen, wird der Fehler AG_E_PARSER_BAD_PROPERTY_VALUE [Zeile: 10 Position: 35] angezeigt. Wenn ich den Datentyp der ID-Eigenschaft in int ändere, ist alles in Ordnung. Unterstützt Silverlight den Byte-Datentyp nicht?