In my XAML and when I build I get the following exception:
Error 3 Value 'colorpick.png' cannot be assigned to property 'Source'. Value does not fall within the expected range.
Here is the XAML:
The "Source="colorpick.png" is underlined.
One of the few things I could find regarding this was the below blog post: http://nickeandersson.blogs.com/blog/2008/06/wpf-image-and-v.html
colorpick.png is set to Build action = resource.
Any hints would be greatly appreciated!
Here's all the xaml:
<UserControl x:Class="MyApp.Controls.ColorSettings"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:MyApp">
<Grid>
<StackPanel>
<ScrollViewer>
<ListView Name="lvColors" MinHeight="100" MinWidth="300" SelectionChanged="lvColors_SelectionChanged">
<ListView.ItemContainerStyleSelector>
<local:ColorSettingsStyleSelector/>
</ListView.ItemContainerStyleSelector>
<ListView.View>
<GridView>
<GridViewColumn Header="Level" DisplayMemberBinding="{Binding Level}"></GridViewColumn>
</GridView>
</ListView.View>
</ListView>
</ScrollViewer>
<StackPanel Orientation="Horizontal" Name="spColorPicker" Visibility="Hidden">
<Image Source="colorpick.png" Width="200" Height="200" MouseLeftButtonDown="Image_MouseLeftButtonDown" MouseMove="wheel_MouseMove" Name="wheel"/>
<Rectangle Width="200" Height="200" Name="rectDisplay"/>
</StackPanel>
</StackPanel>
</Grid>
</UserControl>