I used data annotations, but it did not work. I used
[Display(name=" you want to know about products")]
but it didn't work.
Thank you
First of all there is not in-built or direct method to add a space in enumerator properties in c#. But you can use the following workaround.
This will help you
https://stackoverflow.com/a/57716964/9524580
Related
I have created a Visual Studio custom editor extension (implementing ITagger<T>). It works perfectly and applies syntax highlighting according to the domain specific language behind it. Nonetheless, when I edit the text, VS re-tags and re-formats only the edited line.
However, when a particular line changes, I need to force re-formatting all the visible lines following the edited line. I do not know how to do this. I tried many alternatives, including responding the Changed event of the TextBuffer behind.
Can you help me with ideas, or sample source code to custom editor implementations that handle this issue? The built-in C# editor does it: when I edit a line, and it becomes a multi-line comment, the text view is changed accordingly.
The extension code Formatter could format the class file and arrange fields, properties and methods as per StyleCop rules. Maybe it is an extension you want to get:
https://marketplace.visualstudio.com/items?itemName=vs-publisher-599079.CodeFormatter
One crude way is to close the document and open it again.
string path = dte.ActiveDocument.FullName;
dte.ActiveDocument.Save();
dte.ActiveDocument.Close();
dte.ItemOperations.OpenFile(path);
Although, I hope there is a better way to deal with this issue.
Edit: Well, I think I found a better way.
An event is declared in your tagger class (which implements ITagger interface). Raising the interface does the job flawlessly.
I would like to know whether it is possible to add buttons to a particular document library's column when a new item is created. I am working on SharePoint without using any development tools like SPD and Visual Studio.So, is there any way to use JavaScript to achieve this? Because, if it is done using java script I can add the java script code to a content editor and get the desired functionality.
What are the any/other ways to achieve this functionality by coding in visual studio?
Thanks
You might be able to achieve it with JavaScript as you suggest. However, don't do it. SharePoint is a complicated product with very complicated means for displaying lists. Don't try to hack it, rather use the appropriate tools (i.e. Visual Studio and/or SharePoint Designer).
To achieve what you want, you will have to create a custom field type definition and an appropriate XSLT rendering template. However, this is both quite complicated. I would recommend either creating a custom list item menu action or a custom button in the ribbon.
Using Visual Studio you have several options. I expect you need to add buttons to the list form (Edit or Display). You can:
create custom ribbon buttons. - The most standard way.
create your own field with the button you need and use this column in the list. Little bit complicated. Can be used in more lists.
create your own Editform for your content type or list. - The most complicated way but with the most possibilities.
I need to write some mathematical expressions (like a matrix and mathematical variables...) into my GUI.
The MFC static control is very limited on this issue. Especially for the math. symbols.
Is there any control or other way to make this happen?
You may want to check out MFC Grid Control:
http://www.codeproject.com/KB/miscctrl/gridctrl.aspx
There is only one good math editor, see http://www.dessci.com/en/products/mathplayer/ . It's not so much a ready-to-use control though, it may or may not work for your application.
Consider allowing TeX-style equations in your application. Again, depending on your audience, this may or may not be an option.
OK all I did now is a bit dirty, but I put everything with static controls together and changed the font to Symbol from microsoft to get the greek letters.
You maybe need to resize and move some of the controls but then everythings seems to work.
So all in all kinda dirty.
You can use calc from openoffice and save the formula like image. Then you can display it in your gui. I hope thet help you.
Can i create round images with asp.net? Please advise. My requirement is to upload any image and get a rounded version of that created bu asp.net. I am using .Net framework 3.5, visual studio .net 2008.
Many thanks in advance.
Drawing and image manipulation with GDI+ is straightforward as the other answers suggested.
But please note this is an unsupported path, as stated by this MSDN article (emphasis added by myself).
Classes within the System.Drawing namespace are not supported for use within a Windows or ASP.NET service. Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions.
I have successfully used GDI+ within an ASP.NET application several times, and have never faced any problems, but I guess it's just good to know.
You can do it with GDI+ at least. A short answer: use .Graphics.SetClip() to set your desired shape and then draw you image. Everything outside the clipping region will be cut away.
Here's an article disussing a method that will bring smoother corners (and even softed edges if you like): http://danbystrom.se/2008/08/24/soft-edged-images-in-gdi/
First of all you have to find yourself a library that can do such thing to an image.
I've found sth on CodeProject http://www.codeproject.com/KB/GDI-plus/rounded_corners.aspx but I'm not sure if this is going to work with asp.net (that's basically a thing that you should google).
Then when you have a library you do your job with uploading a file and when it's uploaded you check the mime-type, try to open it and use the library.
You haven't mentioned whether this is web or not, but have you considered rounding the images with css and/or javascript? Once you remove that image detail you can't get it back! What if the client wants a different clip shape later?
I m using a assembly EventCalender. The ddl is EventCalender.dll. I copied this assembly from existing application. It provides customized functionality to calender. I want to see the code of that dll and want to change some functionality of it. How it will be possible..? Thanks in advance.
If the dll is written in .NET you can view the code using the .NET Reflector.
Try lutz roeders 'Reflector' tool
http://www.red-gate.com/products/reflector/
I think this link will help you. You can do it using Reflector.
If you just want to view the IL code of the DLL, you can use ILDASM. If you want to convert it back to VB.NET or C#, use Reflector as the previous answers have suggested. One of the plugins allows you to extract all class files within the assembly to a single folder.
However, one point that others haven't addressed is that if you want to change the functionality, you will need to recompile the library after resolving all external references.