开发者

Deploying a silverlight site

开发者 https://www.devze.com 2023-01-30 13:16 出处:网络
I have just tried to deploy my silverlight 4 site and ran across a problem. I keep all of my styles etc. in a resource file and reference them like this:

I have just tried to deploy my silverlight 4 site and ran across a problem. I keep all of my styles etc. in a resource file and reference them like this:

 <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Resources/Styles.xaml" />
                <ResourceDictionary Source="Resources/Templates.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>

After deploying my website, my listbox (which has an overriden item template which i store in my templates.xaml) looked empty. However i know 开发者_JS百科that i should see three items in my listbox, and i am able select three lines in the listbox they are just all empty. The problem seems to be that nothing gets drawn in the listbox items because i can not get to the resource file to get my style. I have tried making the resource files embeded resources but no help. Any ideas?


Ensure that the Templates.xaml file is part of your xap file.

To do that make sure the "Build Action" (in the properties of the Templates.xaml file) is set to "Resource"

0

精彩评论

暂无评论...
验证码 换一张
取 消