syncfusion 相关问题

Syncfusion,Inc。成立于2001年,为Microsoft .NET平台提供广泛的企业级软件组件和工具。 Syncfusion还支持各种平台,如:Angular,jQuery,Xamrin等。更多信息请访问:https://www.syncfusion.com/

使用 BoolToObjectConverter 设置 Color 属性

我想通过布尔属性 IsCurrentPage 设置背景颜色。 我使用社区工具包 BoolToObjectConverter ,如下所示: 我想通过布尔属性IsCurrentPage设置背景颜色。 我使用社区工具包BoolToObjectConverter,就像这样: <ResourceDictionary> <toolkit:BoolToObjectConverter x:Key="BoolToColorConverter" TrueObject="Colors.Red" FalseObject="Colors.Blue"/> </ResourceDictionary> 在我的实现中,它看起来是这样的: <syncfusion:SfChip Text="{Binding IsCurrentPage, Converter={StaticResource BoolToColorConverter}}" BackgroundColor="{Binding IsCurrentPage, Converter={StaticResource BoolToColorConverter}}" TextColor="Black"/> 按钮上的文字正确。 (例如“颜色.红色”) 但背景颜色始终为白色(默认)。 我也尝试了“红色”而不是“Colors.Red”。 为什么背景颜色设置不正确? 您正在传递 "Colors.Red" 和 "Colors.Blue",它们属于 string 类型,而不是本例中的 Color 对象。 为了传递 Colors.Red 和 Colors.Blue 对象,请尝试以下操作: <ResourceDictionary> <toolkit:BoolToObjectConverter x:Key="BoolToColorConverter" TrueObject="{x:Static Colors.Red}" FalseObject="{x:Static Colors.Blue}"/> </ResourceDictionary> 替代方案: <ResourceDictionary> <toolkit:BoolToObjectConverter x:Key="BoolToColorConverter"> <toolkit:BoolToObjectConverter.TrueObject> <Color>Red</Color> </toolkit:BoolToObjectConverter.TrueObject> <toolkit:BoolToObjectConverter.FalseObject> <Color>Blue</Color> </toolkit:BoolToObjectConverter.FalseObject> </toolkit:BoolToObjectConverter> </ResourceDictionary>

回答 1 投票 0

在 Linqpad 中使用 SyncFusion Blazor 图表

有什么方法可以在 Linqpad 中使用 SyncFusion Blazor 图表吗?我使用 Linqpad 制作快速演示/PoC,然后在经过验证后将其转移到 Blazor。想用图表来做到这一点。

回答 0 投票 0

React:PDF 查看器重新渲染太多,数据结束未定义

我想并排显示 2 个文件,以便在 SyncFusion 的 2 个 TabComponent 中比较它们。 这些文件以 base64 编码,它们可以有多种类型:XML、PNG、PDF 等。 对于每种类型,我都有办法......

回答 1 投票 0

Syncfusion SfButton 单击动画在 Android 和 iOS 设备中不起作用

SfButton ControlTemplate 初始化不显示 Android 和 iOS 设备中的按钮按下动画。 我有一个 Xamarin.Forms 应用程序,我正在使用

回答 0 投票 0

React 中的同步融合图表宽度问题

我们在 React 项目的同步融合图表中使用如果我们使用侧边栏折叠然后没有折叠关闭图表显示运行良好但如果我们在图表上折叠显示右侧的一些额外空间。这个宽度...

回答 0 投票 0

带线的堆积柱形条

是否可以用 2 线图显示堆叠列? 在与堆叠柱形图和折线图的组合进行交互时,是否可以显示每个折线图的变化,因为我们隐藏了政变...

回答 2 投票 0

如何将此 DataTemplate 移动到单独的 XAML 文件并使命令在 .NET MAUI 上运行?

