none
wpf 颜色选择窗口如何调出来 RRS feed

答案

  • Hi,

    WPF类库中没有专门的颜色选择器, 你可以调用winform的ColorDialog.

    1.添加System.Windows.Forms.dll 引用到项目中,

    2.引用 using System.Windows.Forms;

    3.使用ColorDialog

    ColorDialog colorDialog = new ColorDialog();
    colorDialog.AllowFullOpen = true;
    colorDialog.ShowDialog();
    

    Sincerely,

    Bob


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • 已标记为答案 jinli.zh 2017年11月9日 14:27
    2017年11月9日 3:18
    版主