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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
with:
persist-credentials: false

- name: Setup .NET 8
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
include-prerelease: true

- uses: actions/setup-java@v4
Expand All @@ -51,4 +51,4 @@ jobs:
run: dotnet restore Trimble.Modus.Components.sln

- name: Build MAUI Android
run: dotnet build Trimble.Modus.Components.sln -f net8.0-android -c Release --no-restore
run: dotnet build Trimble.Modus.Components.sln -f net9.0-android -c Release --no-restore
8 changes: 4 additions & 4 deletions DemoApp/DemoApp/DemoApp.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
Expand All @@ -14,8 +14,8 @@
<!-- Display name -->
<ApplicationTitle>DemoApp</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>com.trimble.ModusMAUI</ApplicationId>
<!-- App Identifier -->
<ApplicationId>com.trimble.ModusMAUI</ApplicationId>
<ApplicationIdGuid>4ca86287-676e-49cb-9a5d-75d22c1b3771</ApplicationIdGuid>
<PackageVersion>1.0.0</PackageVersion>
<!-- Versions -->
Expand Down
2 changes: 1 addition & 1 deletion DemoApp/DemoApp/Views/ModalSamplePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private void ShowModalClicked(object sender, EventArgs e)
catch (Exception ex)
{
TMToast tMToast = new(ex.Message);
tMToast.theme = ToastTheme.Danger;
tMToast.theme = ToastTheme.DangerToast;
tMToast.Show();
}
}
Expand Down
12 changes: 6 additions & 6 deletions DemoApp/DemoApp/Views/ToastSamplePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
<Picker.ItemsSource>
<x:Array Type="{x:Type theme:ToastTheme}">
<theme:ToastTheme></theme:ToastTheme>
<theme:ToastTheme>Dark</theme:ToastTheme>
<theme:ToastTheme>Primary</theme:ToastTheme>
<theme:ToastTheme>Secondary</theme:ToastTheme>
<theme:ToastTheme>Danger</theme:ToastTheme>
<theme:ToastTheme>Warning</theme:ToastTheme>
<theme:ToastTheme>Success</theme:ToastTheme>
<theme:ToastTheme>DarkToast</theme:ToastTheme>
<theme:ToastTheme>PrimaryToast</theme:ToastTheme>
<theme:ToastTheme>SecondaryToast</theme:ToastTheme>
<theme:ToastTheme>DangerToast</theme:ToastTheme>
<theme:ToastTheme>WarningToast</theme:ToastTheme>
<theme:ToastTheme>SuccessToast</theme:ToastTheme>
</x:Array>
</Picker.ItemsSource>

Expand Down
2 changes: 1 addition & 1 deletion DemoApp/DemoApp/Views/ToastSamplePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public partial class ToastSamplePage : ContentPage
public ToastSamplePage()
{
InitializeComponent();
toastPicker.SelectedItem = ToastTheme.Default;
toastPicker.SelectedItem = ToastTheme.DefaultToast;
}

private void OnToastActionTapped(object sender, EventArgs e)
Expand Down
4 changes: 2 additions & 2 deletions Trimble.Modus.Components/Controls/Button/TMButton.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
HorizontalOptions="Start">
<ContentView.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!--<ResourceDictionary.MergedDictionaries>
<local:TMButtonStyles></local:TMButtonStyles>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary.MergedDictionaries>-->
<converters:ImageNullOrEmptyBoolConverter x:Key="ImageNullOrEmptyBoolConverter" />
<converters:StringNotNullOrEmptyBoolConverter x:Key="StringNotNullOrEmptyBoolConverter" />
</ResourceDictionary>
Expand Down
163 changes: 0 additions & 163 deletions Trimble.Modus.Components/Controls/Button/TMButtonStyles.xaml

This file was deleted.

10 changes: 0 additions & 10 deletions Trimble.Modus.Components/Controls/Button/TMButtonStyles.xaml.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,7 @@
xmlns:local="clr-namespace:Trimble.Modus.Components"
x:Class="Trimble.Modus.Components.DropDownContents"
BackgroundColor="{DynamicResource Transparent}"
Title="DropDownPopupPage">
<Modus:PopupPage.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<local:DropDownStyles />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Modus:PopupPage.Resources>
Title="DropDownPopupPage">
<Border x:Name="border"
VerticalOptions="Start"
HorizontalOptions="Start"
Expand Down
21 changes: 0 additions & 21 deletions Trimble.Modus.Components/Controls/DropDown/DropDownStyles.xaml

This file was deleted.

This file was deleted.

11 changes: 4 additions & 7 deletions Trimble.Modus.Components/Controls/DropDown/TMDropDown.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@
xmlns:converters="clr-namespace:Trimble.Modus.Components.Converters">
<ContentView.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<local:DropDownStyles />
</ResourceDictionary.MergedDictionaries>
<converters:StringNotNullOrEmptyBoolConverter x:Key="StringNotNullOrEmptyBoolConverter" />
</ResourceDictionary>
<converters:StringNotNullOrEmptyBoolConverter x:Key="StringNotNullOrEmptyBoolConverter" />
</ResourceDictionary>
</ContentView.Resources>
<VerticalStackLayout BindingContext="{x:Reference dropDown}">
<local:ControlLabel TitleText="{Binding TitleText}"
IsRequired="{Binding IsRequired}"
IsVisible="{Binding TitleText, Converter={StaticResource StringNotNullOrEmptyBoolConverter}}"/>
IsVisible="{Binding TitleText, Converter={StaticResource IsStringNotNullOrEmptyConverter}}"/>
<Border x:Name="innerBorder"
HorizontalOptions="Fill"
StrokeThickness="2"
Expand All @@ -45,7 +42,7 @@

<Image x:Name="indicatorButton"
Source="{Static constants:ImageConstants.ChevronDownIconWhite}"
HorizontalOptions="EndAndExpand"
HorizontalOptions="End"
VerticalOptions="Center"
Grid.Column="1"
HeightRequest="32"
Expand Down
22 changes: 21 additions & 1 deletion Trimble.Modus.Components/Controls/DropDown/TMDropDown.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Trimble.Modus.Components.Popup.Services;

namespace Trimble.Modus.Components;
public partial class TMDropDown : ContentView
public partial class TMDropDown : ContentView, IDisposable
{
#region Private fields
private double desiredHeight;
Expand Down Expand Up @@ -367,4 +367,24 @@ private void TapGestureRecognizer_Tapped(object sender, TappedEventArgs e)
Open();
}
}

protected override void OnParentSet()
{
base.OnParentSet();
if (Parent == null) Dispose();
}

protected override void OnHandlerChanged()
{
base.OnHandlerChanged();
if (Handler == null) Dispose();
}

public void Dispose()
{
PopupService.Instance.Dismissed -= OnPopupRemoved;
SelectionChanged = null;
SelectionChangedCommand = null;
ItemsSource = null;
}
}
6 changes: 2 additions & 4 deletions Trimble.Modus.Components/Controls/Label/ControlLabel.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
x:Name="controlLabelView">
<ContentView.Resources>
<ResourceDictionary>
<toolkit:IsStringNotNullOrEmptyConverter x:Key="IsStringNotNullOrEmptyConverter" />
<ResourceDictionary.MergedDictionaries>
<local:ControlLabelStyles />
</ResourceDictionary.MergedDictionaries>

<toolkit:IsStringNotNullOrEmptyConverter x:Key="IsStringNotNullOrEmptyConverter" />
</ResourceDictionary>
</ContentView.Resources>
<Grid x:Name="view"
Expand Down
Loading
Loading