简体   繁体   中英

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 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.

Anyone have an understanding of this?

Currently, the stable version of MahApps.Metro is 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).

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:

  1. Right click in your project -> Manage NuGet packages -> check 'include prerelease' checkbox -> add/update 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.

  3. Source

Compiled versions can be downloaded from releases and preview versions can be downloaded from CI artifacts ".

So you can download the nuget package from CI artifacts and add it manually via Package Manager Console.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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