MicrosoftEdge / MicrosoftEdge/WebView2Feedback

height/width based on html content

Open
#123 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature request tracked
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

currently it would be great to actually fit a webview into a specific template, so that the html height/width will be set as the height of the webview.

this would enable to use native wpf scrollbars for a nice looking webview.

example, we have the following code:

<Grid Width="{Binding ElementName=ArticleFields, Path=ActualWidth}">
<wpf:WebView  Width="Auto" Height="CalculatedHeight" VerticalAlignment="Stretch"/>
</Grid>

while we try to get the CalculatedHeight based on the rendered document. it would be easier if the webview would support that nativly since it knows the inner document size.

AB#25254454

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the WPF WebView sizing example in the issue and investigate how the rendered document's inner dimensions are exposed. Done means the WebView can size itself from the HTML content and work with native WPF scrollbars, including the shown Grid binding scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.