我目前在 .NET MAUI 应用程序中有一个带有 Syncfusion 控件的页面,这是 XAML: 我目前在 .NET MAUI 应用程序中有一个带有 Syncfusion 控件的页面,这是 XAML: <ContentPage x:Class="MyProject.SchedulePage" xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:schedule="clr-namespace:Syncfusion.Maui.Scheduler;assembly=Syncfusion.Maui.Scheduler" x:Name="schedulePage" Title="Agenda" Shell.FlyoutBehavior="Disabled" Shell.NavBarIsVisible="{OnPlatform iOS='True', Default='False'}"> <ContentPage.Resources> <DataTemplate x:Key="AppointmentTemplate"> <StackLayout Background="MediumPurple"> <Label FontFamily="Bold" HorizontalOptions="CenterAndExpand" Text="{Binding Subject}" TextColor="White" VerticalOptions="CenterAndExpand" /> <StackLayout.GestureRecognizers> <TapGestureRecognizer Command="{Binding Path=BindingContext.AppointmentTappedCommand, Source={Reference professionalScheduler}}" CommandParameter="{Binding .}" /> </StackLayout.GestureRecognizers> </StackLayout> </DataTemplate> </ContentPage.Resources> <StackLayout> <schedule:SfScheduler x:Name="professionalScheduler" AllowViewNavigation="True" AppointmentsSource="{Binding Events}" DisplayDate="{Binding DisplayDate}" ShowNavigationArrows="False" ShowWeekNumber="False" VerticalOptions="FillAndExpand" View="Day"> <schedule:SfScheduler.DaysView> <schedule:SchedulerDaysView AppointmentTemplate="{StaticResource AppointmentTemplate}" EndHour="22" MinimumAppointmentDuration="0:30:0" StartHour="8" TimeFormat="HH:mm" TimeRegions="{Binding Regions}" /> </schedule:SfScheduler.DaysView> </schedule:SfScheduler> </StackLayout> </ContentPage> 这是我的视图模型: namespace MyProject.ViewModels { public class ScheduleViewModel : BaseViewModel { public ObservableCollection<SchedulerAppointment> Events { get; set; } = new ObservableCollection<SchedulerAppointment>(); public ICommand AppointmentTappedCommand { get; } public ScheduleViewModel(IAppointmentsService bookingsService) { AppointmentTappedCommand = new Command<SchedulerAppointment>(async (appointment) => await OnAppointmentTappedCommand(appointment)); } private async Task OnAppointmentTappedCommand(SchedulerAppointment appointment) { await Shell.Current.DisplayAlert("Appointment", $"{appointment.Id} - {appointment.Subject} - {appointment.StartTime} - {appointment.EndTime}", "OK"); } } } 当我点击我的调度程序上的一个项目时,我会在我的AppointmentTappedCommand上触发ViewModel并看到DisplayAlert. 然而,当我尝试将 DataTemplate 移动到另一个文件时,模板继续工作,Subject 仍然正确绑定到数据上下文,但我的 AppointmentTappedCommand 停止工作。这是带有 DataTemplate 的 XAML 文件: <ContentView x:Class="MyProject.Templates.Scheduler.AppointmentTemplate" xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Name="appointmentTemplate"> <StackLayout Background="MediumPurple"> <Label FontFamily="Bold" HorizontalOptions="CenterAndExpand" Text="{Binding Subject}" TextColor="White" VerticalOptions="CenterAndExpand" /> <StackLayout.GestureRecognizers> <TapGestureRecognizer Command="{Binding Path=BindingContext.AppointmentTappedCommand, Source={Reference professionalScheduler}}" CommandParameter="{Binding .}" /> </StackLayout.GestureRecognizers> </StackLayout> </ContentView> 即使我在另一个文件上有模板,我怎样才能让命令继续工作? 我们建议您使用 Tapped 事件来实现您的要求,而不是示例中的 TapGestureRecognizer。请参考以下步骤‘如何在SfScheduler中使用Tapped事件进行命令’。 Step1:安装Community.Toolkit.Maui,在MauiProgram.cs中添加UseMauiCommunityToolkit public static MauiApp CreateMauiApp() { var builder = MauiApp.CreateBuilder(); builder.ConfigureSyncfusionCore(); builder.UseMauiApp<App>().UseMauiCommunityToolkit(); builder .UseMauiApp<App>() .ConfigureFonts(fonts => { fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); }); return builder.Build(); } 第二步:在viewmodel中添加命令 public ICommand AppointmentTappedCommand { get; set; } public SchedulerViewModel() { this.GenerateAppointments(); this.DisplayDate = DateTime.Now.Date.AddHours(8).AddMinutes(50); AppointmentTappedCommand = new Command<SchedulerTappedEventArgs>(async (appointment) => await OnAppointmentTappedCommand(appointment)); } private async Task OnAppointmentTappedCommand(SchedulerTappedEventArgs obj) { if (obj != null && obj.Element == SchedulerElement.Appointment && obj.Appointments[0] is SchedulerAppointment appointment) { await Shell.Current.DisplayAlert("Appointment", $"{appointment.Id} - {appointment.Subject} - {appointment.StartTime} - {appointment.EndTime}", "OK"); } } 第 3 步:在 MainPage.xaml 中 <scheduler:SfScheduler x:Name="Scheduler" View="Week" DisplayDate="{Binding DisplayDate}" AppointmentsSource="{Binding Events}" AllowedViews="Day,Week,WorkWeek,Month,TimelineDay,TimelineWeek,TimelineWorkWeek,TimelineMonth"> <scheduler:SfScheduler.DaysView> <scheduler:SchedulerDaysView> <scheduler:SchedulerDaysView.AppointmentTemplate> <DataTemplate> <local:AppointmentTemplate/> </DataTemplate> </scheduler:SchedulerDaysView.AppointmentTemplate> </scheduler:SchedulerDaysView> </scheduler:SfScheduler.DaysView> <scheduler:SfScheduler.Behaviors> <toolkit:EventToCommandBehavior EventName="Tapped" Command="{Binding AppointmentTappedCommand}" /> </scheduler:SfScheduler.Behaviors> </scheduler:SfScheduler> 如果您有任何疑虑,请告诉我们。

