Hello.
I'm use next command callback
private void OnNextCanExecuted(object sender, CanExecuteRoutedEventArgs e)
{
var bt = e.Parameter as UIElement;
if (bt != null)
{
bt.Visibility = (Surfaces?.Count ?? 0) > 1 ? Visibility.Visible : Visibility.Collapsed;
}
e.CanExecute = (Surfaces?.Count ?? 1) - 1 > CurrentSurface;
}
<ribbon:Button Command="d3e:SurfaceCommands.Next" CommandParameter="{Binding RelativeSource={RelativeSource Self}}"/>
When visibility collapsed - OnNextCanExecuted never call
For simple WPF Button all work good.
How can I resolve it.