private void OnIvalidateLayer(InvalidateLayerEventArgs eventArgs) { if (DrawLayerBuffer != null) { DrawLayerBuffer(this, eventArgs); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Invalidate(object sender, InvalidateLayerEventArgs e) { Dispatcher.Invoke( () => { this.InvalidateVisual(); }); }
public LayerContainerViewModel(IServiceProvider?serviceProvider) : base(serviceProvider) { _invalidateLayerEventArgs = new InvalidateLayerEventArgs(this); AddLayer = new Command <FrameContainerViewModel?>(x => GetProject()?.OnAddLayer(x)); RemoveLayer = new Command <LayerContainerViewModel?>(x => GetProject()?.OnRemoveLayer(x)); ProjectContainerViewModel?GetProject() => ServiceProvider.GetService <ProjectEditorViewModel>()?.Project; }
public void Invalidate_Sets_EventArgs() { var target = _factory.CreateLayerContainer("Layer1"); InvalidateLayerEventArgs args = null; target.InvalidateLayerHandler += (sender, e) => { args = e; }; target.InvalidateLayer(); Assert.NotNull(args); Assert.True(args is InvalidateLayerEventArgs); }
public void Invalidate_Sets_EventArgs() { var target = XLayer.Create("Layer1"); InvalidateLayerEventArgs args = null; target.InvalidateLayer += (sender, e) => { args = e; }; target.Invalidate(); Assert.NotNull(args); Assert.True(args is InvalidateLayerEventArgs); }
private void Invalidate(object sender, InvalidateLayerEventArgs e) => Dispatcher.Invoke(() => InvalidateVisual());
private void ObserveInvalidateLayer(object sender, InvalidateLayerEventArgs e) { _editor?.Invalidate?.Invoke(); }
private void ObserveInvalidateLayer(object sender, InvalidateLayerEventArgs e) { _editor?.CanvasPlatform?.Invalidate?.Invoke(); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void InvalidateLayerObserver(object sender, InvalidateLayerEventArgs e) { if (_editor.Invalidate != null) { _editor.Invalidate(); } }