I have a Windows Form form that I changed the size from the default. The form is localized so I have resx files associated with it. When I run the en-us version of the form, the form size shows just fine with the new size. However, when I run the form using a different language, the size of the form reverts back to the original size. How can I fix this?
Are the form's dimensions in the resx file as well? Depending on how you generated the resx files, sizing information could also be locale-specific.
Related
I have a WPF application that updates a lot of text. I noticed using SysInternals procmon.exe that this constantly loads the font file e.g.
Why is this? It seems rather inefficient.
I have made my own keypad.I know about the copy paste feature of WP7. I want to paste the copied text from textbox to some other application without using SIP.
Issues:
Copy the text by using default copy paste feature of WP7.
Get the copied text means from where i can get the copied text.
Now i don't want to use SIP to paste the text because i m hiding the SIP and using my own custom keypad.
I want to paste the copied text to some other application. So how to do this. Is it can be done with clipboard or through some other way.
Need some links to do so.
In the current version of the framework there is no API for working with the clipboard, though the Silverlight 4 Clipboard API will be coming in the next version.
However, if Matt Lacey has produced a solution that works by saving text information in JPEG images. You would be able to access this virtual clipboard from any of your own applications. http://blog.mrlacey.co.uk/2011/03/wp7clipboard-clipboard-api-for-wp7dev.html
While not possible now, one of the slides from Mix included a reference to a "Clipboard API" as part of the extras we'll get in the move to Silverlight 4 which is coming with Mango.
Hopefully that will complete the picture with regard to copy & paste / clipboard functionality.
I am embarking on development of a Silverlight based website. I am the lone developer and am doing it on my own (ie, not for any company).
Now I want to load a lot of textual content on the website along with animations and rich user interfaces that can be created using Silverlight. The text content may change from time to time and when that happens, I don't want to do a lot of rework. So I m thinking to load the text from a Word/text file into controls and whenever new content arrives/existing content is modified, I just have to append it to the Word/text file.
This way the application itself remains untouched, only the file contents keep changing. Silverlight doesn't support FlowDocument. RichTextBox doesnt have a Load or LoadFile property. So how do I go about this? Should I make use of Frame, Downloader and similar other controls as well? What do you suggest? What would be the best approach to this?
The RichTextBox does have a Xaml property so you could download Xaml files containing the restricted set of textual elements that RichTextBox supports. You could also create a Silverlight editor around which you could create and upload this Xaml text content.
However have you considered whether Silverlight is the right platform to deliver primarily textual content? HTML is pretty good at that and with frameworks such as JQuery you can create quite interactive experiences that work well across browsers.
1- Resource files suppose to be added on adding some resource in application like image or audio or video etc. But if I just change size of form a .resx file incleded under that particular form. Changing size of form does not add any resource so why this .resx file?
2- I dropped a button on form and a resource file is included; again this button is not some kind of resource, it is object having its creation information in designer file?
3- A resource file added on dropping button on form but if I delete this resource file and run application it compile and run with NO error and button is still there. If this button has any relation with resource file then there must by some kind of compile or runtime error AND if .resx file has nothing to do with button then why it was added?
I am using VS 2008.
EDIT:
I have added a picture box and added an image in this now this is resource. i deleted the From1.resx file and I was expecting an error but NO ERROR AGAIN. In designer file picturebox referring image from properties folder which has Resources.resx file. Double click on this and image is there. SO WHAT WAS THE PURPOSE OF From1.resx FILE?
Thanks in advance for the help
AFAIK there isn't a strict requirement, but it is probably one of those things where it is simpler (read: less brittle, more predictable, cheaper to implement, whatever) to generate the resx if there is even the suggestion that one could possibly be required (even if it turns out to be trivial) than it is to fully track the nuances of when one is absolutely demanded.
I agree; in the scenario you describe no resx is required, but it isn't going to upset me.
(it still happens in VS2010, btw - but then I suspect you shouldn't hope for much change to winforms in VS2010)
It seems that the resx file for that form is most likely tied to localization. I.e. For localizing Text content such as the text on the button. When you add a resource such as an image file by default it is placed in the applications resx file that is located in the My Project folder. So if you have the form or projects language set I think that it will always create a local resx file for that form when you add a control that could be localized.
I'm putting together a WPF application that will allow users to view PowerPoint files through the WebBrowser control, once the files have been saved as either .MHT or .HTML. The problem is that the files contain ActiveX controls, and the WebBrowser control by default will display a warning every time I load these files, saying "To help protect your security, your web browser has restricted this file from showing active content that could access your computer."
I've seen a few different places online talk about putting the mark of the web into each page, but that really doesn't work for me in this case, since the content authors have control over the files, not the developers, and I'd rather not tell them that they have to open every single file in Notepad and add the mark of the web to each one.
Is there any way to just change the WebBrowser control's settings to not display that warning message? IE has a similar setting, but it doesn't carry over into this control.
We eventually found a decent solution to this, although I still wish there were some sort of settings on the control itself. To load the documents, we just set browser.Source to be the following:
file://127.0.0.1/c$/path/to/the/file (where the path is an absolute path without C:\, for example, c$/Users/jschuster/mydocument.html)
For whatever reason, the control will display files referenced by a URL in that format without a warning.
Hope this might help someone even that the question is a bit old ...
As per the link to "The Mark Of The Web" , adding comment like
<!-- saved from url=(0016)http://localhost -->
just under the HTML tag worked.
My index.html is in HTML folder, added as "content" set to "Always copy" in WPF project using WebBrowser control.
The address to the file during execution look like this:
file:///E:/SRC_2013/WebBrowserTestApp/WebBrowserTestApp/bin/Debug/HTML/index.html
Why not insert the MOTW dynamically at the beginning of the file when you load it ?
By the way, thanks for your question : I didn't know about the "mark of the web" and it solved a problem I had :)
file://127.0.0.1/c$/path/to/the/file (where the path is an absolute path without C:\, for example, c$/Users/jschuster/mydocument.html)
This worked for me as well on Win7.