-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from F1Telemetry/F-24
♻️ F-24 Update Tyre module to use only one DataGrid
- Loading branch information
Showing
5 changed files
with
76 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System.Windows; | ||
|
||
namespace F1T.Core | ||
{ | ||
// https://stackoverflow.com/questions/22073740/binding-visibility-for-datagridcolumn-in-wpf | ||
public class BindingProxy : Freezable | ||
{ | ||
#region Overrides of Freezable | ||
|
||
protected override Freezable CreateInstanceCore() | ||
{ | ||
return new BindingProxy(); | ||
} | ||
|
||
#endregion | ||
|
||
public object Data | ||
{ | ||
get { return (object)GetValue(DataProperty); } | ||
set { SetValue(DataProperty, value); } | ||
} | ||
|
||
public static readonly DependencyProperty DataProperty = | ||
DependencyProperty.Register("Data", typeof(object), | ||
typeof(BindingProxy)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | ||
|
||
<Style x:Key="DataGridTheme" TargetType="{x:Type DataGrid}"> | ||
<Setter Property="Background" Value="Transparent" /> | ||
<Setter Property="AlternationCount" Value="2" /> | ||
<Setter Property="BorderThickness" Value="0"/> | ||
</Style> | ||
|
||
<Style TargetType="{x:Type DataGridRow}"> | ||
<Setter Property="IsHitTestVisible" Value="False"/> | ||
<Setter Property="Foreground" Value="White" /> | ||
<Setter Property="Background" Value="Transparent" /> | ||
</Style> | ||
|
||
<Style TargetType="{x:Type DataGridColumnHeader}"> | ||
<Setter Property="Height" Value="35" /> | ||
<Setter Property="Padding" Value="5" /> | ||
<Setter Property="Background" Value="Transparent" /> | ||
<Setter Property="Foreground" Value="White" /> | ||
<Setter Property="FontFamily" Value="/Fonts/#Poppins" /> | ||
<Setter Property="FontWeight" Value="Medium" /> | ||
<Setter Property="BorderThickness" Value="0"/> | ||
<Setter Property="IsHitTestVisible" Value="False"/> | ||
</Style> | ||
</ResourceDictionary> |