I have populated a datagrid in WPF but i dont know its generating buttons type thing on left hand side of grid, i want to remove it, how i can remove it, any idea?
Here is screen shot :
Here is my xaml code:
<DataGrid Name="Patients" SelectedValuePath="patientid" CanUserResizeRows="False" Background="#942E2A" GridLinesVisibility="None" HorizontalGridLinesBrush="#73261E" BorderBrush="#73261E" BorderThickness="5" SelectionChanged="Patients_SelectionChanged" ItemsSource="{Binding}" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10" AutoGenerateColumns="False" Height="400" Width="340">
<DataGrid.Resources>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="Background" Value="#942E2A" />
<Setter Property="FontSize" Value="18" />
<Setter Property="Width" Value="150" />
<Setter Property="FontFamily" Value="Georgia" />
<Setter Property="Foreground" Value="White" />
<Setter Property="FontWeight" Value="Bold" />
</Style>
<Style TargetType="DataGridRow">
<Setter Property="Background" Value="#942E2A" />
<Setter Property="FontSize" Value="14" />
<Setter Property="FontFamily" Value="Georgia" />
<Setter Property="Foreground" Value="White" />
<Style.Triggers>
<Trigger Property="IsSelected"
Value="True">
<Setter Property="BorderBrush"
Value="White" />
<Setter Property="BorderThickness"
Value="2" />
<Setter Property="Background"
Value="White" />
<Setter Property="Foreground" Value="Black"></Setter>
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.Resources>
<DataGrid.Columns>
<DataGridTemplateColumn Header="Patient ID" SortMemberPath="patientid" Width="Auto" MinWidth="100" >
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid>
<Grid.Style>
<Style>
</Style>
</Grid.Style>
<TextBlock Text="{Binding Path=patientid}">
</TextBlock>
</Grid>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Last, First" SortMemberPath="name" Width="Auto" MinWidth="100" >
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid>
<Grid.Style>
<Style>
</Style>
</Grid.Style>
<TextBlock Text="{Binding Path=name}"></TextBlock>
</Grid>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
A bit strange but rows have a Header. That's what you see. Setting the visibility of the column header only will solve your Problem:
HeadersVisibility="Column"
Related
I want to set background color of the selected row. Please see the below code.
Foreground color (text color) is working but its not changing background color of row.
<Style TargetType="{x:Type DataGridCell}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Grid>
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="DataGridCell.IsSelected" Value="True">
<Setter Property="Foreground" Value="Blue" />
<Setter Property="Background" Value="Green" />
</Trigger>
</Style.Triggers>
</Style>
<DataGrid x:Name="Details" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10,10,10,10"
ItemsSource="{Binding Details}" >
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Index}" Header="Index" />
<DataGridTextColumn Binding="{Binding One}" Header="1" />
<DataGridTextColumn Binding="{Binding two}" Header="2" />
<DataGridTextColumn Binding="{Binding three}" Header="3" />
</DataGrid.Columns>
</DataGrid>
Now issue is solved after adding specific style for row itself. It was not working when i added for cell.
<Style TargetType="{x:Type DataGridRow}">
<Style.Triggers>
<Trigger Property="DataGridRow.IsSelected" Value="True">
<Setter Property="Foreground" Value="Blue" />
<Setter Property="Background" Value="Green" />
</Trigger>
</Style.Triggers>
</Style>
I have a data grid control that has disabled cells in combination with fully enabled cells (some cells have dropdowns, textboxes, checkboxes). The problem is that the style for the disabled cell looks exactly like the enabled cells. I simply want to change the style for all disabled cells so it is clear to the user that they cannot change the data. Here is my XAML code:
<DataGrid Name="DataGrid"
ItemsSource="{Binding MySource}"
AutoGenerateColumns="False" Grid.Row="1"
BorderThickness="0"
SelectionMode="Single" SelectionUnit="FullRow"
CanUserAddRows="False" CanUserDeleteRows="False"
CanUserReorderColumns="False" CanUserSortColumns="False"
CanUserResizeColumns="False" CanUserResizeRows="False"
BeginningEdit="DataGrid_BeginningEdit" Margin="10">
<DataGrid.Resources>
<CollectionViewSource Source="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.SourceList}" x:Key="SourceChoices" />
<CollectionViewSource Source="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.MyDropDownSource}" x:Key="MyDropDownOptions" />
<CollectionViewSource Source="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.MySource}" x:Key="MySourceOptions" />
<Style TargetType="DataGrid">
<Setter Property="GridLinesVisibility" Value="All" />
<Setter Property="HorizontalGridLinesBrush" Value="Gray"/>
<Setter Property="VerticalGridLinesBrush" Value="LightGray"/>
<Setter Property="FontSize" Value="13" />
</Style>
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="LightGray" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="FontSize" Value="13" />
<Setter Property="FontWeight" Value="DemiBold" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Height" Value="34" />
</Style>
<Style TargetType="DataGridCell">
<Setter Property="Height" Value="35" />
<Setter Property="Padding" Value="4" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Grid Background="{TemplateBinding Background}">
<ContentPresenter VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<EventSetter Event="PreviewMouseLeftButtonDown" Handler="DataGridCell_PreviewMouseLeftButtonDown"/>
<Style.Triggers>
<Trigger Property="DataGridCell.IsSelected" Value="True">
<Setter Property="Background" Value="LightBlue" />
<Setter Property="Foreground" Value="Black" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="Pink" />
<Setter Property="Foreground" Value="Blue" />
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="DataGridRow">
<Setter Property="Background" Value="White" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Width" Value="Auto" />
</Style>
</DataGrid.Resources>
<DataGrid.Columns>
<DataGridTextColumn Header="Pos" Binding="{Binding Position}" Width="40" CanUserSort="False" />
<DataGridTextColumn Header="Acn Nbr" Binding="{Binding MySourceNumber1}" Width="10*" CanUserSort="False" />
<DataGridTextColumn Header="Name" Binding="{Binding MySourceNumber2}" Width="15*" CanUserSort="False" />
<DataGridTextColumn Header="Org #" Binding="{Binding MySourceNumber3}" Width="40" CanUserSort="False" />
<DataGridCheckBoxColumn Header="Proteus" Binding="{Binding MySourceNumber4}" Width="50" CanUserSort="False" />
<DataGridComboBoxColumn Header="Source Id" TextBinding="{Binding MySourceNumber5}" Width="10*" CanUserSort="False"
DisplayMemberPath="Name" SelectedValuePath="ID" ItemsSource="{Binding Source={StaticResource Options}}"/>
<DataGridComboBoxColumn Header="Bench" SelectedValueBinding="{Binding ID}" Width="10*" CanUserSort="False"
DisplayMemberPath="Name" SelectedValuePath="ID" ItemsSource="{Binding Source={StaticResource Options}}"/>
<DataGridComboBoxColumn Header="Org Id" SelectedValueBinding="{Binding ID}" Width="10*" CanUserSort="False"
DisplayMemberPath="OrganismAbbrev" SelectedValuePath="ID" ItemsSource="{Binding Source={StaticResource Options}}"/>
<DataGridTextColumn Header="Comment" Binding="{Binding Comment}" Width="20*" CanUserSort="False" />
</DataGrid.Columns>
</DataGrid>
Note the part in code that reads:
<Trigger Property="DataGridCell.IsSelected" Value="True">
<Setter Property="Background" Value="LightBlue" />
<Setter Property="Foreground" Value="Black" />
</Trigger>
This is not working for me. What am I doing wrong?
Thanks!!!
You can put the triggers inside the ControlTemplate. Then whatever property you're referring to in the trigger, in this case "IsEnabled" or "IsSelected", it will point to the property of whatever TargetType it is (in this case DataGridCell), assuming there is such a property for that data type it will work. Otherwise the binding will just break.
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Grid Background="{TemplateBinding Background}">
<ContentPresenter VerticalAlignment="Center" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="LightBlue" />
<Setter Property="Foreground" Value="Black" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="Pink" />
<Setter Property="Foreground" Value="Blue" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
My WPF 4.5 application has a small (but annoying) visual bug where a DataGrid's cells are cut off upon loading:
Dropbox link to the screenshot
But once you resize the window (click the square button in the upper right corner) and re-maximize it, the DataGrid's cells appear as they should:
Dropbox link to the screenshot
In the XAML, every column's width is set to Auto, except for the "Name" column, which is *. Is there anything I can do to prevent this visual bug from happening/is there anything I'm doing that's causing this bug?
Here's my XAML:
<DataGrid ItemsSource="{Binding Datasets, NotifyOnTargetUpdated=True}" Name="dsDatagrid" SelectionMode="Extended" MouseDoubleClick="ViewDataset">
<DataGrid.Style>
<Style BasedOn="{StaticResource {x:Type DataGrid}}" TargetType="DataGrid">
<Setter Property="Visibility" Value="Visible"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsWorking}" Value="True">
<Setter Property="Visibility" Value="Collapsed"/>
</DataTrigger>
</Style.Triggers>
</Style>
</DataGrid.Style>
<i:Interaction.Triggers>
<i:EventTrigger EventName="TargetUpdated">
<cmd:EventToCommand Command="{Binding CollectionChangedCommand}"/>
</i:EventTrigger>
<i:EventTrigger EventName="SelectionChanged">
<cmd:EventToCommand Command="{Binding SelectionChangedCommand}" CommandParameter="{Binding ElementName=dsDatagrid, Path=SelectedItems}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
<DataGrid.Columns>
<DataGridTemplateColumn Header="" Width="Auto">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Name="NameCell" Background="Transparent" HorizontalAlignment="Left" VerticalAlignment="Center">
<Button Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.BackupSingleCommand}" CommandParameter="{Binding}" Style="{StaticResource BackupSingleButtonStyle}" Margin="5 10"/>
<Button Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.DeleteSingleCommand}" CommandParameter="{Binding}" Style="{StaticResource DeleteSingleButtonStyle}" Margin="5 10"/>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Header="ID" Width="Auto" Binding="{Binding Id}"/>
<DataGridTemplateColumn Header="Name" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" TextWrapping="Wrap"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Header="Source Images" Width="Auto" Binding="{Binding SourceImages.Count, StringFormat={}{0:N0}, TargetNullValue=NONE}"/>
<DataGridTextColumn Header="Start Time" Width="Auto" Binding="{Binding StartTime, StringFormat={}{0:MM}/{0:dd}/{0:yy} {0:HH}\:{0:mm}\:{0:ss}}"/>
<DataGridTextColumn Header="End Time" Width="Auto" Binding="{Binding EndTime, StringFormat={}{0:MM}/{0:dd}/{0:yy} {0:HH}\:{0:mm}\:{0:ss}, TargetNullValue=In Progress}"/>
<DataGridTemplateColumn Header="Status" Width="Auto">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Status}" TextWrapping="WrapWithOverflow"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
If it's relevant, here's my DataGrid style:
<Style TargetType="DataGridColumnHeader">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Background" Value="{StaticResource BannerNormalBrush}"/>
<Setter Property="Padding" Value="24 10"/>
</Style>
<Style TargetType="DataGridRow">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="FontSize" Value="16"/>
</Style>
<Style TargetType="DataGridCell">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="24 0"/>
<Setter Property="Foreground" Value="{StaticResource TextBlockDisabledForegroundBrushDark}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="DataGridCell">
<Border Name="Border" Padding="{TemplateBinding Padding}" Background="Transparent">
<ContentPresenter VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Border" Property="Background" Value="{StaticResource DataGridRowSelectedBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="DataGrid">
<Setter Property="GridLinesVisibility" Value="None"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="RowBackground" Value="{StaticResource DataGridOddRowBackgroundBrush}"/>
<Setter Property="AlternatingRowBackground" Value="{StaticResource DataGridEvenRowBackgroundBrush}"/>
<Setter Property="CanUserResizeRows" Value="False"/>
<Setter Property="CanUserResizeColumns" Value="False"/>
<Setter Property="IsReadOnly" Value="True"/>
<Setter Property="Margin" Value="5"/>
<Setter Property="SelectionMode" Value="Single"/>
<Setter Property="RowHeaderWidth" Value="0"/>
<Setter Property="CanUserReorderColumns" Value="False"/>
<Setter Property="CanUserSortColumns" Value="False"/>
<Setter Property="AutoGenerateColumns" Value="False"/>
<Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="EnableRowVirtualization" Value="True"/>
<Setter Property="VirtualizingStackPanel.IsVirtualizing" Value="True"/>
<Setter Property="VirtualizingStackPanel.VirtualizationMode" Value="Recycling"/>
<Setter Property="Background" Value="Transparent"/>
</Style>
Haven't really tried your code, but just by looking at it, I have a hunch...
StackPanels tend to have problems calculating their available space, so your problem may be caused by the StackPanel inside your column's DataTemplate, that is unable to communicate its size correctly to the column on load.
My suggestion is to change the StackPanel for another Panel. In this case, a good old Grid would work just fine, and I bet you won't see any glitch this time.
<DataGridTemplateColumn Header="" Width="Auto">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid Name="NameCell" Background="Transparent" HorizontalAlignment="Left" VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.BackupSingleCommand}" CommandParameter="{Binding}" Style="{StaticResource BackupSingleButtonStyle}" Margin="5 10"/>
<Button Grid.Column="1" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.DeleteSingleCommand}" CommandParameter="{Binding}" Style="{StaticResource DeleteSingleButtonStyle}" Margin="5 10"/>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
I have an order entry form that has a ListBox with a list of line items. I have my items template, and one of the values is a ComboBox in each of my Items.
Now, my form can also create Credit memo's in addition to purchase orders, but when I am creating a credit memo, I want to put the words "Credit Memo" over the list box, however, the TextBlock covers the ComboBox in two of my line items. I would like to pass my click event through the TextBlock to the ComboBoxes but I'm not sure how to do it.
This is what I have, ( Maybe I am coming at this totally wrong, I am kinda a noob with WPF )
<ListBox SelectionMode="Single" Grid.Row="2"
ItemsSource="{Binding Path=LineItems}" HorizontalContentAlignment="Stretch"
IsSynchronizedWithCurrentItem="True" Background="#66FFFFFF">
<ListBox.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="Background" Value="WhiteSmoke"/>
<Setter Property="BorderThickness" Value="1" />
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsPartBackOrder}" Value="True">
<Setter Property="Background" Value="Orange" />
</DataTrigger>
</Style.Triggers>
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate DataType="{x:Type Entities:SalesOrderLineItem}" >
<OrderEntry:SalesOrderLineItemCreate DataContext="{Binding}" DeleteSalesOrderLineItem="DeleteSalesOrderLineItem" Margin="0,3,3,0" >
<OrderEntry:SalesOrderLineItemCreate.Resources>
<Style TargetType="{x:Type OrderEntry:SalesOrderLineItemCreate}">
<Style.Triggers>
<DataTrigger
Binding="{Binding RelativeSource=
{
RelativeSource
Mode=FindAncestor,
AncestorType={x:Type ListBoxItem}
},
Path=IsSelected
}" Value="True">
<Setter Property="Background" Value="LightBlue" />
<Setter Property="Foreground" Value="Black" />
</DataTrigger>
</Style.Triggers>
</Style>
</OrderEntry:SalesOrderLineItemCreate.Resources>
</OrderEntry:SalesOrderLineItemCreate>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<TextBlock Grid.Row="2"
Text="Credit Memo"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="48" Height="Auto"
FontStyle="Italic"
Foreground="Red"
Opacity=".25">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=OrderType}" Value="CR">
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=OrderType}" Value="CU">
<Setter Property="Visibility" Value="Hidden" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock IsHitTestVisible="False" .../>
I am using the WPF Datagrid from Codeplex.
I am able to style the rows and with the following attributes in the dg:DataGrid element.
But how do I style the Headers? I find 100s of examples on the web which define Styles and use e.g. x:Key="DataGridColumnHeaderStyle" in the Datagrid element, but none of them seem to work for me.
How can I just e.g. change the Datagrid Header background to orange on this DataGrid?
<dg:DataGrid AlternatingRowBackground="#ddd"
RowBackground="#eee"
Name="theGrid1"
VerticalAlignment="Stretch"
AutoGenerateColumns="False"
BorderBrush="#ddd">
...
</dg:DataGrid>
There is also a property on the DataGrid that allows for styling the header:
<DataGrid.ColumnHeaderStyle>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="FontWeight"
Value="Bold" />
</Style>
</DataGrid.ColumnHeaderStyle>
The style in this case is in a file called generic.xaml it should be loacted in a themems folder in your project.
find it and open it. inside you will find this line that controls the background of the column headers
<dg:DataGridHeaderBorder SortDirection="{TemplateBinding SortDirection}"
IsHovered="{TemplateBinding IsMouseOver}"
IsPressed="{TemplateBinding IsPressed}"
IsClickable="{TemplateBinding CanUserSort}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding ="{TemplateBinding Padding}"
SeparatorVisibility="{TemplateBinding SeparatorVisibility}"
SeparatorBrush="{TemplateBinding SeparatorBrush}">
basically its defined at another place in the template:
this will explain TemlateBinding to you
MSDN TemplateBinding
HTH,
Eric
Here is another sample
<DataGrid AutoGenerateColumns="False" Height="200"
HorizontalAlignment="Left" Name="dgDownloads"
VerticalAlignment="Top" Width="777"
Background="Black" RowBackground="Gray" Foreground="White"
AlternatingRowBackground="Gray" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
<DataGrid.Columns>
<DataGridTextColumn
Header="{lex:LocTextExtension Key=Name, Dict=Resources, Assembly=PreShow.Player}"
Width="220"
IsReadOnly="True"
Binding="{Binding Filename}" >
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="TextWrapping" Value="Wrap"/>
</Style>
</DataGridTextColumn.ElementStyle>
<DataGridTextColumn.HeaderStyle>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Foreground" Value="Yellow" />
<Setter Property="Background" Value="Black" />
</Style>
</DataGridTextColumn.HeaderStyle>
</DataGridTextColumn>
<DataGridCheckBoxColumn
IsReadOnly="True"
Header="{lex:LocTextExtension Key=Success, Dict=Resources, Assembly=PreShow.Player}"
Width="60"
Binding="{Binding IsSuccess}"
IsThreeState="False">
<DataGridCheckBoxColumn.HeaderStyle>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Foreground" Value="Yellow" />
<Setter Property="Background" Value="Black" />
</Style>
</DataGridCheckBoxColumn.HeaderStyle>
</DataGridCheckBoxColumn>
<DataGridTemplateColumn Header="{lex:LocTextExtension Key=Time, Dict=Resources, Assembly=PreShow.Player}" IsReadOnly="True">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Downloaded}" Margin="4"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
<DataGridTemplateColumn.HeaderStyle>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Foreground" Value="Yellow" />
<Setter Property="Background" Value="Black" />
</Style>
</DataGridTemplateColumn.HeaderStyle>
</DataGridTemplateColumn>
<DataGridCheckBoxColumn
IsReadOnly="True"
Header="{lex:LocTextExtension Key=IsDownloading, Dict=Resources, Assembly=PreShow.Player}"
Width="60"
Binding="{Binding IsDownloading}"
IsThreeState="False">
<DataGridCheckBoxColumn.HeaderStyle>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Foreground" Value="Yellow" />
<Setter Property="Background" Value="Black" />
</Style>
</DataGridCheckBoxColumn.HeaderStyle>
</DataGridCheckBoxColumn>
<DataGridHyperlinkColumn
Header="URL"
Width="Auto"
IsReadOnly="True"
Binding="{Binding Path=URL}"
TargetName="{Binding Path=URL}">
<DataGridHyperlinkColumn.ElementStyle>
<Style TargetType="TextBlock">
<EventSetter Event="Hyperlink.Click" Handler="OnHyperlinkClick" />
</Style>
</DataGridHyperlinkColumn.ElementStyle>
<DataGridHyperlinkColumn.HeaderStyle>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Foreground" Value="Yellow" />
<Setter Property="Background" Value="Black" />
</Style>
</DataGridHyperlinkColumn.HeaderStyle>
</DataGridHyperlinkColumn>
</DataGrid.Columns>
</DataGrid>