|
|
|
@ -10,6 +10,7 @@ using ReactiveUI; |
|
|
|
using DynamicData; |
|
|
|
using Xunit; |
|
|
|
using Splat; |
|
|
|
using Avalonia.Markup.Xaml; |
|
|
|
|
|
|
|
namespace Avalonia |
|
|
|
{ |
|
|
|
@ -70,12 +71,40 @@ namespace Avalonia |
|
|
|
|
|
|
|
public class ActivatableWindow : ReactiveWindow<ActivatableViewModel> |
|
|
|
{ |
|
|
|
public ActivatableWindow() => this.WhenActivated(disposables => { }); |
|
|
|
public ActivatableWindow() |
|
|
|
{ |
|
|
|
InitializeComponent(); |
|
|
|
Assert.IsType<Border>(Content); |
|
|
|
this.WhenActivated(disposables => { }); |
|
|
|
} |
|
|
|
|
|
|
|
private void InitializeComponent() |
|
|
|
{ |
|
|
|
var loader = new AvaloniaXamlLoader(); |
|
|
|
loader.Load(@"
|
|
|
|
<Window xmlns='https://github.com/avaloniaui'>
|
|
|
|
<Border/> |
|
|
|
</Window>", null, this);
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public class ActivatableUserControl : ReactiveUserControl<ActivatableViewModel> |
|
|
|
{ |
|
|
|
public ActivatableUserControl() => this.WhenActivated(disposables => { }); |
|
|
|
public ActivatableUserControl() |
|
|
|
{ |
|
|
|
InitializeComponent(); |
|
|
|
Assert.IsType<Border>(Content); |
|
|
|
this.WhenActivated(disposables => { }); |
|
|
|
} |
|
|
|
|
|
|
|
private void InitializeComponent() |
|
|
|
{ |
|
|
|
var loader = new AvaloniaXamlLoader(); |
|
|
|
loader.Load(@"
|
|
|
|
<UserControl xmlns='https://github.com/avaloniaui'>
|
|
|
|
<Border/> |
|
|
|
</UserControl>", null, this);
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public AvaloniaActivationForViewFetcherTest() |
|
|
|
@ -183,4 +212,4 @@ namespace Avalonia |
|
|
|
Assert.False(viewModel.IsActivated); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|