(p =>
77 | {
78 | if (p.VirtualKey is KeyCode.F11 or KeyCode.Escape)
79 | {
80 | Dispatcher.UIThread.InvokeAsync(() => fullScreenWindow.Close());
81 | }
82 |
83 | return InputEventResponse.Proceed;
84 | });
85 | View.IsVisible = false;
86 | fullScreenWindow.View.InitializeFrom(Model.Browser);
87 |
88 | fullScreenWindow.Show();
89 | }
90 |
91 | private void OnDataContextChanged(object sender, EventArgs e)
92 | {
93 | if (Model != null)
94 | {
95 | View.InitializeFrom(Model.Browser);
96 | Model.StatesUpdated += OnStatesUpdated;
97 | DataContextChanged -= OnDataContextChanged;
98 | }
99 | }
100 |
101 | private void OnMenuButtonClick(object sender, RoutedEventArgs e)
102 | {
103 | Menu.ContextMenu?.Open();
104 | }
105 |
106 | private void OnStatesUpdated(object sender, EventArgs e)
107 | {
108 | Dispatcher.UIThread.InvokeAsync(() => AddressBar.Text = Model?.Browser.Url);
109 | }
110 |
111 | private void PrintToPdf(object sender, RoutedEventArgs e)
112 | {
113 | IStorageProvider provider = TopLevel.GetTopLevel(this)?.StorageProvider;
114 |
115 | provider?.SaveFilePickerAsync(new FilePickerSaveOptions
116 | {
117 | Title = "Select where to save the PDF file",
118 | DefaultExtension = "pdf",
119 | FileTypeChoices = new[] { FilePickerFileTypes.Pdf },
120 | })
121 | .ContinueWith(async t =>
122 | {
123 | string file = t.Result?.Path.LocalPath;
124 | if (!string.IsNullOrWhiteSpace(file) && Model != null)
125 | {
126 | return await Model.PrintToPdf(file);
127 | }
128 |
129 | return string.Empty;
130 | }, TaskScheduler.FromCurrentSynchronizationContext())
131 | .ContinueWith(async t1 =>
132 | {
133 | string pdf = await t1.Result;
134 | if (!string.IsNullOrWhiteSpace(pdf))
135 | {
136 | Model?.LoadUrl(pdf);
137 | }
138 | }, default, TaskContinuationOptions.OnlyOnRanToCompletion,
139 | TaskScheduler.FromCurrentSynchronizationContext());
140 | }
141 |
142 | private void TakeScreenshot(object sender, RoutedEventArgs e)
143 | {
144 | IStorageProvider provider = TopLevel.GetTopLevel(this)?.StorageProvider;
145 |
146 | provider?.SaveFilePickerAsync(new FilePickerSaveOptions
147 | {
148 | Title = "Select where to save the screenshot",
149 | DefaultExtension = "png",
150 | FileTypeChoices = new[] { FilePickerFileTypes.ImagePng },
151 | })
152 | .ContinueWith(t =>
153 | {
154 | string file = t.Result?.Path.LocalPath;
155 | if (!string.IsNullOrWhiteSpace(file))
156 | {
157 | Model?.TakeScreenshot(file);
158 | }
159 | }, TaskScheduler.FromCurrentSynchronizationContext());
160 | }
161 | }
162 | }
--------------------------------------------------------------------------------
/DotNetBrowser.AvaloniaUi.Demo/Views/FullScreenWindow.axaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/DotNetBrowser.AvaloniaUi.Demo/Views/FullScreenWindow.axaml.cs:
--------------------------------------------------------------------------------
1 | #region Copyright
2 |
3 | // Copyright © 2025, TeamDev. All rights reserved.
4 | //
5 | // Redistribution and use in source and/or binary forms, with or without
6 | // modification, must retain the above copyright notice and the following
7 | // disclaimer.
8 | //
9 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
11 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
12 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
13 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
15 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
16 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
17 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
19 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20 |
21 | #endregion
22 |
23 | using Avalonia.Controls;
24 | using Avalonia.Input;
25 |
26 | namespace DotNetBrowser.AvaloniaUi.Demo.Views;
27 |
28 | public partial class FullScreenWindow : Window
29 | {
30 | public FullScreenWindow()
31 | {
32 | InitializeComponent();
33 | }
34 |
35 | protected override void OnKeyDown(KeyEventArgs e)
36 | {
37 | base.OnKeyDown(e);
38 | if (e.Key is Key.F11 or Key.Escape)
39 | {
40 | Close();
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/DotNetBrowser.AvaloniaUi.Demo/Views/NoLicenseDialog.axaml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | Thank you for trying DotNetBrowser in AvaloniaUI.
28 |
29 |
30 | To run the demo, get the free trial license and insert it below:
31 |
32 |
33 |
34 |
35 |
36 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/DotNetBrowser.AvaloniaUi.Demo/Views/NoLicenseDialog.axaml.cs:
--------------------------------------------------------------------------------
1 | #region Copyright
2 |
3 | // Copyright © 2025, TeamDev. All rights reserved.
4 | //
5 | // Redistribution and use in source and/or binary forms, with or without
6 | // modification, must retain the above copyright notice and the following
7 | // disclaimer.
8 | //
9 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
11 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
12 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
13 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
15 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
16 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
17 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
19 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20 |
21 | #endregion
22 |
23 | using Avalonia;
24 | using Avalonia.Controls;
25 | using Avalonia.Input;
26 | using Avalonia.Interactivity;
27 |
28 | namespace DotNetBrowser.AvaloniaUi.Demo.Views;
29 |
30 | public partial class NoLicenseDialog : Window
31 | {
32 | public NoLicenseDialog()
33 | {
34 | InitializeComponent();
35 | AddHandler(KeyDownEvent, OnKeyPressed, RoutingStrategies.Tunnel);
36 | DataContext = this;
37 | }
38 |
39 | public void ApplyLicense(object msg)
40 | {
41 | Close(msg?.ToString() ?? string.Empty);
42 | }
43 |
44 | public bool CanApplyLicense(object msg) => !string.IsNullOrWhiteSpace(msg?.ToString());
45 |
46 | private void MainLayout_OnAttachedToVisualTree(object sender,
47 | VisualTreeAttachmentEventArgs e)
48 | {
49 | ApplyButton.Focus();
50 | }
51 |
52 | private void OnKeyPressed(object sender, KeyEventArgs e)
53 | {
54 | if (e.Key == Key.Escape)
55 | {
56 | Close(string.Empty);
57 | }
58 | }
59 | }
--------------------------------------------------------------------------------
/DotNetBrowser.AvaloniaUi.Demo/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/DotNetBrowser.Demo.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.0.31903.59
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetBrowser.AvaloniaUi.Demo", "DotNetBrowser.AvaloniaUi.Demo\DotNetBrowser.AvaloniaUi.Demo.csproj", "{12E9FCD6-A2B4-4371-AD17-A76AD046D3B8}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Debug|ARM64 = Debug|ARM64
12 | Release|Any CPU = Release|Any CPU
13 | Release|ARM64 = Release|ARM64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {12E9FCD6-A2B4-4371-AD17-A76AD046D3B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {12E9FCD6-A2B4-4371-AD17-A76AD046D3B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {12E9FCD6-A2B4-4371-AD17-A76AD046D3B8}.Debug|ARM64.ActiveCfg = Debug|Any CPU
19 | {12E9FCD6-A2B4-4371-AD17-A76AD046D3B8}.Debug|ARM64.Build.0 = Debug|Any CPU
20 | {12E9FCD6-A2B4-4371-AD17-A76AD046D3B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
21 | {12E9FCD6-A2B4-4371-AD17-A76AD046D3B8}.Release|Any CPU.Build.0 = Release|Any CPU
22 | {12E9FCD6-A2B4-4371-AD17-A76AD046D3B8}.Release|ARM64.ActiveCfg = Release|Any CPU
23 | {12E9FCD6-A2B4-4371-AD17-A76AD046D3B8}.Release|ARM64.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {3D12E2D3-97BD-4C65-98FB-AA5B0453AE16}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/DotNetBrowser.Demo.sln.DotSettings:
--------------------------------------------------------------------------------
1 |
2 | ExplicitlyExcluded
3 | ExplicitlyExcluded
4 | ExplicitlyExcluded
5 | ExplicitlyExcluded
6 | ExplicitlyExcluded
7 | ExplicitlyExcluded
8 | ExplicitlyExcluded
9 | ExplicitlyExcluded
10 | ExplicitlyExcluded
11 | ExplicitlyExcluded
12 | ExplicitlyExcluded
13 | ExplicitlyExcluded
14 | ExplicitlyExcluded
15 | ExplicitlyExcluded
16 | ExplicitlyExcluded
17 | ExplicitlyExcluded
18 | ExplicitlyExcluded
19 | ExplicitlyExcluded
20 | ExplicitlyExcluded
21 | ExplicitlyExcluded
22 | 7B811229-51C5-4932-BEBB-C015D79A3D0F/d:Generated
23 | SUGGESTION
24 | SUGGESTION
25 | DO_NOT_SHOW
26 | DO_NOT_SHOW
27 | DO_NOT_SHOW
28 | HINT
29 | HINT
30 | HINT
31 | HINT
32 | HINT
33 | HINT
34 | HINT
35 | HINT
36 | HINT
37 | HINT
38 | HINT
39 | HINT
40 | WARNING
41 | WARNING
42 | WARNING
43 | WARNING
44 | WARNING
45 | WARNING
46 | WARNING
47 | WARNING
48 | DO_NOT_SHOW
49 | DO_NOT_SHOW
50 | DO_NOT_SHOW
51 | DO_NOT_SHOW
52 | DO_NOT_SHOW
53 | HINT
54 | SUGGESTION
55 | HINT
56 | HINT
57 | HINT
58 | HINT
59 | HINT
60 | HINT
61 | HINT
62 | HINT
63 | HINT
64 | HINT
65 | HINT
66 | HINT
67 | HINT
68 | HINT
69 | WARNING
70 | WARNING
71 | WARNING
72 | CSharp60
73 | DO_NOT_SHOW
74 | DO_NOT_SHOW
75 | HINT
76 | HINT
77 | HINT
78 | DO_NOT_SHOW
79 |
80 | SUGGESTION
81 |
82 | True
83 | <?xml version="1.0" encoding="utf-16"?><Profile name="DotNetBrowser"><CSReorderTypeMembers>True</CSReorderTypeMembers><JsInsertSemicolon>True</JsInsertSemicolon><FormatAttributeQuoteDescriptor>True</FormatAttributeQuoteDescriptor><CorrectVariableKindsDescriptor>True</CorrectVariableKindsDescriptor><VariablesToInnerScopesDescriptor>True</VariablesToInnerScopesDescriptor><StringToTemplatesDescriptor>True</StringToTemplatesDescriptor><JsReformatCode>True</JsReformatCode><JsFormatDocComments>True</JsFormatDocComments><RemoveRedundantQualifiersTs>True</RemoveRedundantQualifiersTs><OptimizeImportsTs>True</OptimizeImportsTs><OptimizeReferenceCommentsTs>True</OptimizeReferenceCommentsTs><PublicModifierStyleTs>True</PublicModifierStyleTs><ExplicitAnyTs>True</ExplicitAnyTs><TypeAnnotationStyleTs>True</TypeAnnotationStyleTs><RelativePathStyleTs>True</RelativePathStyleTs><AsInsteadOfCastTs>True</AsInsteadOfCastTs><HtmlReformatCode>True</HtmlReformatCode><AspOptimizeRegisterDirectives>True</AspOptimizeRegisterDirectives><XMLReformatCode>True</XMLReformatCode><CSCodeStyleAttributes ArrangeTypeAccessModifier="True" ArrangeTypeMemberAccessModifier="True" SortModifiers="True" RemoveRedundantParentheses="True" AddMissingParentheses="True" ArrangeBraces="True" ArrangeAttributes="True" ArrangeArgumentsStyle="True" ArrangeCodeBodyStyle="True" ArrangeVarStyle="False" /><RemoveCodeRedundanciesVB>True</RemoveCodeRedundanciesVB><CssAlphabetizeProperties>True</CssAlphabetizeProperties><VBOptimizeImports>True</VBOptimizeImports><VBShortenReferences>True</VBShortenReferences><RemoveCodeRedundancies>True</RemoveCodeRedundancies><CSUseAutoProperty>True</CSUseAutoProperty><CSMakeFieldReadonly>True</CSMakeFieldReadonly><CSMakeAutoPropertyGetOnly>True</CSMakeAutoPropertyGetOnly><CSArrangeQualifiers>True</CSArrangeQualifiers><CSFixBuiltinTypeReferences>True</CSFixBuiltinTypeReferences><CssReformatCode>True</CssReformatCode><VBReformatCode>True</VBReformatCode><VBFormatDocComments>True</VBFormatDocComments><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings><CSShortenReferences>True</CSShortenReferences><CSReformatCode>True</CSReformatCode><CSharpFormatDocComments>True</CSharpFormatDocComments><CSUpdateFileHeader>True</CSUpdateFileHeader></Profile>
84 | DotNetBrowser
85 | Required
86 | Required
87 | Required
88 | Required
89 | ExpressionBody
90 | ExpressionBody
91 | True
92 | True
93 | True
94 | True
95 | True
96 | True
97 | True
98 | True
99 | True
100 | True
101 | True
102 | 4
103 | Space
104 | True
105 | True
106 | 4
107 | False
108 | True
109 | True
110 | CHOP_IF_LONG
111 | CHOP_IF_LONG
112 | CHOP_IF_LONG
113 | 94
114 | 94
115 | <?xml version="1.0" encoding="utf-16"?>
116 | <Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns">
117 | <TypePattern DisplayName="Non-reorderable types">
118 | <TypePattern.Match>
119 | <Or>
120 | <And>
121 | <Kind Is="Interface" />
122 | <Or>
123 | <HasAttribute Name="System.Runtime.InteropServices.InterfaceTypeAttribute" />
124 | <HasAttribute Name="System.Runtime.InteropServices.ComImport" />
125 | </Or>
126 | </And>
127 | <Kind Is="Struct" />
128 | <HasAttribute Name="JetBrains.Annotations.NoReorderAttribute" />
129 | <HasAttribute Name="JetBrains.Annotations.NoReorder" />
130 | </Or>
131 | </TypePattern.Match>
132 | </TypePattern>
133 | <TypePattern DisplayName="xUnit.net Test Classes" RemoveRegions="All">
134 | <TypePattern.Match>
135 | <And>
136 | <Kind Is="Class" />
137 | <HasMember>
138 | <And>
139 | <Kind Is="Method" />
140 | <HasAttribute Name="Xunit.FactAttribute" Inherited="True" />
141 | </And>
142 | </HasMember>
143 | </And>
144 | </TypePattern.Match>
145 | <Entry DisplayName="Setup/Teardown Methods">
146 | <Entry.Match>
147 | <Or>
148 | <Kind Is="Constructor" />
149 | <And>
150 | <Kind Is="Method" />
151 | <ImplementsInterface Name="System.IDisposable" />
152 | </And>
153 | </Or>
154 | </Entry.Match>
155 | <Entry.SortBy>
156 | <Kind Order="Constructor" />
157 | </Entry.SortBy>
158 | </Entry>
159 | <Entry DisplayName="All other members" />
160 | <Entry DisplayName="Test Methods" Priority="100">
161 | <Entry.Match>
162 | <And>
163 | <Kind Is="Method" />
164 | <HasAttribute Name="Xunit.FactAttribute" />
165 | </And>
166 | </Entry.Match>
167 | <Entry.SortBy>
168 | <Name />
169 | </Entry.SortBy>
170 | </Entry>
171 | </TypePattern>
172 | <TypePattern DisplayName="NUnit Test Fixtures" RemoveRegions="All">
173 | <TypePattern.Match>
174 | <And>
175 | <Kind Is="Class" />
176 | <HasAttribute Name="NUnit.Framework.TestFixtureAttribute" Inherited="True" />
177 | </And>
178 | </TypePattern.Match>
179 | <Entry DisplayName="Setup/Teardown Methods">
180 | <Entry.Match>
181 | <And>
182 | <Kind Is="Method" />
183 | <Or>
184 | <HasAttribute Name="NUnit.Framework.SetUpAttribute" Inherited="True" />
185 | <HasAttribute Name="NUnit.Framework.TearDownAttribute" Inherited="True" />
186 | <HasAttribute Name="NUnit.Framework.FixtureSetUpAttribute" Inherited="True" />
187 | <HasAttribute Name="NUnit.Framework.FixtureTearDownAttribute" Inherited="True" />
188 | </Or>
189 | </And>
190 | </Entry.Match>
191 | </Entry>
192 | <Entry DisplayName="All other members" />
193 | <Entry DisplayName="Test Methods" Priority="100">
194 | <Entry.Match>
195 | <And>
196 | <Kind Is="Method" />
197 | <HasAttribute Name="NUnit.Framework.TestAttribute" />
198 | </And>
199 | </Entry.Match>
200 | <Entry.SortBy>
201 | <Name />
202 | </Entry.SortBy>
203 | </Entry>
204 | </TypePattern>
205 | <TypePattern DisplayName="Default Pattern">
206 | <Entry DisplayName="Static Fields and Constants">
207 | <Entry.Match>
208 | <Or>
209 | <Kind Is="Constant" />
210 | <And>
211 | <Kind Is="Field" />
212 | <Static />
213 | </And>
214 | </Or>
215 | </Entry.Match>
216 | <Entry.SortBy>
217 | <Kind Order="Constant Field" />
218 | </Entry.SortBy>
219 | </Entry>
220 | <Entry DisplayName="Fields">
221 | <Entry.Match>
222 | <And>
223 | <Kind Is="Field" />
224 | <Not>
225 | <Static />
226 | </Not>
227 | </And>
228 | </Entry.Match>
229 | <Entry.SortBy>
230 | <Readonly />
231 | <Name />
232 | </Entry.SortBy>
233 | </Entry>
234 | <Entry DisplayName="Other Properties">
235 | <Entry.Match>
236 | <Or>
237 | <Kind Is="Property" />
238 | <Kind Is="Indexer" />
239 | <Kind Is="Autoproperty" />
240 | </Or>
241 | </Entry.Match>
242 | <Entry.SortBy>
243 | <Access />
244 | <Name />
245 | </Entry.SortBy>
246 | </Entry>
247 | <DependencyProperty DisplayName="Dependency Properties" Priority="100">
248 | <Entry DisplayName="DP Key">
249 | <Entry.Match>
250 | <DependencyPropertyPart Match="Key" />
251 | </Entry.Match>
252 | </Entry>
253 | <Entry DisplayName="DP Field">
254 | <Entry.Match>
255 | <DependencyPropertyPart />
256 | </Entry.Match>
257 | </Entry>
258 | <Entry DisplayName="DP Handler">
259 | <Entry.Match>
260 | <DependencyPropertyPart Match="Handler" />
261 | </Entry.Match>
262 | </Entry>
263 | <Entry DisplayName="DP Property">
264 | <Entry.Match>
265 | <DependencyPropertyPart Match="Property" />
266 | </Entry.Match>
267 | </Entry>
268 | <Entry DisplayName="Attached DP Getter">
269 | <Entry.Match>
270 | <DependencyPropertyPart Match="Getter" />
271 | </Entry.Match>
272 | </Entry>
273 | <Entry DisplayName="Attached DP Setter">
274 | <Entry.Match>
275 | <DependencyPropertyPart Match="Setter" />
276 | </Entry.Match>
277 | </Entry>
278 | </DependencyProperty>
279 | <Entry DisplayName="Interface Properties" Priority="100">
280 | <Entry.Match>
281 | <And>
282 | <Or>
283 | <Kind Is="Property" />
284 | <Kind Is="Indexer" />
285 | <Kind Is="Autoproperty" />
286 | </Or>
287 | <ImplementsInterface />
288 | </And>
289 | </Entry.Match>
290 | <Entry.SortBy>
291 | <Access />
292 | <Name />
293 | </Entry.SortBy>
294 | </Entry>
295 | <Entry DisplayName="Events" Priority="100">
296 | <Entry.Match>
297 | <And>
298 | <Kind Is="Event" />
299 | </And>
300 | </Entry.Match>
301 | </Entry>
302 | <Entry DisplayName="Constructors">
303 | <Entry.Match>
304 | <Kind Is="Constructor" />
305 | </Entry.Match>
306 | <Entry.SortBy>
307 | <Static />
308 | <Access />
309 | </Entry.SortBy>
310 | </Entry>
311 | <Entry DisplayName="Interface Methods" Priority="100">
312 | <Entry.Match>
313 | <And>
314 | <Kind Is="Method" />
315 | <ImplementsInterface />
316 | </And>
317 | </Entry.Match>
318 | <Entry.SortBy>
319 | <Access />
320 | <Name />
321 | </Entry.SortBy>
322 | </Entry>
323 | <Entry DisplayName="Other Methods">
324 | <Entry.Match>
325 | <And>
326 | <Kind Is="Method" />
327 | </And>
328 | </Entry.Match>
329 | <Entry.SortBy>
330 | <Access />
331 | <Name />
332 | </Entry.SortBy>
333 | </Entry>
334 | <Entry DisplayName="All other members" />
335 | <Entry DisplayName="Public Enums" Priority="100">
336 | <Entry.Match>
337 | <And>
338 | <Access Is="Public" />
339 | <Kind Is="Enum" />
340 | </And>
341 | </Entry.Match>
342 | <Entry.SortBy>
343 | <Name />
344 | </Entry.SortBy>
345 | </Entry>
346 | <Entry DisplayName="Nested Types">
347 | <Entry.Match>
348 | <Kind Is="Type" />
349 | </Entry.Match>
350 | </Entry>
351 | </TypePattern>
352 | </Patterns>
353 | UseExplicitType
354 | UseExplicitType
355 | UseExplicitType
356 | Copyright
357 | Copyright © $CURRENT_YEAR$, TeamDev. All rights reserved.
358 |
359 | Redistribution and use in source and/or binary forms, with or without
360 | modification, must retain the above copyright notice and the following
361 | disclaimer.
362 |
363 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
364 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
365 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
366 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
367 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
368 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
369 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
370 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
371 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
372 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
373 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
374 | CS
375 | JS
376 | UI
377 | <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
378 | <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb_aaBb" />
379 | <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
380 | C:\Users\anna.dolbina\AppData\Local\JetBrains\Transient\ReSharperPlatformVs15\v09_2c48827c\SolutionCaches
381 | True
382 | C:\Users\anna.dolbina\Projects\DotNetBrowser-2\DotNetBrowser.Development.sln.DotSettings
383 |
384 | True
385 | 1
386 | True
387 | True
388 | True
389 | True
390 | True
391 | True
392 | True
393 | True
394 | True
395 | True
396 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Avalonia WebView
2 |
3 | A demo that shows how to use DotNetBrowser web view in Avalonia UI .
4 |
5 | Works on Windows, macOS, and Linux.
6 |
7 |
8 |
9 |
10 |
11 | ## What is DotNetBrowser
12 |
13 | DotNetBrowser is a cross-platform Chromium-based web view control. Notable features:
14 |
15 | * Embed DotNetBrowser into Avalonia UI, WPF, and WinForms.
16 | * Use DotNetBrowser for automation in server applications and Windows services.
17 | * Advanced printing API.
18 | * Advanced DOM API.
19 | * Call .NET from JavaScript and vice versa.
20 | * and [many others](https://teamdev.com/dotnetbrowser/#features).
21 |
22 | DotNetBrowser subscription comes with professional and confidential support services. All support requests are processed by DotNetBrowser engineers.
23 |
24 | ## Prerequisites
25 |
26 | * .NET 6.0
27 |
28 | ## How to run
29 |
30 | Get a 30-day free trial license for DotNetBrowser by [this link](https://links.teamdev.com/evaluate-dotnetbrowser-ghrm). The license will arrive in your inbox in an instant.
31 |
32 | Then execute this command from the solution directory:
33 |
34 | ```bash
35 | dotnet run --project DotNetBrowser.AvaloniaUi.Demo
36 | ```
37 |
38 | You can also:
39 |
40 |
41 |
42 | ## Credits
43 |
44 | * Thanks to [Avalonia UI team](https://github.com/AvaloniaUI/Avalonia) for the great technology and collaboration.
45 |
--------------------------------------------------------------------------------
/nuget.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamDev-IP/Avalonia-WebView/18ecdf1d95d6e111a930edd41ac069d0f1d0266c/screenshot.png
--------------------------------------------------------------------------------