I have a scrollviewer that contain a webbrowser, I need to add a button <Button Grid.Row="1"> also inside the scrollview but i can’t.
<Button.Background>
<ImageBrush ImageSource="../Images/cont_banner.png" />
</Button.Background>
<Button.Content>
<HyperlinkButton Content="" NavigateUri="callto:3950" />
</Button.Content>
</Button>
This my code with the button outside the scroolviewer, how can i move it inside?
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="100"/>
</Grid.RowDefinitions>
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Margin="25, 0, 0, 0" Grid.Row="0">
<!--<TextBlock Text="{Binding Path=Descrption}" Style="{StaticResource servicesText}" TextWrapping="Wrap" />-->
<phone:WebBrowser DataContext="{Binding Path=Descrption}" x:Name="webBrowserHTML" Foreground="Black" Loaded="webBrowserHTML_Loaded" />
</ScrollViewer>
<!--<Image Source="../Images/cont_banner.png" Width="270" Grid.Row="1"/>-->
<Button Grid.Row="1">
<Button.Background>
<ImageBrush ImageSource="../Images/cont_banner.png" />
</Button.Background>
<Button.Content>
<HyperlinkButton Content="" NavigateUri="callto:3950" />
</Button.Content>
</Button>
</Grid>
</DataTemplate>
</controls:Pivot.ItemTemplate>
You could do it like this:
Note that you’ll need to set the height of the web Browser control explicitly to something appropriate.
You probably also want to set that left margin to be 24 pixels (not 25) to be consistent with the rest of the platform.
Update
You MUST set the height of the
WebBrowserfor this to work.