Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Can not locate resource

$
0
0

My dll has 2 usercontrols. Control " A" has image as background and load it properly.

<Grid.Background>                <ImageBrush ImageSource="/AutoSampleTray;component/Resources/circle_bt_tray.jpg"/>                or                <!--<ImageBrush ImageSource="pack://application:,,,/Resources/circle_bt_tray.jpg"/>-->               or                <!--<ImageBrush ImageSource="/Resources/circle_bt_tray.jpg"/>-->

But when control B calling control A I am got error "can not locate resource". 

<Grid Grid.Row="0" VerticalAlignment="Top" x:Name="widget_GridOfTrays" Height="143"><Controls:CircleTray x:Name="tray_CircleTray" /><Controls:Tray_R60 x:Name="tray_R60" />

Both controls located in the same location application/Controls/A

image located at application/Resources/ *.jpg

On both controls Build action"Page".

I would try resource merge dictionary on control B ,

but control A not a resource so it doesn't take it.

VS2013.

                        

 

Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>