How To Display Images Correctly with CrispImage #488
-
I'm using CrispImage to display icons in a treee. The icons are being rendered with the disabled version of the image. How do I get the normal version to display? <StackPanel Orientation="Horizontal"
theming:ImageThemingUtilities.ImageBackgroundColor="{Binding Background, RelativeSource={RelativeSource Self}, Converter={StaticResource BrushToColorConverter}}">
<imaging:CrispImage Moniker="{Binding Icon}" Width="16" Height="16"/>
<TextBlock Text="{Binding Label}" Margin="8,0,8,0" />
</StackPanel> // Icon property
public ImageMoniker Icon => ChildType switch
{
ChildTypes.Project => KnownMonikers.CSProjectNode,
ChildTypes.Readme => KnownMonikers.MarkdownFile,
ChildTypes.Edit => KnownMonikers.BlankFile,
ChildTypes.Rancher => KnownMonikers.Container,
ChildTypes.Url when Url.ToLower().Contains("splunk") => KnownMonikers.Log,
ChildTypes.Url => KnownMonikers.WebURL,
_ => KnownMonikers.Blank,
}; |
Beta Was this translation helpful? Give feedback.
Answered by
sharpninja
Jan 25, 2024
Replies: 1 comment
-
I post this and it starts working correctly. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
sharpninja
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I post this and it starts working correctly.