Код: Выделить всё
Код: Выделить всё
static CentralViewBaseCommands _goToEti;
public static CentralViewBaseCommands GoToEti => _goToEti ?? new
CentralViewBaseCommands(GoToExternalWindow);
private static void GoToExternalWindow(object obj)
{
if (obj is GridContextMenuInfo)
{
object record = (obj as GridRecordContextMenuInfo)?.Record;
CentralDataGridModel mwSfDgModel = (CentralDataGridModel)record;
if (mwSfDgModel != null)
{
//TODO
}
}
}
Код: Выделить всё
public class CentralViewBaseCommands : ICommand
{
private Action _execute;
private Predicate _canExecute;
public CentralViewBaseCommands(Action execute) : this(execute, null)
{
_execute = execute;
}
public CentralViewBaseCommands(Action execute,Predicate canExecute)
{
if (execute == null)
throw new ArgumentNullException(nameof(execute));
_execute = execute;
_canExecute = canExecute;
}
public bool CanExecute(object parameter)
{
return _canExecute?.Invoke(parameter) ?? true;
}
public void Execute(object parameter)
{
_execute(parameter);
}
public event EventHandler CanExecuteChanged
{
add { CommandManager.RequerySuggested += value; }
remove { CommandManager.RequerySuggested -= value; }
}
}
Код: Выделить всё
Height="26"
Margin="0,0,0,0"
Fill="#FFFF0000"
RenderTransformOrigin="0.5,0.5"
Stretch="Uniform">
Может кто-нибудь объяснить мне, почему?
Подробнее здесь: https://stackoverflow.com/questions/383 ... -in-window
Мобильная версия