回答 1 投票 0

如何在Flutter Calendar的另一页显示点击的约会详情

所以我一直在做一个项目,想做一个日历应用程序。我一直在使用名为 Syncfusion Calendar 的 flutter 插件。我在显示约会时遇到问题(几个月...

回答 1 投票 0

Blazor 未呈现更新 SfCircularGauge

我有一个带有 SfCircularGauge 组件的 blazor 页面绑定到 Field Temp。 Temp 的填充是由反应性订阅者进行的。 SfCircularGauge 没有更新。 我错过了什么? @代码 { 私人

回答 0 投票 0

Web 上的 Flutter Sfcalendar 月视图 - 当鼠标悬停在单元格上时如何更改鼠标光标

我在 SfCalendar 和 SfCalendar(monthCellBuilder 本身)中尝试了 MouseRegion,但它不起作用。 MouseRegion 甚至不检测鼠标事件。如何更改悬停月份单元格上的光标?

回答 0 投票 0

为什么当我使用 setRowData 时它会显示这种问题(不读取未定义的属性(读取“替换”))

this.wireStatus.push(this.wireStatus2); this.grid.setRowData(this.wireStatus2['status'], this.wireStatus2); 期望改变状态从On变为off和off变为On时

回答 1 投票 0

如何在 flutter 中为 Sfslider trackShape 提供填充?

正如你在这张照片中看到的 这张照片 正如您在图片中看到的那样,分隔线连接到轨道形状的角上,我希望它们稍微分开和留出空间。 我的代码是: @爱...

回答 0 投票 0

将数据从异步函数传递给 futurebuilder

这是我第一次使用异步函数来 更新构建器中的数据。所以,我对此有点挣扎。 如此处所示,我想获取新的转换地址 在两个印刷品上,但第一个......

回答 0 投票 0

Syncfusion Maui sfCalendar SpecialDayPredicate

我想在 .Net Maui 的 Syncfusion sfCalendar 中使用 SpecialDates,但是它不起作用,它告诉我使用 SpecialDayPredicate。我已经尝试使用它一段时间了,但我

回答 0 投票 0

Syncfusion 社区许可证不适用于 syncfusion 文件管理器

当我们使用“Essential Studio Enterprise Edition - Community license”时,它不适用于 synfusion 文件管理器, 它以前工作过

回答 1 投票 0

*.Designer.vb 文件自动更改为包含错误“只有成员访问表达式才能启动调用语句”的行。

我有一个 vb.net 应用程序,我在其中将 RibbonControlAdv 的 Dock 属性从 TopMost(不知道这是一个有效值)更改为 Top。 当我保存项目时,它显然在做...

回答 0 投票 0

我的应用程序在打开使用 syncfusion_flutter_pdfviewer 的页面时遇到错误

我想使用 syncfusion_flutter_pdfviewer 包显示 PDF。 这是我所做的步骤。 创建包含 syncfusion_flutter_pdfviewer 的页面。 然后,我在...上运行应用程序

回答 1 投票 0

使用 SfListView 自定义分组标题

我需要对项目进行分组,分组将从 Catalog 属性完成,然后我必须有一个自定义标题,其中包含一些包含这些项目的信息,例如: 总人数...

回答 0 投票 0

在 Syncfusion Blazor 地图中自定义多边形的背景

是否可以在 Syncfusion Blazor 地图中自定义多边形的背景,如屏幕截图所示:

回答 1 投票 0

Syncfusion Flutter Calendar 添加自己的约会

对于了解基本状态管理的人来说,这可能很简单。 我可能不必熟悉 Syncfusion Flutter Calendar 就知道这一点。 我基本上希望用户添加自己的约会...

回答 1 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.