我是使用MVVMLight的WPF的新手,并努力掌握工作原理。我在xaml中有一个按钮:
<Button x:Name="button" Content="Button"
HorizontalAlignment="Left"
Margin="29,374,0,0"
VerticalAlignment="Top" Width="75"
Command="{Binding BeginCollectionCommand}"/>
并且让视图模型响应按钮的按下。BeginCollectionCommand = new RelayCommand(BeginCollectionCommandExecute, () => true);
我在[]上找不到我的问题的答案>
视图模型代码的按钮绑定“ BeginCollectionCommand”定义为
public RelayCommand BeginCollectionCommand { get; set; } public MainWindowViewModel() { BeginCollectionCommand = new RelayCommand(BeginCollectionCommandExecute, () => true); //at this point i believe is where i set the button content to "working..." //and disable. } public void BeginCollectionCommandExecute() { /// do my working class code //I think at this point I want to set the code to change button content to //enable, conent to "done" then wait and set to "start" }
有人可以帮忙吗?
我是使用MVVMLight的WPF的新手,并努力掌握工作原理。我在xaml中有一个按钮:
您的问题可以概括为三种问题。