public async Task Mode_SetsThemeColors(ColorZoneMode mode, string backgroundBrush, string foregroundBrush) { await using var recorder = new TestRecorder(App); IVisualElement <ColorZone> colorZone = await LoadXaml <ColorZone>(@$ " <materialDesign:ColorZone Mode=" "{mode}" "/> "); Color background = await GetThemeColor(backgroundBrush); Color foreground = await GetThemeColor(foregroundBrush); Assert.Equal(background, await colorZone.GetBackgroundColor()); Assert.Equal(foreground, await colorZone.GetForegroundColor()); recorder.Success(); }
public static void SetHeaderColorMode(DependencyObject element, ColorZoneMode value) => element.SetValue(HeaderColorModeProperty, value);
public static void SetMode(DependencyObject element, ColorZoneMode value) { element.SetValue(ModeProperty, value); }
public static void SetMode(Control control, ColorZoneMode value) { control.SetValue(ModeProperty, value); }