static-resource

Reuse of StaticResource in Silverlight 2.0

I am currently testing with Silverlight 2.0 Beta 2, and my goal is to define a resource element once and then reuse it many times in my rendering. This simple example defines a rectangle (myRect) as a resource and then I attempt to reuse it twice -- which fails with the error: Attribute {StaticResource myRect} value is out of range. [L...

XAML - StaticResources in Collection Initializers

I want to add a single model object that has been instantiated once in XAML, and add it to two different collections (in xaml). The following code renders fine in Blend's Design Time, but I get the following errors at run time: For "Post1" Object of type 'WpfBlog.Models.Tag' cannot be converted to type 'System.Collections.ObjectModel.O...

Binding a datacontext string property to a StaticResource key

I have an List values with a ResourceKey and a Caption, these values are both strings. The Resource is the name of an actual resource defined in a resource dictionary. Each of these ResourceKey Icons are Canvas's. <Data ResourceKey="IconCalendar" Caption="Calendar"/> <Data ResourceKey="IconEmail" Caption="Email"/> I then have a list v...

How to expose properties of a WPF DataTemplate?

I have a data template that I use in many pages, the data template contains a few buttons, I want to hide some of these buttons by triggers (I mean setting the IsEnabled Property of these buttons in the page where I use this DataTemplate). In other words, I would even like to set in style triggers/setters a property 'ButtonXIsEnabled', ...

Error when using StaticResource

Hi, I'm getting this error Attribute {StaticResource StoryboardIntroAnimation} value is out of range when I try and use a staic resource as the Storyboard property of a BeginStoryboard object. The markup looks a little like this: <UserControl ...> <UserControl.Resources> <Storyboard x:Key="StoryboardIntroAnimation">...

Chrome warning about static resource (css/gif/png/js)

When ever the web page is loaded i am getting warning in the debugger as Resource interpreted as stylesheet but transferred with MIME type text/plain. I am getting the above warning when the browser requests for js, css, gif and png files. Any idea how to resolve this warning ...

java:how to hide static resources like html ,images from user on jboss platfrom?

I have developed a java 1.4 web application.Application is deployed on jboss(tomcat). suppose my folder structure is mainfolder(contains subfolders and jsp pages) images(contains all of images files) headerfiles(header files) javascript(javascript files) url for website login page is mywebsite.com/...

Question about ASP.NET MVC and static data (ie. images, scripts, etc)

Hi folks, If i have a request for a resource in my ASP.NET MVC1 (or 2) web app for a static resource, say ... an image or a javascript file or a css file ... does the .NET framework try and see if the request matches the route list ... and eventually can't find a controller for it? eg. Resource: /Content/Images/Foo.png Does this requ...

Can I use UIPerformance grails plugin and host my static resources in another domain?

The UIPerfomance plugin is an easy way to speed up your web pages by applying some of the best practices rules from Yahoo performance team (like minifying, setting a far-future expires header, versioned images...) Unfortunately I didn't find a way to store the static resources in a location outside of the webapplication which has his o...

Where should common static resources (images, js, css, etc) go in DotNetNuke?

Is there a recommended location to store static resources (images, css, js, etc) in a DotNetNuke 5.x installation? There are /images and /js folders as well as a /Resources folder that contains resources. There appears to be some overlap as MicrosoftAjax.js is in multiple locations (but might be different versions?). I also could put r...

WPF - Static Binding - Error shows up but everything works fine

Hello Ok, I have a specific custom behavior for my MenuItems. So I bind the windows from my static class FormsResource and it works perfectly. But, very often, I get an exception "Exception has been thrown by the target of an invocation" in the 3 lines where I have "{Binding Source={x:Static local:foo}}" I can't see the inner exception, ...

Tomcat serving static resources on Spring MVC app

Hello all, I'm building a Spring MVC application, and the frontController servlet is mapped in "/" intercepting all requests, I'd to be able to serve the static contents (.js,.css,.png...) from tomcat and not by Spring. My app structure is -webapp/ styles/ images/ WEB-INF/ views/ By default, because the frontContr...

Android App Static Storage

I am creating an Android application which will have some embedded music inside of it ( ~ 80 MB ). I was planning on putting it in the res/raw folder. Since android stores that all in it's internal memory, is this way too large? What are my options? I have come up with the following: Copy resources out of internal storage and onto the...