Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions Trimble.Modus.Components/Controls/Button/TMButton.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,7 @@
xmlns:constants="clr-namespace:Trimble.Modus.Components.Constant"
xmlns:converters="clr-namespace:Trimble.Modus.Components.Converters"
HorizontalOptions="Start">
<ContentView.Resources>
<ResourceDictionary>
<!--<ResourceDictionary.MergedDictionaries>
<local:TMButtonStyles></local:TMButtonStyles>
</ResourceDictionary.MergedDictionaries>-->
<converters:ImageNullOrEmptyBoolConverter x:Key="ImageNullOrEmptyBoolConverter" />
<converters:StringNotNullOrEmptyBoolConverter x:Key="StringNotNullOrEmptyBoolConverter" />
</ResourceDictionary>
</ContentView.Resources>

<Border Padding="0"
BindingContext="{x:Reference tmButton}"
x:Name="buttonFrame"
Expand Down
5 changes: 0 additions & 5 deletions Trimble.Modus.Components/Controls/DropDown/TMDropDown.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
x:Class="Trimble.Modus.Components.TMDropDown"
xmlns:converters="clr-namespace:Trimble.Modus.Components.Converters">
<ContentView.Resources>
<ResourceDictionary>
<converters:StringNotNullOrEmptyBoolConverter x:Key="StringNotNullOrEmptyBoolConverter" />
</ResourceDictionary>
</ContentView.Resources>
<VerticalStackLayout BindingContext="{x:Reference dropDown}">
<local:ControlLabel TitleText="{Binding TitleText}"
IsRequired="{Binding IsRequired}"
Expand Down
10 changes: 0 additions & 10 deletions Trimble.Modus.Components/Controls/DropDown/TMDropDown.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ public TMDropDown()
previousSelection = null;
InitializeComponent();
this.SetDynamicResource(StyleProperty, "DefaultStyle");
PopupService.Instance.Dismissed += OnPopupRemoved;
this.Unloaded += OnUnloaded;
}
#endregion

Expand Down Expand Up @@ -368,7 +366,6 @@ private void TapGestureRecognizer_Tapped(object sender, TappedEventArgs e)
Open();
}
}

protected override void OnParentSet()
{
base.OnParentSet();
Expand All @@ -383,17 +380,10 @@ protected override void OnHandlerChanged()

public void Dispose()
{
PopupService.Instance.Dismissed -= OnPopupRemoved;
this.Unloaded -= OnUnloaded;
SelectionChanged = null;
SelectionChangedCommand = null;
ItemsSource = null;
dropDownContents = null;
previousSelection = null;
}

private void OnUnloaded(object sender, EventArgs e)
{
Dispose();
}
}
6 changes: 0 additions & 6 deletions Trimble.Modus.Components/Controls/Label/ControlLabel.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
xmlns:local="clr-namespace:Trimble.Modus.Components;assembly=Trimble.Modus.Components"
x:Class="Trimble.Modus.Components.ControlLabel"
x:Name="controlLabelView">
<ContentView.Resources>
<ResourceDictionary>

<toolkit:IsStringNotNullOrEmptyConverter x:Key="IsStringNotNullOrEmptyConverter" />
</ResourceDictionary>
</ContentView.Resources>
<Grid x:Name="view"
BindingContext="{x:Reference controlLabelView}"
ColumnSpacing="6"
Expand Down
3 changes: 0 additions & 3 deletions Trimble.Modus.Components/Controls/TMInput/BaseInput.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
xmlns:converters="clr-namespace:Trimble.Modus.Components.Converters">

<ContentView.Resources>
<ResourceDictionary>
<converters:StringNotNullOrEmptyBoolConverter x:Key="StringNotNullOrEmptyBoolConverter" />
</ResourceDictionary>
<ControlTemplate x:Key="InputTemplate">
<Grid x:Name="tmInputContainer"
RowDefinitions="auto,auto,auto"
Expand Down
5 changes: 0 additions & 5 deletions Trimble.Modus.Components/Controls/TMInput/TMInput.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
xmlns:controls="clr-namespace:Trimble.Modus.Components"
x:Name="singleInput">

<base:BaseInput.Resources>
<converters:InverseBoolConverter x:Key="InverseBoolConverter" />
<converters:AllTrueConverter x:Key="AllTrueConverter" />
</base:BaseInput.Resources>

<Grid ColumnDefinitions="auto,*,auto"
ColumnSpacing="0"
RowSpacing="0"
Expand Down
3 changes: 2 additions & 1 deletion Trimble.Modus.Components/Helpers/ThemeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public static void Initialize(ModusConfig appConfig = null)

public static void RegisterStyles()
{
Application.Current.Resources.MergedDictionaries.Add(new ModusStyles());
Application.Current.Resources.MergedDictionaries.Add(new ModusStyles());
Application.Current.Resources.MergedDictionaries.Add(new ConvertersDictionary());
}

private static void UpdateColorsDictionary(ModusConfig appConfig = null)
Expand Down
12 changes: 12 additions & 0 deletions Trimble.Modus.Components/Styles/ConvertersDictionary.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Trimble.Modus.Components.Styles.ConvertersDictionary"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
xmlns:converters="clr-namespace:Trimble.Modus.Components.Converters;assembly=Trimble.Modus.Components">
<toolkit:IsStringNotNullOrEmptyConverter x:Key="IsStringNotNullOrEmptyConverter" />
<converters:InverseBoolConverter x:Key="InverseBoolConverter" />
<converters:AllTrueConverter x:Key="AllTrueConverter" />
<converters:ImageNullOrEmptyBoolConverter x:Key="ImageNullOrEmptyBoolConverter" />
<converters:StringNotNullOrEmptyBoolConverter x:Key="StringNotNullOrEmptyBoolConverter" />
</ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Trimble.Modus.Components.Styles;

public partial class ConvertersDictionary : ResourceDictionary
{
public ConvertersDictionary()
{
InitializeComponent();
}
}
5 changes: 4 additions & 1 deletion Trimble.Modus.Components/Trimble.Modus.Components.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>Trimble.Modus.Components</PackageId>
<Title>Trimble Modus</Title>
<Version>1.4.0.1</Version>
<Version>1.4.0.2</Version>
<Authors>Trimble Inc</Authors>
<Company>Trimble Inc</Company>
<Product>Trimble.Modus.Components</Product>
Expand Down Expand Up @@ -202,6 +202,9 @@
<MauiXaml Update="Styles\Colors.xaml">
<Generator></Generator>
</MauiXaml>
<MauiXaml Update="Styles\ConvertersDictionary.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Styles\DarkThemeStyling.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
Expand Down
Loading