user1606362
user1606362

Reputation: 27

Resource not found in wpf project

so:

i write

StreamResourceInfo sri = Application.GetResourceStream(new Uri("ProjectName;component/45.ani", UriKind.Relative));

but file not found :) why? project is bild

Upvotes: 0

Views: 2068

Answers (1)

franssu
franssu

Reputation: 2430

Can you check the build action on the file (on the properties panel) ? Is it set to "Resource" ?

Did you miss "Resources" ? (Maybe with UriKind.Absolute)

new Uri("pack://application:,,,/ProjectName;component/Resources/45.ani", UriKind.Absolute)

Upvotes: 2

Related Questions