Exemplo n.º 1
0
    public LabelViewModel(LabelSelectionViewModel owner, string label)
    {
        Value = label;

        this.WhenAnyValue(x => x.IsPointerOver)
        .Skip(1)
        .Where(value => value == true)
        .Subscribe(_ =>
        {
            owner.OnPointerOver(this);
            owner.OnFade(this);
        });

        ClickedCommand = ReactiveCommand.Create(() => owner.SwapLabel(this));

        _toolTip = label;
    }