Browse Source

Implement TryGetFeature on secondary previewer windows (#17409)

release/11.2.1
Max Katz 1 year ago
parent
commit
e5cdf3c4b4
  1. 15
      src/Avalonia.DesignerSupport/Remote/Stubs.cs

15
src/Avalonia.DesignerSupport/Remote/Stubs.cs

@ -197,7 +197,20 @@ namespace Avalonia.DesignerSupport.Remote
public void SetFrameThemeVariant(PlatformThemeVariant themeVariant) { }
public AcrylicPlatformCompensationLevels AcrylicCompensationLevels { get; } = new AcrylicPlatformCompensationLevels(1, 1, 1);
public object TryGetFeature(Type featureType) => null;
public object TryGetFeature(Type featureType)
{
if (featureType == typeof(IStorageProvider))
{
return new NoopStorageProvider();
}
if (featureType == typeof(IScreenImpl))
{
return new ScreenStub();
}
return null;
}
public void TakeFocus() { }
}

Loading…
Cancel
Save