Skip to content

Commit

Permalink
Cleanup (#9)
Browse files Browse the repository at this point in the history
- Fix warning from .net 9 update
- Update dependencies
  • Loading branch information
IeuanWalker authored Nov 19, 2024
1 parent 4af0619 commit 6c3112e
Show file tree
Hide file tree
Showing 20 changed files with 148 additions and 139 deletions.
7 changes: 5 additions & 2 deletions Demo/App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
<ApplicationVersion>1</ApplicationVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>

<MauiEnableXamlCBindingWithSourceCompilation>true</MauiEnableXamlCBindingWithSourceCompilation>
</PropertyGroup>

<ItemGroup>
Expand All @@ -36,8 +38,9 @@
<None Remove="Resources\Fonts\fa-solid-900.ttf" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Maui" Version="1.2.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.0.0" />
<PackageReference Include="CommunityToolkit.Maui" Version="9.1.1" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.10" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Scr\IeuanWalker.Maui.StateButton.csproj" />
Expand Down
4 changes: 2 additions & 2 deletions Demo/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class App : Application
public App()
{
InitializeComponent();

MainPage = new AppShell();
}

protected override Window CreateWindow(IActivationState? activationState) => new Window(new AppShell());
}
3 changes: 2 additions & 1 deletion Demo/Controls/Examples/CustomButton.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
<ContentView x:Class="App.Controls.Examples.CustomButton"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:control="clr-namespace:App.Controls.Examples"
xmlns:stateButton="clr-namespace:IeuanWalker.Maui.StateButton;assembly=IeuanWalker.Maui.StateButton">
<ContentView.ControlTemplate>
<ControlTemplate>
<ControlTemplate x:DataType="control:CustomButton">
<stateButton:StateButton Padding="20,20"
BackgroundColor="#0071FF"
Clicked="StateButton_Clicked"
Expand Down
3 changes: 2 additions & 1 deletion Demo/Controls/Examples/Example4.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
TextColor="White"
VerticalTextAlignment="Center">
<Label.Triggers>
<DataTrigger Binding="{Binding Source={RelativeSource AncestorType={x:Type stateButton:StateButton}}, Path=State}"
<DataTrigger x:DataType="stateButton:StateButton"
Binding="{Binding Source={RelativeSource AncestorType={x:Type stateButton:StateButton}}, Path=State}"
TargetType="Label"
Value="Pressed">
<Setter Property="TextColor" Value="#F84994" />
Expand Down
3 changes: 2 additions & 1 deletion Demo/Controls/Examples/Example5.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
TextColor="#FF0071"
TextTransform="Uppercase">
<Label.Triggers>
<DataTrigger Binding="{Binding Source={RelativeSource AncestorType={x:Type stateButton:StateButton}}, Path=State}"
<DataTrigger x:DataType="stateButton:StateButton"
Binding="{Binding Source={RelativeSource AncestorType={x:Type stateButton:StateButton}}, Path=State}"
TargetType="Label"
Value="Pressed">
<Setter Property="TextColor" Value="#72047E" />
Expand Down
3 changes: 2 additions & 1 deletion Demo/Controls/Examples/Example6.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
<ContentView x:Class="App.Controls.Examples.Example6"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:control="clr-namespace:App.Controls.Examples"
xmlns:stateButton="clr-namespace:IeuanWalker.Maui.StateButton;assembly=IeuanWalker.Maui.StateButton">
<ContentView.ControlTemplate>
<ControlTemplate>
<ControlTemplate x:DataType="control:Example6">
<stateButton:StateButton Grid.Column="0"
BackgroundColor="#7B66FF"
Clicked="StateButton_Clicked"
Expand Down
3 changes: 2 additions & 1 deletion Demo/Controls/Examples/Example7.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
<ContentView x:Class="App.Controls.Examples.Example7"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:control="clr-namespace:App.Controls.Examples"
xmlns:stateButton="clr-namespace:IeuanWalker.Maui.StateButton;assembly=IeuanWalker.Maui.StateButton">
<ContentView.ControlTemplate>
<ControlTemplate>
<ControlTemplate x:DataType="control:Example7">
<stateButton:StateButton Grid.Column="1"
Margin="5,0"
BackgroundColor="#F2F2FF"
Expand Down
6 changes: 4 additions & 2 deletions Demo/Pages/EventCommandPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
xmlns:app="clr-namespace:App.ViewModels;assembly=App"
xmlns:controls="clr-namespace:App.Controls.Examples;assembly=App"
xmlns:stateButton="clr-namespace:IeuanWalker.Maui.StateButton;assembly=IeuanWalker.Maui.StateButton"
Title="Event command page">
Title="Event command page"
x:DataType="app:TestViewModel">
<ContentPage.BindingContext>
<app:TestViewModel />
</ContentPage.BindingContext>
Expand Down Expand Up @@ -74,7 +75,8 @@
Text="Test"
TextColor="Black">
<Label.Triggers>
<DataTrigger Binding="{Binding Source={RelativeSource AncestorType={x:Type stateButton:StateButton}}, Path=State}"
<DataTrigger x:DataType="stateButton:StateButton"
Binding="{Binding Source={RelativeSource AncestorType={x:Type stateButton:StateButton}}, Path=State}"
TargetType="Label"
Value="Pressed">
<Setter Property="FontAttributes" Value="Bold" />
Expand Down
6 changes: 3 additions & 3 deletions Demo/Pages/EventCommandPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ void TapGestureRecognizer_OnTapped(object sender, EventArgs e)
{
Label? textExtender = sender as Label;

if (Description.MaxLines == int.MaxValue)
if(Description.MaxLines == int.MaxValue)
{
Description.MaxLines = 3;
if (textExtender is not null)
if(textExtender is not null)
{
textExtender.Text = "See more..";
}
}
else
{
Description.MaxLines = int.MaxValue;
if (textExtender is not null)
if(textExtender is not null)
{
textExtender.Text = "See less...";
}
Expand Down
4 changes: 2 additions & 2 deletions Demo/Platforms/Android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
1 change: 0 additions & 1 deletion Demo/Platforms/Android/MainActivity.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Android.App;
using Android.Content.PM;
using Microsoft.Maui;

namespace App;

Expand Down
1 change: 0 additions & 1 deletion Demo/Platforms/iOS/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Foundation;
using Microsoft.Maui;

namespace App;

Expand Down
4 changes: 2 additions & 2 deletions Demo/Resources/AppIcon/appicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions Demo/Resources/AppIcon/appiconfg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6c3112e

Please sign in to comment.