blazor

How can I change css directly(without variable) in Blazor?

笑着哭i 提交于 2020-12-31 01:27:17
问题 I am using the server-side of Blazor. I want to change the CSS of the body. In Jquery I can write the code like this easily: $("body").css("overflow-y","hidden"); However, with this tutorial(Blazor Change Validation default css class names) said, it seems I can only change the CSS by changing the class name. It is so complex while crossing the component, especially the body is at the top of all the components. I wonder whether there is a way can changes CSS directly in Blazor. Thank you. 回答1:

How to use bind-value and bind-value:event on a custom component Blazor

£可爱£侵袭症+ 提交于 2020-12-30 17:09:57
问题 In Blazor, while using inputs, <input bind-value="@InputValue" bind-value:event="oninput"/> This creates a 2 way binding that updates with the oninput event. I would like to recreate this on a custom component with custom events and custom properties. CustomInput.razor <input value="@Value" oninput="@OnInput" /> @code { [Parameter] public string Value { get; set; } [Parameter] public EventCallback<ChangeEventArgs> OnInput { get; set; } } I want to be able to use it this way. <CustomInput bind

Blazor template with menu across the top

与世无争的帅哥 提交于 2020-12-29 05:44:21
问题 I've created a new blazor app from the VS2019 template which has the menu as a sidebar. I've spent best part of the morning trying to get the menu across the top of the page like the current MVC template but completely failed to get anywhere! Does anyone have a blazor template with the navbar remove from the side and across the top? 回答1: The sidebar in Blazor isn't something special. If you check MainLayout.razor you'll see a reference to a NavMenu component with the sidebar class : <div

Blazor template with menu across the top

早过忘川 提交于 2020-12-29 05:42:16
问题 I've created a new blazor app from the VS2019 template which has the menu as a sidebar. I've spent best part of the morning trying to get the menu across the top of the page like the current MVC template but completely failed to get anywhere! Does anyone have a blazor template with the navbar remove from the side and across the top? 回答1: The sidebar in Blazor isn't something special. If you check MainLayout.razor you'll see a reference to a NavMenu component with the sidebar class : <div

Blazor template with menu across the top

落花浮王杯 提交于 2020-12-29 05:42:05
问题 I've created a new blazor app from the VS2019 template which has the menu as a sidebar. I've spent best part of the morning trying to get the menu across the top of the page like the current MVC template but completely failed to get anywhere! Does anyone have a blazor template with the navbar remove from the side and across the top? 回答1: The sidebar in Blazor isn't something special. If you check MainLayout.razor you'll see a reference to a NavMenu component with the sidebar class : <div

How to set the focus to an InputText element?

半世苍凉 提交于 2020-12-25 10:34:53
问题 Using the example from the Microsoft docs, I'm trying to programmatically set the focus to an input element. Unfortunately, the example uses a standard <input type="text"> whereas I want to use it for an InputText element. The Microsoft example uses an extensions method that takes an ElementReference : public static Task Focus(this ElementReference elementRef, IJSRuntime jsRuntime) { return jsRuntime.InvokeAsync<object>( "exampleJsFunctions.focusElement", elementRef); } Using an InputText , I

.NET Core 3.0及ASP.NET Core 3.0 前瞻

主宰稳场 提交于 2020-12-17 15:48:30
前几天微软发布了 .NET Core 3.0 Preview 9 ,这是.NET Core 3.0 最后一个预览版。 .NET Core 3.0 正式发布将在.NET Conf 上发布,.NET Conf 时间是9月23日至25日。 Visual Studio 2019 16.3预览版3和Visual Studio for Mac 8.3支持.NET Core 3.0 ,这些版本也同时发布。 从.NET Core 3.0 Preview 7就可用于生产,目前dotnet官网就是使用 https://dotnet.microsoft.com/ Powered by .NET Core 3.0.0-preview9-19423-09。 博客园也在前些天升级为.NET Core 3.0 Preview 8,目前运行算是良好。 下面实际体验.NET Core 3.0 新特性。 .NET Core 3.0 System.Text.Json 示例: public class Person { public string FirstName { get; set; } public string LastName { get; set; } public DateTime? BirthDay { get; set; } } //转成对象 string json = ... Person

邀请函|WorkShop报名通道开启,来就送礼!

六月ゝ 毕业季﹏ 提交于 2020-12-17 13:48:38
作为互联网行业的年度盛会 今年除延续以往的开幕与论坛技术分享外 还增设了Work Shop 体验课程! 参加此次工作坊 不仅能近距离和大佬进行互动 体验项目开发的快感 还能领取大会纪念卫衣、书籍等惊喜好礼 是不是很期待? (数量有限先到场先得) 本次 Work Shop 将于2020年12月20日 在苏州人工智能产业园开课 为了帮助大家更深入地了解、知晓 它的活动内容和形式 跟着小编来先睹为快! 看看此次都有哪些精彩内容? 工作坊1:使用 NCF 从 0 到 1 快速模块化开发/部署业务系统实战 工作坊简介: 本次工作坊由盛派开发团队亲自带领开发者使用 NCF(NeuCharFramework) 框架进行系统快速开发,进行现场实操训练,大家可以通过本次活动学习并亲自动手实现: 适合人群: 1、具有 B/S 开发基础的 .NET 开发者 2、希望使用模块化、DDD、低耦合方式开发系统的开发者 3、希望实现系统快速搭建、快速开发、快速部署和迭代的开发者 4、希望参与到开源系统框架项目建设的开发者 参与人员可以和盛派开发团队及 NCF 项目团队进行近距离的 .NET 相关技术交流。 工作坊时间: 09:30 - 17:00(其中 12:30 - 13:30 为午餐及午休时间,组委会提供免费午餐) ✍9:30-12:30 1、5 分钟内完成快速搭建系统管理后台 2、1

.NET Core 3.0 特性初探:C# 8、WPF、Windows Forms、EF Core

天大地大妈咪最大 提交于 2020-12-16 10:29:19
.NET Core 的下一个主要版本最近进入了预览阶段,.NET Core 3.0 将支持使用 Windows Presentation Foundation (WPF)、Windows Forms(WinForms)、Entity Framework (EF)、Blazor、 C# 8 和.NET Standard 2.1 构建桌面应用程序。 .NET Core 的下一个主要版本最近进入了预览阶段,.NET Core 3.0 将支持使用 Windows Presentation Foundation (WPF)、Windows Forms(WinForms)、Entity Framework (EF)、Blazor、 C# 8 和.NETStandard 2.1 构建桌面应用程序。 正如 InfoQ报道的那样,WPF 和 WinForms 最近都在 MIT 许可协议下开源。虽然是.NET Core 3.0 的一部分,但它们目前只能在 Windows 上使用,而且微软似乎也不打算将它们移植到其他平台上,但开源为社区将它们移植到 macOS 和 Linux 上提供了可能。 除了在.NET Core 中增加了对 Windows 桌面应用程序的支持外,新版本还将通过引入Blazor 组件来推进对.NET Core Web 开发的支持。Blazor 是一个开放的基于 Web

Authorise normal Razor Pages in a Blazor WebAssemby App?

感情迁移 提交于 2020-12-15 06:10:50
问题 I am writing an SPA using Blazor Wasm. I have used the standard template and included user accounts hosted in the server which has created a server app as well. This is all fine so far. I would add that I am using .Net5 RC2 but I don't think that is my issue here. I want to have some 'normal' razor pages in the server as well as those in the client app. The user accounts Identity server created the folder structure /Areas/Identity/Pages/.... I have added /Areas/Management/Pages/Admin/Test