Question

I have created a windows phone browser but instead of adding it via xaml I decided to add it via c#.

In this xaml I added a grid

 <Grid Grid.RowSpan="2" Grid.Row="1" Name="browserHost"/>

and added a browser to the grid via c#

browserHost.Children.Add(browser);

So my question is what code should I use to access the browser in c# and is there anyway I could use this in a navigated event?

For example if I was to modify the width how would I go about doing so?

Was it helpful?

Solution

To change the width, simply:

browser.Width = 400;

To hook an event:

browser.Navigated += (s,e) => { do something};
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top