Reputation: 41
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?
Upvotes: 1
Views: 71
Reputation: 4847
To change the width, simply:
browser.Width = 400;
To hook an event:
browser.Navigated += (s,e) => { do something};
Upvotes: 1