腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
视频
沙龙
3
回答
Datagrid.IsSelected绑定和滚动
c#
、
wpf
、
mvvm
、
datagrid
、
selected
我使用MVVM,并使用一些代码将datagrid绑定到集合: <DataGrid ItemsSource="{Binding Entites}" AutoGenerateColumns="False" IsSynchronizedWithCurrentItem="True" SelectedItem="{Binding SelectedEntity}"> 我也使用样式(RowStyle或ItemContainerStyle)绑定到IsSelectedProperty <Dat
浏览 0
提问于2011-06-22
得票数 14
1
回答
WPF DataGrid嵌套带-删除先前选定的行颜色
c#
、
wpf
、
xaml
、
datagrid
我有一个带带的WPF DataGrid,如果您选择最上面的波段,行将变成蓝色以表示它是selectedRow (默认情况下)。但是,当用户然后从第二个波段选择一行时,我希望顶部的蓝色消失,因为这意味着很难识别您在层次结构中选择的行。 这是通过XAML或C#实现的吗? 通过XAML,我可以在每个波段上使用类似的东西(RowDetailsTemplate) <DataGrid.RowStyle> <Style TargetType="DataGridRow"> <Style.Triggers> &
浏览 4
提问于2014-08-15
得票数 0
3
回答
如何动态添加devexpress数据网格中的列
c#
、
.net
、
winforms
、
devexpress
我正在使用devexpress winforms网格。 我将数据集中的数据绑定到devexpress网格。 dataGrid.MainView.GridControl.DataSource = ds; dataGrid.MainView = gridView; gridView.BestFitColumns(); 网格显示应该是这样的 FirstName LastName Sharp Eye 我调用RowStyle事件来根据条件显示网格中行的背景色。 前任: private void gridViewExcel_RowStyle(object sender, De
浏览 7
提问于2013-10-09
得票数 0
回答已采纳
1
回答
单击WPF DataGrid中的按钮时,无法在Caliburn.Micro中选择全部
c#
、
wpf
、
mvvm
、
datagrid
、
caliburn.micro
我试图弄清楚如何使用bind ( button )来使用MVVM(Caliburn.Micro)来选择DataGrid中的所有rows(项)。 我希望这个按钮与DataGrid本身分开。 类似于: 查看: <Button x:Name="SelectAll"/> <DataGrid x:Name="People"> <DataGrid.RowStyle> <Style> <Setter Property="DataGridRow.IsSelected
浏览 4
提问于2020-05-11
得票数 2
回答已采纳
1
回答
加载xml/xaml并定义键绑定
c#
、
wpf
、
mvvm
这是我的xaml的一部分: <DataGrid ItemsSource="{Binding listImages, UpdateSourceTrigger=PropertyChanged}" AutoGenerateColumns="False" Name="dataGrid1" Height="341" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="10,10,10,0" Width=
浏览 1
提问于2012-09-05
得票数 0
回答已采纳
1
回答
单击DataGrid中的行没有选择它
wpf
、
wpfdatagrid
黑色背景细胞。灰色背景排。蓝色背景-选定的行。 如果我单击行,它将不会被选中。但是,如果单击单元格,将正确选择行。 <Window x:Class="Test021000.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schem
浏览 3
提问于2017-02-10
得票数 8
回答已采纳
1
回答
当出现以下情况时,DataGrid.SelectedIndex的行为如何?
wpf
、
datagrid
我有一个带多选的WPF数据网格(SelectedMode = Extended)。每个项的每个都有一个IsSelected绑定 <DataGrid ItemsSource="{Binding Items}" SelectionUnit="FullRow" SelectionMode="Extended" SelectedIndex="{Binding SelectedIndex}" SelectedItem="{Binding SelectedItem}"> <DataGrid.RowS
浏览 0
提问于2012-11-21
得票数 1
回答已采纳
4
回答
有没有好的工具可以在运行时调试XAML的数据绑定行为/错误?
.net
、
wpf
、
xaml
WPF是一个很棒的工具集,XAML数据绑定非常强大,但我经常遇到它的透明性带来的困难:在没有抛出错误的情况下调试数据绑定故障可能很困难。 例如,我最近不得不更改Style声明,如下所示: <DataGrid.RowStyle> <Style> <Style.Triggers> <DataTrigger Binding="{Binding TestProperty}" Value="False"> <Setter Property=
浏览 1
提问于2010-10-27
得票数 29
回答已采纳
2
回答
为什么有两种不同类型的DataGridRow高亮颜色,为什么我不能同时控制这两种颜色?
c#
、
wpf
、
datagrid
我在WPF中有一个DataGrid,它的SelectedIndex字段绑定到我的视图模型中的适当属性。当窗口打开时,我可以看到与未选中的行相比,选中的行略显为灰色。如果用户单击该行,该行将变为蓝色阴影。 这是一个问题的原因是因为我似乎只能设置由用户单击高亮显示的行的背景颜色,而不是通过以编程方式更改的所选索引。我尝试过以下类型的样式,但它们只影响单击的行的背景色,而不影响SelectedIndex设置的行的背景色: 示例1: <DataGrid.RowStyle> <Style TargetType="{x:Ty
浏览 0
提问于2013-12-21
得票数 0
1
回答
Access DataGrid.RowStyle in AttachedProperty
c#
、
wpf
、
xaml
、
attached-properties
XAML: <DataGrid ItemsSource="{Binding Source={StaticResource Lines}}" uiwpf:DataGridExtensions.CanExportToExcel="True"> <DataGrid.RowStyle> <Style TargetType="DataGridRow"> <Setter Property="Cont
浏览 1
提问于2019-03-18
得票数 1
回答已采纳
2
回答
嵌套数据网格工作
c#
、
wpf
、
wpfdatagrid
嗨,Iam使用了一个嵌套的数据集,下面是它的定义,这是输出的屏幕截图, 在上面的图片中,我有两个数据。如果单击任何外部网格行,则会显示相应的内部网格。现在,Iam不知道如何处理该事件并显示相应的内部网格数据。 这是Iam将数据绑定到的类结构, class MyClass { public string Col1{ get; set; } public string Col2{ get; set; } public string Col3{ get; set; } public string Col4{ get;
浏览 2
提问于2014-01-15
得票数 1
回答已采纳
1
回答
斑纹外观:列表中交替的线条(无悬停)
react-admin
如图所示,应该使用rowStyle。列表中的线条应该交替着色。这也可以,但不再显示悬停颜色:-( const postRowStyle = (record, index) => ({ backgroundColor: index % 2 ? "#cdcdcd" : "" }); export const PostList = (props) => ( <List {...props}> <Datagrid rowStyle={postRowStyle}> ...
浏览 17
提问于2020-02-14
得票数 0
1
回答
应用行样式时,wpf datagrid中的编码UI测试无法识别单元格和行
wpf
、
.net-4.0
、
wpfdatagrid
、
coded-ui-tests
在WPF Datagrid中,如果使用行样式,则不会检测网格行。如果我删除行样式,它会正确地检测单元格和行。 <DataGrid Grid.Row="1" x:Name="c_dataGrid" ItemsSource="{Binding DataSource}" AutoGenerateColumns="True" RowStyle="{StaticResource rowStyle}"> <DataGrid.ItemContainerStyle&g
浏览 1
提问于2011-11-25
得票数 1
1
回答
无法转换MS.Internal.NamedObject
c#
、
wpf
、
data-binding
<DataGrid x:Name="DisplayRecipeGrid" AutoGenerateColumns="False" CanUserAddRows="false" ItemsSource="{Binding ModuleRecipeCatalog}" VerticalContentAlignment="Center" IsReadOnly="True"> <!---->
浏览 1
提问于2017-02-13
得票数 2
回答已采纳
1
回答
基于DataTrigger与DataGrid绑定的单元格值的DataView
c#
、
wpf
、
xaml
、
datagrid
我试图根据其中一个单元格的当前值更改DataGrid中行的背景。我的研究使我得出这样的结论:您可以使用DataTrigger来完成这个任务,但我似乎无法编写不会出错的绑定表达式。 本节的XAML如下: <DataGrid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{Binding TodaysBets}" ColumnWidth="*" CanUserAddRows="False" AutoGenerateCol
浏览 2
提问于2014-01-09
得票数 1
回答已采纳
2
回答
使WPF触发器使用任何属性
c#
、
wpf
、
properties
、
datagrid
、
styles
我使用Datagrid。其中我放了一个Area列表,如下所示: ObservableCollection<Area> areas = new ObservableCollection<Area>(); ... datagrid.ItemsSource = areas; 现在,我想根据Area的属性设置行的样式。 <DataGrid.RowStyle> <Style TargetType="DataGridRow"> <Style.Triggers> <!-- Compiler
浏览 1
提问于2012-04-09
得票数 1
回答已采纳
1
回答
如何使DataGrid作为一个整体在焦点遍历和箭头键行选择单站?
c#
、
wpf
、
datagrid
、
focus
、
tabstop
我有一个Window,上面几乎没有控件。其中一个是DataGrid。我想实现一些非默认的焦点遍历。即: DataGrid是一个整体的单站,而不是每一行。 当DataGrid聚焦时,用户可以使用上下键在行中导航。 不允许使用左右键在列中导航。 第一列(也是唯一与导航相关的列)是DataGridHyperlinkColumn类型的。当用户点击空格或输入键时,它将执行超链接。 目前,我有以下代码: <DataGrid x:Name="DocumentTemplatesGrid" Grid.Row="2"
浏览 0
提问于2016-10-29
得票数 5
回答已采纳
1
回答
WPF Datagrid.Row AlternationIndex MultiTrigger属性和视图模型
wpf
、
properties
、
binding
、
multitrigger
我想知道为什么这个不起作用: <DataGrid AlternationCount="2"... <DataGrid.RowStyle> <Style TargetType="{x:Type DataGridRow}"> <Style.Triggers> <MultiTrigger> <MultiTrigger.Conditions> <Condition Binding="{Binding Al
浏览 7
提问于2018-04-03
得票数 0
1
回答
WPF DataGrid在条件下隐藏行会导致应用程序没有响应
c#
、
wpf
、
datagrid
、
async-await
我有一个绑定到DataGrid的ObservableCollection。基于条件,任何给定的行都应该被隐藏。这可以由用户打开或关闭。问题是,当DataGrid中有大量行时,隐藏行和非隐藏行可能会使应用程序在一段时间内没有响应。 我正在用像这样的DataGrid.RowStyle做隐藏/不隐藏; <DataGrid.RowStyle> <Style TargetType="DataGridRow"> <Setter Property="Visibility" Value="Visible"/>
浏览 2
提问于2015-10-13
得票数 1
回答已采纳
1
回答
如何将parents属性绑定到子元素数据模板
wpf
、
binding
、
datagrid
、
datatemplate
、
multidatatrigger
如果DataGrids通过转换器子级,我需要将DataGrid的RowStyle属性绑定到可见性。问题是,子对象存在于DataTemplate中。我下面的代码是我现在正在做的事情的一个简化版本,所以它可能没有多大意义。但不管怎样: <DataGrid Name="dataGrid" ItemsSource="{Binding Path=ListOfData}" RowStyle="{StaticResource DataGridRowStyle}" >
浏览 0
提问于2012-07-20
得票数 1
回答已采纳
2
回答
使第0列在datagrid粗体中
c#
、
wpf
、
xaml
我正在将datatable绑定到数据集,并将AutoGenerateColumns设置为true。现在,我希望第0栏中的文本是粗体的。我该怎么做呢。请帮帮忙。我指的是这个帖子,但它展示了如何获得行,但我想得到第0列。我可以这样做,但它改变了所有单元格的字体。我只想要第0列粗体。 <DataGrid.CellStyle> <Style TargetType="{x:Type DataGridCell}"> <Style.Setters>
浏览 1
提问于2019-01-31
得票数 1
回答已采纳
2
回答
DataGrid、AlternatingRowBackground和RowStyle优先级
wpf
、
wpfdatagrid
如何使我的RowStyle在AlternatingRowBackground之后申请?我希望具有IsOrange作为true的项具有Orange背景,而不考虑行背景的交替,这不是目前的情况。 XAML: <DataGrid Name="g" AlternatingRowBackground="Blue" AlternationCount="2" ... SelectionMode="Single"> <DataGrid.RowStyle> <
浏览 0
提问于2012-12-17
得票数 10
回答已采纳
3
回答
我可以使一个WPF DataGridRow不可选吗?
wpf
、
datagrid
、
triggers
、
styles
我在我的数据网格上有一个样式来禁用基于属性绑定的DataGridRow。这使得行不可选,这正是我想要的。但是,我仍然可以使用至少两种其他方法来选择禁用的行。第一种情况是,如果我在禁用行周围的两个启用的行之间使用拖动运动。第二种情况是单击数据网格左上角的"select all“按钮。有没有办法让特定的行完全不可选? 这是我目前所拥有的: <DataGrid.RowStyle> <Style TargetType="{x:Type DataGridRow}"> <Style.Triggers>
浏览 2
提问于2011-08-25
得票数 3
1
回答
如何绑定控件中行的颜色:通过绑定UWP C#中该行中的列的值来绑定DataGrid?
c#
、
uwp
、
uwp-xaml
对于列行中的特定值,如何在UWP C#>中更改行背景色。 我使用controls:DataGrid在UWP中显示DataTable的值。我试图根据DataTable的" color“列中的值绑定行的颜色。如果"Color“列是一行的”红色“,则必须设置行背景”红色“,否则设置为绿色。 <controls:DataGrid.RowStyle> <Style TargetType="controls:DataGridRow"> <Setter Property="Background" Va
浏览 3
提问于2019-08-28
得票数 3
回答已采纳
2
回答
在WPF C#中的DataGrid上的行级ContextMenu中未执行命令
c#
、
wpf
、
datagrid
我像这样声明了我的模板- <DataGrid.Resources> <ContextMenu x:Key="RowMenu" DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}"> <MenuItem Header="Remove" Command="{Binding Cancel}" /> </ContextMenu> &
浏览 2
提问于2012-05-20
得票数 0
1
回答
用DataGridRow设计声明DatagridTemplateColumn事件处理程序?
wpf
、
xaml
、
datagrid
我正在寻找以下信息:我想在我的datagrid的xaml中声明一个DataGridRow元素的事件处理程序。这样,我就能够区分使用NewItemPlaceHolder项单击行并单独处理它。 但我并不知道如何将其插入到下面的xaml中,在xaml中,我的数据内容是用DataGridTemplateColumns定义的。谢谢你的暗示。 <DataGrid [...]> <DataGrid.Resources> <DataTemplate x:Key="IsEditingTemplate">
浏览 0
提问于2013-11-29
得票数 2
回答已采纳
2
回答
WPF Datagrid.RowStyle梯度背景
c#
、
wpf
、
datagrid
我想改变数据的行背景从一个坚实的颜色到渐变。有什么想法吗? 目前的代码是: <DataGrid.RowStyle> <Style TargetType="DataGridRow"> <Style.Triggers> <DataTrigger Binding="{Binding GSRowBackground}" Value="0"> <Setter Property="Background" Value="White"></Set
浏览 3
提问于2016-09-28
得票数 0
回答已采纳
1
回答
基于单元格包含值WPF的DataGrid行背景
wpf
、
data-binding
、
wpfdatagrid
是否可以根据单元格的内容更改DataGrid行的背景颜色?例如,单元格值包含"!“ <DataGrid.RowStyle> <Style TargetType="DataGridRow"> <Style.Triggers> <DataTrigger Binding="{Binding Opis}" Value<!-- contains-->="!"> <Setter P
浏览 0
提问于2018-08-27
得票数 0
1
回答
为什么DataGridComboBoxColumn不会产生任何结果,DataGridTemplateColumn和ComboBox在哪里产生结果呢?
c#
、
wpf
、
datagrid
、
datagridtemplatecolumn
、
datagridcomboboxcolumn
如果I AutoGenerate列在DataGrid中,数组和集合项不会自动变成DataGridComboBoxColumn,或者它们看起来不是. 此代码: <DataGrid x:Name="dataGrid" Grid.Row="1" ItemsSource="{Binding SrcCollection}" AutoGenerateColumns="False" SelectionMode="Single" AlternatingRowBackground="{DynamicRes
浏览 2
提问于2014-08-09
得票数 1
回答已采纳
1
回答
从DataRow第N列分配DataGridRow.Header值
c#
、
wpf
、
xaml
、
datagrid
我有一个DataTable Dt作为我的DataGrid的ItemsSource,我想知道是否有任何方法可以将第N列的单元格值绑定到每个DataGridRow.Header <DataGrid ItemsSource="{Binding Dt}"> <DataGrid.RowStyle> <Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}"> <!--
浏览 11
提问于2019-05-24
得票数 0
回答已采纳
1
回答
在C#/WPF的DataGrid中单击复选框的最简单方法
c#
、
wpf
、
datagrid
<DataGrid x:Name="dataGridShortcuts" AutoGenerateColumns="False" AlternationCount="2" AlternatingRowBackground="#FFADB5B9" Margin="0,0,0,47"> <DataGrid.Columns> <DataGridTextColumn IsReadOnly="True" Binding="{
浏览 2
提问于2015-05-07
得票数 0
2
回答
如何在DataTrigger中设置DataGrid线条颜色?
c#
、
wpf
、
datagrid
、
wpfdatagrid
、
gridlines
如何通过DataTrigger为DataGrid中的某些行设置不同的网格线颜色? 我试过这个: <DataGrid ...> <DataGrid.RowStyle> <Style TargetType="DataGridRow"> <Style.Triggers> <DataTrigger Binding="{Binding in_stock, Converter={conv:LessThan 4}
浏览 6
提问于2017-08-18
得票数 0
回答已采纳
1
回答
如何在Silverlight中将数据绑定到DataTrigger
c#
、
silverlight
、
binding
、
datagrid
、
datatrigger
我喜欢填充Silverlight DataGrid grdActivities.ItemsSource = items; XAML <datagrid:DataGrid x:Name="grdActivities" AutoGenerateColumns="False"> <sdk:DataGrid.RowStyle> <Style TargetType="sdk:DataGridRow"> <iv:Interaction.Triggers>
浏览 11
提问于2014-04-21
得票数 0
回答已采纳
1
回答
获取DataGrid的DataContext以在上下文菜单中使用它
c#
、
wpf
、
data-binding
嗨,我有一个关于如何在以下情况下将datagrid datacontext绑定到上下文菜单datacontext的问题: <DataGrid DataContext="{Binding someDataContext}" ItemsSource="{Binding items}"> <DataGrid.Resources> <ContextMenu x:Key="LocalViewerMenu" DataContext="{
浏览 0
提问于2012-11-19
得票数 0
回答已采纳
1
回答
防止单元格级制表符,但仍允许行在WPF DataGrid中设置制表。
c#
、
wpf
、
datagrid
我希望防止单个单元格上的制表,但允许行级制表。 我想我可以用CellStyle来禁用所有单元格上的IsTabStop <DataGrid.CellStyle> <Style TargetType="DataGridCell"> <Setter Property="BorderThickness" Value="0"/> <Setter Property="IsTabStop" Value="false"/> </S
浏览 2
提问于2012-05-19
得票数 3
1
回答
如何消除DataGrid行的3d效果
c#
、
wpf
、
datagrid
默认情况下,DataGrid行具有某种3d视觉效果。它们看起来像是移到了左上角。 ? 如何消除这种影响,并使行看起来平坦而不移动? 我尝试过更改CellStyle和RowStyle的BorderThickness,但都没有解决问题。 <DataGrid.CellStyle> <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> <Setter Property="Backgroun
浏览 9
提问于2019-08-26
得票数 1
1
回答
WPF DataGrid与现有RowStyle的行特定上下文菜单
c#
、
wpf
、
datagrid
、
contextmenu
我试图将上下文菜单添加到我的WPF数据集中,因为它的项需要依赖于该行的DataContext。例如,如果我知道该行没有被编辑,"Save“可能会被禁用。 我正在研究的公认答案,并试图使其适应我正在使用的现有的xaml,但我不知道如何在现有的RowStyle之上使用这个解决方案。 如果我复制并粘贴上下文菜单代码,一切都可以工作,但对于RowStyle,我已经有了如下内容: <DataGrid.RowStyle> <Style TargetType="{x:Type DataGridRow}"> <Style.Triggers
浏览 1
提问于2014-05-19
得票数 0
回答已采纳
1
回答
DataGrid行选择触发器
c#
、
wpf
、
datagrid
我有隐藏按钮的数据网格,如何使用Style.Triggers在行选择后使行中的按钮可见? <Grid> <DataGrid ItemsSource="{Binding Items}"> <DataGrid.RowStyle> <Style TargetType="DataGridRow"> <Style.Triggers> <Trigger Property="I
浏览 2
提问于2015-09-28
得票数 0
1
回答
C# - WPF -绑定Style.Setters
c#
、
wpf
、
binding
我一整天都在寻找从DataGrid绑定行样式设置器中的属性的方法,绑定失败了 <DataGrid.RowStyle> <Style.Setters> <Setter Property="IsEnabled" Value="{Binding MyProperty}"/> </Style.Setters> </DataGrid.RowStyle> 我试过定制转换器,但没有用,有人有主意吗?
浏览 11
提问于2022-02-06
得票数 -1
8
回答
如何在DataGrid中设置选定行的颜色
c#
、
wpf
、
xaml
、
datagrid
DataGrid中选定行的默认背景颜色太深,以至于我无法阅读它。有没有覆盖它的方法? 我试过了 <dg:DataGrid.RowStyle> <Style TargetType="{x:Type dg:DataGridRow}"> <Style.Triggers> <Trigger Property="IsSelected" Value="True" > <Setter Property="Backgrou
浏览 1
提问于2009-08-03
得票数 135
回答已采纳
1
回答
我能在DataGrid风格中做到这一点吗?
wpf
、
xaml
我想知道是否可以将CellStyle、ColumnHeaderStyle和RowStyle放入DataGrid样式中? 例如: <Style x:Key="DataGridStyle2" TargetType="DataGrid" BasedOn="{StaticResource {x:Type DataGrid}}"> <Setter Property="SelectionUnit" Value="FullRow"/> <Setter Property=
浏览 2
提问于2012-10-09
得票数 0
1
回答
如何在未聚焦的数据网格中突出显示所选行?
c#
、
wpf
、
datagrid
我有一个数据网格,我正在对它执行文本搜索。当搜索确定该行应该突出显示时,我在底层对象中将布尔值指定为"true“,并且在我的WPF xml中具有以下内容: <DataGrid.Style> <Style TargetType="DataGrid"> <Setter Property="AlternatingRowBackground" Value="LightGray"/> </Style>
浏览 2
提问于2014-01-25
得票数 3
1
回答
ContextMenu命令在DataGrid行上不起作用
wpf
、
mvvm
、
datagrid
、
row
我创建一个样式,而不是将它绑定到一个DataGrid.RowStyle Row样式。出现了ContextMenu,我可以从菜单项中进行选择,但是命令不会执行。我用其他控件测试了命令,并且运行良好。 <Style x:Key="DataGridRow" TargetType="{x:Type DataGridRow}"> <Setter Property="ContextMenu"> <Setter.Value> <ContextMenu DataC
浏览 5
提问于2016-08-11
得票数 1
2
回答
基于编辑状态在XAML DataGrid中设置行背景颜色
c#
、
wpf
、
xaml
、
wpf-controls
、
wpfdatagrid
在编辑行时,以下XAML可以很好地更改背景色: <DataGrid.RowStyle> <Style TargetType="DataGridRow" > <Setter Property="Background" Value="AntiqueWhite" /> <Style.Triggers> <Trigger Property="IsEditing" Value="true"
浏览 11
提问于2012-03-19
得票数 2
回答已采纳
1
回答
如何使用SelectionMode=“扩展”设置MVVM中的选定项?
c#
、
wpf
目标 我现在有一个应用程序,它只通过选择复选框来选择项目。就像这样: 我的目标是多个选择项目(这突出选定的行),右键单击并有一个数据上下文菜单项来选择,选定的项目。 期望输出 例如,这将是我想要的输出(显然不是手动选择复选框)。 问题 实现这一输出的好起点是什么?我找不到任何例子。 码 模型很简单。 public class OrdersModel : BaseVM { public int OrderId { get; set; } // Hidden public string OrderNumber { get; set; } public D
浏览 0
提问于2021-07-16
得票数 0
回答已采纳
1
回答
将样式资源分配给DataGrid
wpf
、
xaml
、
datagrid
、
resources
、
staticresource
对于这个问题的模糊性质,我表示歉意,但是我对WPF来说还是很陌生的,因此我正在努力解决资源问题。 我的问题是,我有一个DataGrid,我希望给它分配一个样式来描述属性,比如FontSize和Background/Foreground颜色(当鼠标悬停在行上时)。我可以成功地做到以下几点: <Window x:Class="WpfApplication11.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x=
浏览 2
提问于2014-03-20
得票数 4
回答已采纳
1
回答
WPF中DataGrid行的代码中的替代样式
c#
、
wpf
、
xaml
、
datagrid
我有一个用XAML设置了RowStyle的DataGrid: <DataGrid.RowStyle> <Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource {x:Type DataGridRow}}"> <Setter Property="VerticalAlignment" Value="Center"/> <Style.Triggers>
浏览 9
提问于2021-01-25
得票数 0
1
回答
WPF DataGrid对多个选定行执行操作。
c#
、
wpf
、
xaml
、
events
、
datagrid
我在WPF中有一个DataGrid,它包含一个名称和电子邮件地址列表,还有一个事件处理程序,在双击行时执行操作: <DataGrid x:Name="DataGrid_Emails" ItemsSource="{Binding AddressBook}"> <DataGrid.RowStyle> <Style TargetType="{x:Type DataGridRow}"> <EventSetter Event="MouseDoubleClick
浏览 2
提问于2013-08-19
得票数 1
回答已采纳
1
回答
WPF:将datagridrow对象传递给转换器
c#
、
.net
、
wpf
、
datagrid
、
ivalueconverter
在WPF中将对象传递给转换器时,我遇到了问题。 我的DataGrid看起来像: <DataGrid x:Name="customTasksDataGrid" Margin="10,10,10,38" Grid.Column="1" IsReadOnly="True" AutoGenerateColumns="False"> <DataGrid.RowStyle> <Style TargetType="DataGridRow">
浏览 2
提问于2015-12-18
得票数 1
回答已采纳
1
回答
WPF DataGridTextColumn MaxLength
wpf
、
wpfdatagrid
、
textblock
、
datagridtextcolumn
我有一个带有DataGridTextColumn的DataGrid,我已经将TextBlock.TextWrapping设置为NoWrap。如果我试着显示一行很长很长的行,超过10000个字符,显示就像它比TextBlock.MaxWidth还长。问题是,它会截断后面的任何换行符,并有效地停止显示其他任何内容。如何修复,使MaxWidth更长(我已经将其设置为最大可能),或者至少显示换行符,以便显示以下行。 <DataGrid Grid.Row="0" Name="LogDataGrid" Margin="0,25,0,0&
浏览 3
提问于2018-02-27
得票数 0
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
阅文集团拟1051.12万美元收购OBU20%股权 进军泰国网络文学市场
呼和浩特到南宁汽车托运多少钱?
如何才能找到最佳的创业项目?低成本创业3个成功模式
Python基础教程5.4 条件和条件语句
比亚迪获首张L3自动驾驶测试牌;王传福:无人驾驶就是“扯淡”
热门
标签
更多标签
云服务器
即时通信 IM
ICP备案
对象存储
实时音视频
活动推荐
运营活动
广告
关闭
领券