Jelajahi Sumber

Interim Update

Frank van den Bos 1 tahun lalu
induk
melakukan
d69a4a6c6f

+ 9 - 2
InABox.Mobile/InABox.Mobile.Shared/Components/MobileCheckBox/MobileCheckBox.xaml.cs

@@ -34,8 +34,15 @@ namespace InABox.Mobile
             nameof(IsChecked), 
             typeof(bool), 
             typeof(MobileCheckBox),
-            false);
-        
+            false,
+            BindingMode.TwoWay,
+            propertyChanged: (sender,oldvalue,newvalue) => CheckChanged(sender as MobileCheckBox, (bool)oldvalue, (bool)newvalue));
+
+        private static void CheckChanged(MobileCheckBox bindable, bool oldValue, bool newValue)
+        {
+
+        }
+
         public bool IsChecked
         {
             get => (bool)GetValue(IsCheckedProperty);

+ 1 - 1
InABox.Mobile/InABox.Mobile.Shared/Components/MobileGrid/MobileGrid.xaml.cs

@@ -64,7 +64,7 @@ namespace InABox.Mobile
         public object ItemsSource
         {
             get => Grid.ItemsSource;
-            set => Dispatcher.BeginInvokeOnMainThread(() => Grid.ItemsSource = value);
+            set => Grid.ItemsSource = value;
         }
 
         public object[] SelectedItems => Grid.SelectedItems.ToArray();

+ 2 - 2
InABox.Mobile/InABox.Mobile.Shared/Components/MobileToolGrid/MobileToolGrid.xaml

@@ -62,7 +62,7 @@
                                 </DataTrigger>
                             </Frame.Triggers>
 
-                            <Grid>
+                            <Grid RowSpacing="0" ColumnSpacing="0">
                                                                
                                 <Grid.RowDefinitions>
                                     <RowDefinition Height="Auto"/>
@@ -128,7 +128,7 @@
                             FontSize="Micro" 
                             HorizontalTextAlignment="Center" 
                             VerticalTextAlignment="Start" 
-                            Margin="0,-2,0,0"
+                            Margin="0,-5,0,0"
                             TextColor="{Binding TextColor}">
                             <Label.Triggers>
                                 <DataTrigger TargetType="Label" Binding="{Binding IsEnabled}" Value="False">

+ 6 - 2
InABox.Mobile/InABox.Mobile.Shared/Components/MobileView/BaseMobileView.xaml.cs

@@ -13,12 +13,16 @@ namespace InABox.Mobile
         protected BaseMobileView()
         {
             InitializeComponent();
-            
         }
 
+        object _oldcontext = null;
         private void BaseMobileView_OnBindingContextChanged(object sender, EventArgs e)
         {
-            DoBindingContextChanged();
+            if (BindingContext != _oldcontext)
+            {
+                _oldcontext = BindingContext;
+                DoBindingContextChanged();
+            }
         }
 
         protected virtual void DoBindingContextChanged()

+ 2 - 0
InABox.Mobile/InABox.Mobile.Shared/Converters/DateTimeToBooleanConverter.cs

@@ -21,4 +21,6 @@ namespace InABox.Mobile
             throw new NotImplementedException();
         }
     }
+    
+
 }