1
Answer

Call an xaml element from cs file

E

E

14y
3.1k
1
Hi all,

I created a button in my main file (SurfaceWindow1.xaml) and used this code in the .cs file to give it a function.

 

void changeMapStyleHy(object sender, EventArgs e)
{
SurfaceMap.MapStyle = InfoStrat.VE.VEMapStyle.Hybrid;
}


Works fine, no problems there.

I created an extra xaml file which loads when I place a tag on the screen (I'm developing on a Surface Table). This works fine too. The 2nd xaml is loaded and showed up.

Now, when I create a button in this second xaml file, I can't 'call' "SurfaceMap" since it's in my main xaml file. How can I refer to this element?

 

Thanks in advance!


Answers (1)
0
Rajeesh Menoth

Rajeesh Menoth

NA 24.7k 629.4k 9y
Hi,
 
You can use "Spire.Pdf".Check the following reference.
 
Example :
 
http://codepedia.info/2015/08/create-pdf-in-asp-net-csharp-spire-net-turn-html-to-pdf/
 
https://rajeeshmenoth.wordpress.com/2015/06/24/convert-pdf-to-other-format-using-spire-pdf/
 
The answer is helpful.Then please accept it..!!
 
0
Aarush Rahaan

Aarush Rahaan

NA 2 0 9y
If you mean you want to convert HTML page to PDF, I found the following links that might help:
https://code.msdn.microsoft.com/Convert-from-HTML-to-PDF-09ce2a1d#content
http://www.c-sharpcorner.com/forums/how-to-convert-html-to-pdf-in-c-sharp

If this is not what you are trying to do, provide more details about what you want.
0
Vivek Kumar

Vivek Kumar

NA 7.6k 729.7k 9y
Hi Ronak
Please once see my article for your reference. 
 
http://www.c-sharpcorner.com/UploadFile/f4f047/generating-pdf-file-using-C-Sharp/ 
http://www.c-sharpcorner.com/blogs/create-table-in-pdf-using-c-sharp-and-itextsharp 
 
You can set border none as per your requirement if your are using table
 
 
---------------------------------------------------
If this post helps you, mark it as answer
 
0
Suresh M

Suresh M

NA 18.6k 1.5m 9y
You need use any library for creating PDF 
Sample http://csharp.net-informations.com/file/create-pdf.htm