From 301110ff97ad6cdd66ee7a1b48eb8e6c82cf592c Mon Sep 17 00:00:00 2001 From: BAL4-R Date: Tue, 5 Sep 2023 15:24:13 +0530 Subject: [PATCH] Replace maui switch with TMSwitch in Boolean Column in DataGrid --- .../Controls/TMDataGrid/ColumnTypes/BooleanColumn.xaml | 5 ++--- Trimble.Modus.Components/Controls/TMDataGrid/DataGridRow.cs | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Trimble.Modus.Components/Controls/TMDataGrid/ColumnTypes/BooleanColumn.xaml b/Trimble.Modus.Components/Controls/TMDataGrid/ColumnTypes/BooleanColumn.xaml index 705f3d56..7152274d 100644 --- a/Trimble.Modus.Components/Controls/TMDataGrid/ColumnTypes/BooleanColumn.xaml +++ b/Trimble.Modus.Components/Controls/TMDataGrid/ColumnTypes/BooleanColumn.xaml @@ -5,8 +5,7 @@ x:Class="Trimble.Modus.Components.BooleanColumn"> - + - \ No newline at end of file + diff --git a/Trimble.Modus.Components/Controls/TMDataGrid/DataGridRow.cs b/Trimble.Modus.Components/Controls/TMDataGrid/DataGridRow.cs index e3d1caf9..972b493f 100644 --- a/Trimble.Modus.Components/Controls/TMDataGrid/DataGridRow.cs +++ b/Trimble.Modus.Components/Controls/TMDataGrid/DataGridRow.cs @@ -98,8 +98,8 @@ private View CreateCell(DataGridColumn col) } else if(col is BooleanColumn booleanColumn) { - var switchElement = (cell as ContentView)?.Content as Switch; - switchElement?.SetBinding(Switch.IsToggledProperty, new Binding(booleanColumn.PropertyName, source: BindingContext)); + var switchElement = (cell as ContentView)?.Content as TMSwitch; + switchElement?.SetBinding(TMSwitch.IsToggledProperty, new Binding(booleanColumn.PropertyName, source: BindingContext)); } } else