I was trying to hidde some lines of the code in the syntax editor(not with region. I want not visible), but finally I was not able to find it a solution.
Ex.
namespace ExampleNamespace { --> not visible
public class Class1: Class2 { --> not visible
I was trying to hidde some lines of the code in the syntax editor(not with region. I want not visible), but finally I was not able to find it a solution.
Ex.
Hi Daniel,
Based on your usage example, I think the solution you're looking for would actually be provided through the Code Fragments feature instead of trying to hide code in the editor. Code fragments allow you to define a header and footer that "wrap" the code in the middle and maintain the same parsing and syntax highlighting for the content in between.
Our Sample Browser has a QuickStart called "Code Fragments" that you can take a look at to see it in action. You can also find more detail documentation on the topic here.
Please reach back out if you do not think this will provide the solution you need and we can further discuss options for hiding code.
Hello,
Thanks for the reply, the problem in this solution is that for example is we want to add more usings we can not do as the region that we are adding these using is inside the class.
Is there any way to interleave different code fragments?
[Modified 5 years ago]
Hi Daniel,
SyntaxEditor supports header and footer text sections. Anything can be in those header and footer text sections and they will "wrap" the document's text for the purposes of parsing. Normally you would put your "usings" within the namespace declaration in the header text.
If you still think there is a problem for your situation, we would need more detail such as a code example showing how you are trying to break up the header/document/footer sections and what is in each. Thanks!
Please log in to a validated account to post comments.