CommunityToolkit / CommunityToolkit/Windows

CommunityToolkit.WinUI.Controls.ColorPicker Bug on IsColorSpectrumVisible

Aperta
#701 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug components::controls::colorpicker
Lingua principale
C#
Stelle
1.1k
Fork
166
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Describe the bug

I've implemented the CommunityToolkit.WinUI.Controls.ColorPicker color picker version 8.2. However, I can't managed to save the spectrum state when I close and reopen the application, so I decided to disable it visually with the "False" parameter within the UI. However, when I click on the color picker again, the spectrum remains visible.

### Steps to reproduce

```text
To reproduce this issue create a new WinUI 3 project (Blank App, Packaged)











c#
using System;
using Microsoft.UI.Xaml;

// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.

namespace TestColorPicker
{
///
/// An empty window that can be used on its own or navigated to within a Frame.
///
public sealed partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
var assembly = typeof(CommunityToolkit.WinUI.Controls.ColorPicker).Assembly;
var version = assembly.GetName().Version;
System.Diagnostics.Debug.WriteLine($"ColorPicker version: {version}");
}
}
}
```

### Expected behavior

You will see the button to open the color picker and the erroneous behavior of the toolkit appears, even if the spectrum is set to false it will still be displayed.

### Screenshots

[https://imgur.com/a/REiGxTv#GcjasNg](url)

### Code Platform

- [ ] UWP
- [x] WinAppSDK / WinUI 3
- [ ] Web Assembly (WASM)
- [ ] Android
- [ ] iOS
- [ ] MacOS
- [ ] Linux / GTK

### Windows Build Number

- [ ] Windows 10 1809 (Build 17763)
- [ ] Windows 10 1903 (Build 18362)
- [x] Windows 10 1909 (Build 18363)
- [ ] Windows 10 2004 (Build 19041)
- [ ] Windows 10 20H2 (Build 19042)
- [ ] Windows 10 21H1 (Build 19043)
- [ ] Windows 10 21H2 (Build 19044)
- [ ] Windows 10 22H2 (Build 19045)
- [x] Windows 11 21H2 (Build 22000)
- [ ] Other (specify)

### Other Windows Build number

_No response_

### App minimum and target SDK version

- [x] Windows 10, version 1809 (Build 17763)
- [ ] Windows 10, version 1903 (Build 18362)
- [ ] Windows 10, version 1909 (Build 18363)
- [ ] Windows 10, version 2004 (Build 19041)
- [ ] Windows 10, version 2104 (Build 20348)
- [ ] Windows 11, version 22H2 (Build 22000)
- [ ] Other (specify)

### Other SDK version

Microsoft.WindowsAppSDK 1.7.250606001

### Visual Studio Version

2022

### Visual Studio Build Number

Versión 17.14.7

### Device form factor

Desktop

### Additional context

_No response_

### Help us help you

Yes, I'd like to be assigned to work on this item.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Parti dall’implementazione di CommunityToolkit.WinUI.Controls.ColorPicker e riproduci il comportamento usando lo XAML WinUI 3 fornito, in particolare l’impostazione IsColorSpectrumVisible="False" all’interno del Flyout. Il lavoro è completato quando, riaprendo il selettore del colore, lo spettro dei colori rimane nascosto quando quella proprietà è false.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp
Ambito
desktop, frontend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.