Deklarieren Sie ein Nullable int (int?) Mit XAML
Ich versuche, ein Kombinationsfeld an eine Eigenschaft in meinem ViewModel zu binden. Der Zieltyp istshort?
und ich hätte gernenull
eine Option sein. Grundsätzlich möchte ich, dass der Wert des ersten Elements im Kombinationsfeld @ is{x:Null}
.
<ComboBox Grid.Row="9" Grid.Column="1" SelectedValue="{Binding Priority}">
<clr:Int16></clr:Int16>
<clr:Int16>1</clr:Int16>
<clr:Int16>2</clr:Int16>
<clr:Int16>3</clr:Int16>
<clr:Int16>4</clr:Int16>
<clr:Int16>5</clr:Int16>
<clr:Int16>6</clr:Int16>
<clr:Int16>7</clr:Int16>
<clr:Int16>8</clr:Int16>
<clr:Int16>9</clr:Int16>
<clr:Int16>10</clr:Int16>
</ComboBox>
Irgendwelche Vorschläge