private async void UnsetLuminosityButton_Clicked(object sender, RoutedEventArgs e) { bool result = false; using (var logger = new ResultsLogger("ClearLuminosityBlend", TestResult)) { LogAcrylicRecipeVersion(logger); // Manually set TintLuminosityOpacity myAcrylicBrush.TintLuminosityOpacity = 1.0; await Task.Delay(2000); ShowRtb1_Text.Text = "ClearLuminosityBlend: Luminosity = 1.0"; SampledColors customLuminsotyColors = await SamplePointColors(ShowRtb1); // Restore TintLuminosityOpacity to default myAcrylicBrush.ClearValue(AcrylicBrush.TintLuminosityOpacityProperty); await Task.Delay(2000); ShowRtb2_Text.Text = "ClearLuminosityBlend: Luminosity = auto"; SampledColors defaultLuminosityColors = await SamplePointColors(ShowRtb2); if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.NineteenH1)) { // Color change expected on 19H1 result = !defaultLuminosityColors.Equals(customLuminsotyColors); } else { // No color change expected on RS5 and lower result = defaultLuminosityColors.Equals(customLuminsotyColors); } logger.Verify(result, "Sampled acrylic pixels did not change as expected"); } }
private async void SetLuminosityButton_Clicked(object sender, RoutedEventArgs e) { bool result = false; using (var logger = new ResultsLogger("SetLuminosityBlend", TestResult)) { LogAcrylicRecipeVersion(logger); // Capture state when TintLuminosityOpacity is at default value of null // On 19H1+, this means auto configure the Luminosity for the given Tint // On RS5-, it has no effect (we use the legacy acrylic recipe) ShowRtb1_Text.Text = "SetLuminosityBlend: Luminosity = auto"; SampledColors initialColors = await SamplePointColors(ShowRtb1); // Manually set TintLuminosityOpacity myAcrylicBrush.TintLuminosityOpacity = 1.0; await Task.Delay(2000); ShowRtb2_Text.Text = "SetLuminosityBlend: Luminosity = 1.0"; SampledColors customLuminosityColors = await SamplePointColors(ShowRtb2); if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.NineteenH1)) { // Color change expected on 19H1 result = !initialColors.Equals(customLuminosityColors); } else { // No color change expected on RS5 and lower result = initialColors.Equals(customLuminosityColors); } logger.Verify(result, "Sampled acrylic pixels did not change as expected"); } }