I'm new to Windows Forms.
I'm not fully understanding why can't I see methods definitions? Am I only allowed to look at declarations?
For example, there is
public class ListBox : ListControl
I want to see how its method is working(source code, not Microsoft comments):
public override string ToString();
I only see this definition and when I'm pressing "Go to definition", it transfers me to this declaration.
Can someone please explain is System.Windows.Forms code is "hidden" ? Can someone describe what's the idea?
.net is closed source so you cant see exact codes, not only winforms you cant see any class definition of framework. If you want you can use reflector.
Yes, there is the official source code released by Microsoft since December 2018 and can be seen on Github. There is an alternative (buggy) implementation from Mono.
Related
can anyone tell me why i am getting this error?
because of that I'm getting this error too
Trying to integrate opencv with artoolkit
Ruben, we've talked about this on Tweeter. This is a compiling error that is telling you that it doesn't know what colorHSV is.
Looking at your code and the error message, I can tell that colorHSV is a class that should be defined in your code or in one of the 3rd party libraries you are using.
I've done some research and I found a code very similar to yours. Apparently, colorHSV is a custom data type that the developer uses, but the page doesn't provide the entire source code of the application, just a few snippets here and there to give directions. In other words, there's a lot of code missing in that post.
However, they do mention using a technology for Augmented Reality named Occlusion. A little bit more of research showed me ait-occlusion, which implements a colorHSV. This seems to be the same type you are using in your code.
If you still haven't figured it out, you need to:
download/compile/install Occlusion on your system,
add the proper #include for ColorHSV.h,
and finally adjust your project properties to link your application with this library.
If you have any doubts on any of these procedures, Google it.
I am learning about how to localize a project and using a book as a tutorial. I've added the UICulture to the .csproj and assembly files:
[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
But now the book says to update the elements with the UID and I don't know where to do it.
I have to invoke the msbuild (not sure form where) and need to use
msbuild/t:updateuid ProjectName.csproj.
How do I do this?
If I may suggest an alternative approach. I never liked the "default" Microsoft approach to localization in WPF, so way back in 2008 I started looking for alternatives. I eventually settled on a solution described in an article named "Simple WPF Localization" on CodeProject. It's a XAML markup extension and it also allows you to change languages on the fly, etc. Very simple to use.
The author now has a more capable, "advanced" version: Advanced WPF Localization that allows you to localize images, brushes, margins, etc. (it's all at the top of the article).
There are a few other such "libraries" available (some are on CodeProject as well), but I've been using this one for 3.5 years with no issues whatsoever. Might be worth looking into if the approach fits what you're doing.
I am tasked with the localization of a Windows Phone 7 application. The first step is to replace the actual visible text with an ID and put the ID and the text in a resource file.
This is a very tedious work and I was wondering if there are tools for this to automate?
I am thinking along the lines of the gettext package and .po files used in the linux world.
Here is a codeplex project that may help you some. http://xlocalization.codeplex.com/. To use this method, each control that is to be localized must have the name property assigned.
I tried it with my existing project, and got results that were mixed, but in the long run, I decided to do it by hand. I don't remember specifically what the problems were that I had, but if you want to try it on a copy of your project, it won't take much time. If it works for you (and if your controls to be localized all have names), it could save you time.
Also, I don't know how familiar you are with localizing, but I wrote a blog on the subject that takes you from start to finish. It's at http://www.hopnet.mobi, click Blogs.
Hope this helps.
I know this will get a lot of traditional answers, but I would also like to put forward something completely original we tried (and succeeded) doing ourselves for more efficient localisation of Silverlight using Attached Properties instead of binding:
Localisation of Silverlight projects after completion
To pre-populate the database we wrote a XML parser to find our markers in all our project's XAML files (XAML is just a subset of XML after all). We could not find any existing tools to do what you suggested, but our requirements were simplified by our new method of localisation (no resource files and no horrid bindings).
(yes, this is almost the same answer as a previous one of mine today, but it seems to fit again).
Also for future reference keep an eye out for this tool: http://www.neovelop.com/ This tool will go in private beta soon and looks very promising. Judging from their preview movie this will do exactly what you asked for.
I have a SL 4.0 application hosted on IIS with a possibility to change GUI language. The problem is that hosted on one machine , language functionality works and on the other machine not. Inside this piece of code:
Thread.CurrentThread.CurrentCulture = new CultureInfo(message.NewCulture);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(message.NewCulture);
on Windows7 it does update UICulture with correct resource file and on Windows Server 2008 it does not. IIS settings on both systems seem to be the same. Any suggestions where to look?
You might want to take a look at the Blog entry made by Tim Heuer on the subject.
http://timheuer.com/blog/archive/2009/08/26/silverlight-string-localization.aspx
Using this blog post, I was able to get Globalization/Localization implemented in a short amount of time and minimal effort.
It sounds like you need to take a look at the Access Modifier section in the designer. You'll need to set this to Public in order to use it in XAML binding. Also check that all the RESX files are marked as Embedded Resource in the properties for the files.
Additionally make sure your string resource dictionaries have extensions to something similar:
P.S. I hope you'll read Tim's blog entry, he goes into a lot more detail than what I've explained. Also from my personal experience, I wasn't able to dynamically reload the language on the fly until I took a look the section on the blog post titled "Public modifier workaround and dynamically setting the culture".
R-Click the assembly(ies) containing your localized files, select unload project and then edit the project file(s). The project files are in XML format. Look for a XML tag related to SupportedCultures (or something like that). Make sure that your cultures are in the list.
Localization didn't want to kick in for me until I got that resolved.
I am using .NET 3.5 and programming in VB. I recently came accross the need to have a multi select dropdown box. I tried to disuade my manager from I did my usual google searches as .NET does not come with a standard drop down component that allows this functionality.
I found this Article
I downloaded the demo and it works exactly the way I want it to work in my application. However when I attempt to add this component to my project, it fails at base.WndProc(ref m) and says that the string is an invalid boolean. Ideally I would debug this and pass in a boolean as it sounds like it's getting a string instead of the expected boolean. But I can't modify the WndProc() method. Or can I?
Or if anyone else has looked at this article and gotten it to successfully work. I'd appreciate any advice on the matter.