Мой файл xaml:< /p>
Код: Выделить всё
WidthRequest="270"
HorizontalTextAlignment="Center"
Margin="0,10,0,0"
FontSize="20"
TextColor="OrangeRed"
x:Name="piProcess"
ItemsSource="{Binding ScanProcesses}">
Код: Выделить всё
...
[RelayCommand]
async Task PiProcessItemChanged(object data) {
ProcessType = Convert.ToInt32(data);
if(ProcessType.Equals(0)) {
LblBarcodeText = labelText[1];
} else {
LblBarcodeText = labelText[2];
}
}
Я все еще новичок в области MVVM и поэтому не знаю точно, как это реализовать.
Подробнее здесь: https://stackoverflow.com/questions/765 ... el-in-maui
Мобильная версия