I need to figure out what mime type is the image my program downloaded from the web. I actually cannot find any solution that will work in windows store app.
thanks
It looks like you can use the ContentType property of StorageFile. See http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.storagefile.contenttype.aspx for more info.
Related
We are converting large PNG images to JPEG using ImageResizer (https://imageresizing.net/). It's works great with ?format=jpg and they are delivered with the correct content type and all.
When downloading these images they are named image.jpg in all browsers except Safari. Here it asks the user if they want to go with .jpg or with .png. It also saves the images as image.png.jpg which is confusing for some users.
I read something about Content-Disposition header, but I think that's for direct download, not for right click and choosing Save as. I also don't know if it would be possible to add it without creating some kind of middle layer and probably lose performance.
Ideas? Thanks <3
I don't think there is a solution to this, as it is in the browser's control.
I am working on windows phone application in which i need to change ApplicationBarButton icon dinamically, for example to show current date like in default Windows Phone Calendar app. Regarding to this article, we can use only png images previously added to solution and reference to them with relative Uri.
It is not a problem for me to generate correct png image (this way and using ToolStack C# PNG Writer Library) and save it to isolated storage, but when i'm initializing AppBarButton with absolute Uri to this image and trying to add it to ApplicationBar, my app throws ArgumentException.
Am i doing something wrong or i just have to draw 366 icons and add them to my project? :)
Thanks in advance!
I have an Image object created in XAML in my Windows Phone 8 project. I'd like to change the Source property in C#. How would I go about doing that? I've followed the code at https://stackoverflow.com/questions/5770527/imagebutton-change-source-property but had no success. BitmapImage does not seem to be valid for Windows Phone 8. Does anyone know the correct way to change image sources in C# for WP8? Thank you.
Well the solution ended up being something simple. I just needed to import the System.Windows.Media.Imaging namespace. I added
using System.Windows.Media.Imaging;
to the top of my file, which fixed the problem.
I want to implement a great text reading experience in my app, similar to "Pocket", that would look a lot like this:
Basically, I'd like to have control over the text font size and font family while loading local HTML files in a UIWebView.
Could anyone point me to the right direction? Are there any frameworks or libraries out there that provide the base for such experience?
Thanks in advance.
A simple answer is: don't. Instead load it into a UITextView. You can easily change the font size with it, as on HTML you would have to modify the file instead of calling 1 line of code.
of all three choices (AIR+AJAX, +Flash, and +FLEX) I went on the AJAX route. But it seems that it can't show Flash embedded in HTML (using the traditional OBJECT tag).
Is it by design? or my fault?
i think it's your fault. there are a number of air "web browsers" and they all can display flash just fine.
google for some. i found one here and it gives the source code as well
I've found the culprit: my window is transparent.
According to adobe, SWF and PDF won't be displayed if transparency is used.
I don't know much about Ajax but i do know the preferred method to embed flash into html is to use swfobject. have you tried that yet?