<Button x:Name="bOpenConnection" Content="Start Production"
Grid.Row="0" Grid.Column="0"
Height="30" Width="120" Margin="10"
HorizontalAlignment="Left" VerticalAlignment="Top"
Command="{Binding Path=StartProductionCommand}"/>
StartProductionCommand = new RelayCommand(OpenConnection, CanStartProduction);
private bool CanStartProduction()
{
return LogContent != null && !_simulationObject.Connected;
}
CanStartProduction
만 나는 다시 크기 UI 확인하고 즉시 업데이트되지 않습니다. 값을 변경할 때마다 업데이트되지 않는 이유는 무엇입니까?
예를 들어 주시거나이 링크를 사용하는 방법에 대한 링크를 게시 할 수 있습니까? 나는 이것을 어디에서 부르는가? – batmaci
@batmaci, 커맨드의'CanExecute'를 재평가하고 싶을 때'CommandManager.InvalidateRequerySuggested'를 호출하면됩니다 –