-1

I have a web browser in XAML:

<phone:WebBrowser x:Name="Browser"  Grid.Row="1" Grid.RowSpan="2"
                  Navigating="Browser_Navigating"/>

It displays HTML content present in isolated storage so I retrieve the content and store it in a string to display it on WebBrowser,

Browser.NavigateToString(str);

The string contains a button which acts as a link. I want to change the size of this button.I do not know how to access the button present in string which is stored inside Isolated storage. Any idea?

Rachel
  • 133
  • 1
  • 16
  • Possible duplicate of [How do you modify style in the code behind file for divs in ASP.net?](https://stackoverflow.com/questions/657144/how-do-you-modify-style-in-the-code-behind-file-for-divs-in-asp-net) – Weedoze Aug 16 '17 at 05:44

1 Answers1

0

There are more than just one way to get this done. It's about string-manipulation.

Example 1: Search through the HTML-String for the ID or Name of the Button. If you found it: simply add style="font-size:99px" into the Buttons Tag, where the 99 is the size of it. Change it how you like to.

Example 2: If you know that the CSS (Styling) is in the same Website (String) then you can edit or add the font-size attribute there.

After you did this, just call your edited String like this:

Browser.NavigateToString(EditedString);

If you've got questions, ask ;)

  • B.Müller thanks for replying..I do not want to change the size of button in HTML-String , I wanted to know if I can change it in c# code using javascript or some other way..Pardon if I am asking wrong question. – Rachel Aug 10 '17 at 06:54
  • Sorry, i am not familiar with this. The only way i would do it is as described above. You could write an method that automaticly finds/resizes the button if you want something near to a script function. –  Aug 10 '17 at 09:31