简体   繁体   中英

Border for WebBrowser control

First i have created a web browser control(full screen sized) and then i have created a border above the web browser control but when i debugged it, the border is not visible. Need help? Thanks in advance for your hard work!

<Border x:Name="UrlBorder" Background="{StaticResource PhoneAccentBrush}" CornerRadius="8">
        <TextBox x:Name="UrlTextBox" Background="White" InputScope="URL" Margin="0,0,98,0"/>
</Border>
<phone:WebBrowser x:Name="BrowserHost" Margin="0,12,0,0" Grid.RowSpan="2" GotFocus="BrowserHost_GotFocus" IsScriptEnabled="True" />

Not sure what you are trying to do here. Looks like you want an url input textbox surrounded by border on top of a nearly-fullscreen web browser element. If so, I would use a stackpanel.

<StackPanel>
    <Border><TextBox /></Border>
    <WebBrowser/>
</StackPanel>

If you want to hide the url input, you can still set the Border's visibility to Collapsed.

Elements in grid can overlap each other. So, the webbrowser element will cover your bordered textbox if it's fullscreen. Also, neither your border, nor your textbox has explicit height nor width.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM