You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
N> Syncfusion® Blazor components are available on [nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). See [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) for the list of available packages and component details.
77
81
82
+
N> Ensure that the package `Microsoft.AspNetCore.Components.WebView.WindowsForms` updated to version `8.0.16`.
83
+
78
84
{% endtabcontent %}
79
85
80
86
{% endtabcontents %}
@@ -83,21 +89,17 @@ N> Syncfusion® Blazor components are available on [nuget.org](https://www.nu
83
89
84
90
The WinForms project must target Windows and enable WinForms. A typical project file looks like the following.
85
91
86
-
```csproj
92
+
{% tabs %}
93
+
{% highlight xml tabtitle="WinFormsBlazorHybridApp.csproj" hl_lines="1" %}
87
94
88
95
<ProjectSdk="Microsoft.NET.Sdk.Razor">
89
96
90
-
<PropertyGroup>
91
-
<OutputType>WinExe</OutputType>
92
-
<TargetFramework>net9.0-windows</TargetFramework>
93
-
<Nullable>enable</Nullable>
94
-
<UseWindowsForms>true</UseWindowsForms>
95
-
<ImplicitUsings>enable</ImplicitUsings>
96
-
</PropertyGroup>
97
+
....
97
98
98
99
</Project>
99
100
100
-
```
101
+
{% endhighlight %}
102
+
{% endtabs %}
101
103
102
104
Create a `Component` folder, add an `_Imports.razor` file in it, and include the required component namespaces within that folder.
103
105
@@ -116,8 +118,8 @@ Create a `Component` folder, add an `_Imports.razor` file in it, and include the
116
118
117
119
* Inside wwwroot, create an index.html host page for the Blazor UI. This host page is required by BlazorWebView to initialize the Blazor runtime and load static assets (themes and scripts). A basic index.html might look like the following:
118
120
119
-
120
-
```html
121
+
{% tabs %}
122
+
{% highlight html tabtitle="wwwroot/index.html" hl_lines="8 13" %}
121
123
122
124
<!DOCTYPE html>
123
125
<html>
@@ -135,8 +137,10 @@ Create a `Component` folder, add an `_Imports.razor` file in it, and include the
135
137
</body>
136
138
</html>
137
139
140
+
{% endhighlight %}
141
+
{% endtabs %}
138
142
139
-
```
143
+
N> Ensure that the smart pdfviewer static assets (themes and scripts) are loaded properly.
N> Ensure that the package `Microsoft.AspNetCore.Components.WebView.Wpf` updated to version `8.0.16`.
35
+
36
+

37
+
34
38
{% endtabcontent %}
35
39
36
40
{% tabcontent Visual Studio Code %}
@@ -74,6 +78,8 @@ dotnet restore
74
78
75
79
N> Syncfusion® Blazor components are available on [nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). See [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) for the list of available packages and component details.
76
80
81
+
N> Ensure that the package `Microsoft.AspNetCore.Components.WebView.Wpf` updated to version `8.0.16`.
82
+
77
83
{% endtabcontent %}
78
84
79
85
{% endtabcontents %}
@@ -82,21 +88,17 @@ N> Syncfusion® Blazor components are available on [nuget.org](https://www.nu
82
88
83
89
The WPF project must target Windows and enable WPF. A typical project file looks like the following.
84
90
85
-
```csproj
91
+
{% tabs %}
92
+
{% highlight xml tabtitle="WPFBlazorHybridApp.csproj" hl_lines="1" %}
86
93
87
94
<ProjectSdk="Microsoft.NET.Sdk.Razor">
88
95
89
-
<PropertyGroup>
90
-
<OutputType>WinExe</OutputType>
91
-
<TargetFramework>net9.0-windows</TargetFramework>
92
-
<Nullable>enable</Nullable>
93
-
<ImplicitUsings>enable</ImplicitUsings>
94
-
<UseWPF>true</UseWPF>
95
-
</PropertyGroup>
96
+
....
96
97
97
98
</Project>
98
99
99
-
```
100
+
{% endhighlight %}
101
+
{% endtabs %}
100
102
101
103
Create an `_Imports.razor` and add the component namespace
@@ -198,14 +183,14 @@ For **Azure OpenAI**, first [deploy an Azure OpenAI Service resource and model](
198
183
199
184
* Inside wwwroot, create an index.html host page for the Blazor UI. This host page is required by BlazorWebView to initialize the Blazor runtime and load static assets (themes and scripts). A basic index.html might look like the following:
200
185
201
-
202
-
```html
186
+
{% tabs %}
187
+
{% highlight html tabtitle="wwwroot/index.html" hl_lines="8 13" %}
@@ -217,7 +202,10 @@ For **Azure OpenAI**, first [deploy an Azure OpenAI Service resource and model](
217
202
</body>
218
203
</html>
219
204
220
-
```
205
+
{% endhighlight %}
206
+
{% endtabs %}
207
+
208
+
N> Ensure that the smart pdfviewer static assets (themes and scripts) are loaded properly.
221
209
222
210
## Adding Blazor Smart PDF Viewer component
223
211
@@ -240,15 +228,13 @@ Create a Razor component (for example, Main.razor) in the project and add the Sy
240
228
* Add the Microsoft.AspNetCore.Components.WebView.Wpf namespace.
241
229
* Embed the BlazorWebView control, set HostPage to wwwroot/index.html, and map a RootComponent that matches the Razor component type and the selector in index.html (#app).
0 commit comments