-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WPF ZoomIn/Out Functionality #306
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
using System.ComponentModel; | ||
using System.Windows.Input; | ||
using System.Windows.Input; | ||
|
||
namespace CefSharp.Wpf | ||
{ | ||
|
@@ -43,6 +42,21 @@ public interface IWpfWebBrowser : IWebBrowser | |
/// </summary> | ||
ICommand ReloadCommand { get; } | ||
|
||
/// <summary> | ||
/// Command which increases the zoom level | ||
/// </summary> | ||
ICommand ZoomInCommand { get; } | ||
|
||
/// <summary> | ||
/// Command which decreases the zoom level | ||
/// </summary> | ||
ICommand ZoomOutCommand { get; } | ||
|
||
/// <summary> | ||
/// Command which resets the zoom level to default | ||
/// </summary> | ||
ICommand ZoomResetCommand { get; } | ||
|
||
/// <summary> | ||
/// Opens up a new program window (using the default text editor) where the source code of the currently displayed web | ||
/// page is shown. | ||
|
@@ -55,5 +69,11 @@ public interface IWpfWebBrowser : IWebBrowser | |
/// <returns><c>true</c> if keyboard focus and logical focus were set to this element; <c>false</c> if only logical focus | ||
/// was set to this element, or if the call to this method did not force the focus to change.</returns> | ||
bool Focus(); | ||
|
||
/// <summary> | ||
/// The zoom level at which the browser control is currently displaying. Can be set to 0 to clear the zoom level(resets to default zoom level) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I lack a space here, but since this is such a minor change I'll fix it myself. |
||
/// </summary> | ||
/// <remarks>This property is a Dependency Property and fully supports data binding.</remarks> | ||
double ZoomLevel { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whitespace here is quite messed up. Could you take a look at it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting! The code looks fine in visual studio, I can see the formatting of the patch is clearly all over the place. I'm fairly new to the world of Git, so if you have any insights they would be greatly appreciated, otherwise I'll take a look at the issue shortly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amaitland we use spaces for whitespace here - not tabs. I guess that's the problem ... Take a look at your Visual Studio settings (don't know if it's configurable per solution/project). Otherwise I can reccomend the PowerCommands aka "Productivity Power Tools" VS add-in. It complains if a file has mixed tabs/spaces - and you just click a button to fix it in either direction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But be very careful to not commit a lot of whitespace changes along with other changes (which is easy if you click the "fix tabs/spaces" button 😃). Please fix as needed, but as separate pull requests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes perfect sense, thank you both for the prompt reply's. I've just committed the formatting changes.