简体   繁体   English

如何在 MahApps.Metro ColorPicker 中使用 IsAlphaChannelVisible 属性?

[英]How to use IsAlphaChannelVisible property in MahApps.Metro ColorPicker?

I'm using the mah:ColorPicker entity but can't use some properties that are listed in the documentation like "IsAlphaChannelVisible" and "AreHsvChannelsVisible".我正在使用 mah:ColorPicker 实体,但不能使用文档中列出的某些属性,例如“IsAlphaChannelVisible”和“AreHsvChannelsVisible”。

<mah:ColorPicker Height="150"
                 Width="250"
                 Name="Colorpicker"
                 IsAvailableColorPaletteVisible="True"
                 SelectedColorChanged="Colorpicker_SelectedColorChanged">
        
</mah:ColorPicker>

I went to inspect the source code on github and didn't found those properties on the ColorPicker Class, but found them on ColorPickerBase class which ColorPicker derives from.我去检查了 github 上的源代码,并没有在 ColorPicker Class 上找到这些属性,但在 ColorPickerBase class 上找到了它们,ColorPicker 来自这些属性。

Anyone have an understanding of this?有人对此有了解吗?

Currently, the stable version of MahApps.Metro is 2.4.9.目前,MahApps.Metro 的稳定版本是 2.4.9。 These properties are not available if you are using the stable NuGet package (if you check the github repo, you won't find these properties in main branch but in develop branch).如果您使用的是稳定的 NuGet package,则这些属性不可用(如果您检查 github 存储库,您不会在主分支中找到这些属性,但在分支中)。

These properties are in prerelease version 3.0.0-alpha0404, so if you want to use these properties, you have to add the prerelease package by one of the following methods:这些属性在预发布版本 3.0.0-alpha0404 中,因此如果要使用这些属性,您必须通过以下方法之一添加预发布 package:

  1. Right click in your project -> Manage NuGet packages -> check 'include prerelease' checkbox -> add/update MahApps.Metro右键单击您的项目 -> 管理 NuGet 包 -> 选中“包含预发布”复选框 -> 添加/更新 MahApps.Metro

  2. Clone the repo, add it to your solution (optional: add it as git submodule) and reference it in your application to use all these properties and other under-develop features.克隆 repo,将其添加到您的解决方案中(可选:将其添加为 git 子模块)并在您的应用程序中引用它以使用所有这些属性和其他开发中的功能。

  3. Source 资源

Compiled versions can be downloaded from releases and preview versions can be downloaded from CI artifacts ".编译版本可以从发布下载,预览版本可以从CI 工件下载。

So you can download the nuget package from CI artifacts and add it manually via Package Manager Console.因此,您可以从 CI 工件下载 nuget package 并通过 Package 管理器控制台手动添加。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM