Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
Original file line number Diff line number Diff line change
Expand Up @@ -48,32 +48,6 @@
</mct:Expander.Content>
</mct:Expander>

<Label Text="Expander in ListView" FontSize="24" FontAttributes="Bold"/>

<ListView ItemsSource="{Binding ContentCreators}"
HasUnevenRows="True">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<mct:Expander x:DataType="sample:ContentCreator"
ExpandedChanged="Expander_ExpandedChanged">
<mct:Expander.Header>
<Label Text="{Binding Name}"/>
</mct:Expander.Header>
<mct:Expander.Content>
<VerticalStackLayout>
<Label Text="{Binding Resource}"/>
<Image Source="{Binding Image}"
WidthRequest="100"
HeightRequest="100"/>
</VerticalStackLayout>
</mct:Expander.Content>
</mct:Expander>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>

<Label Text="Expander in CollectionView with LinearItemsLayout" FontSize="24" FontAttributes="Bold"/>

<CollectionView ItemsSource="{Binding ContentCreators}">
Expand Down
35 changes: 11 additions & 24 deletions samples/CommunityToolkit.Maui.Sample/Resources/Styles/Styles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<?xaml-comp compile="true" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit">
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">

<!-- Explicit styles -->
<Style x:Key="PopupLayout" TargetType="Layout" ApplyToDerivedTypes="true">
Expand Down Expand Up @@ -123,13 +122,6 @@
</Setter>
</Style>

<Style TargetType="Frame" ApplyToDerivedTypes="true" >
<Setter Property="HasShadow" Value="True" />
<Setter Property="BorderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Gray950}}" />
<Setter Property="CornerRadius" Value="8" />
</Style>

<Style TargetType="ImageButton">
<Setter Property="Opacity" Value="1" />
<Setter Property="BorderColor" Value="Transparent"/>
Expand Down Expand Up @@ -166,11 +158,6 @@
</Setter>
</Style>

<Style TargetType="ListView">
<Setter Property="SeparatorColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
<Setter Property="RefreshControlColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
</Style>

<Style TargetType="Picker">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
<Setter Property="TitleColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
Expand Down Expand Up @@ -349,16 +336,16 @@
</Style>

<Style TargetType="Shell" ApplyToDerivedTypes="True">
<Setter Property="Shell.BackgroundColor" Value="{OnPlatform WinUI=Transparent, Default={AppThemeBinding Light={StaticResource NavBarColor}, Dark={StaticResource Gray950}}}" />
<Setter Property="Shell.ForegroundColor" Value="{AppThemeBinding Light={OnPlatform WinUI={StaticResource Black}, Default={StaticResource White}}, Dark={StaticResource White}}" />
<Setter Property="Shell.TitleColor" Value="{AppThemeBinding Light={OnPlatform WinUI={StaticResource Black}, Default={StaticResource White}}, Dark={StaticResource White}}" />
<Setter Property="Shell.DisabledColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
<Setter Property="Shell.UnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray200}}" />
<Setter Property="Shell.NavBarHasShadow" Value="True" />
<Setter Property="Shell.TabBarBackgroundColor" Value="{OnPlatform WinUI=Transparent, Default={AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}}" />
<Setter Property="Shell.TabBarForegroundColor" Value="{AppThemeBinding Light={StaticResource PrimaryColor}, Dark={StaticResource White}}" />
<Setter Property="Shell.TabBarTitleColor" Value="{AppThemeBinding Light={StaticResource PrimaryColor}, Dark={StaticResource White}}" />
<Setter Property="Shell.TabBarUnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
<Setter Property="BackgroundColor" Value="{OnPlatform WinUI=Transparent, Default={AppThemeBinding Light={StaticResource NavBarColor}, Dark={StaticResource Gray950}}}" />
<Setter Property="ForegroundColor" Value="{AppThemeBinding Light={OnPlatform WinUI={StaticResource Black}, Default={StaticResource White}}, Dark={StaticResource White}}" />
<Setter Property="TitleColor" Value="{AppThemeBinding Light={OnPlatform WinUI={StaticResource Black}, Default={StaticResource White}}, Dark={StaticResource White}}" />
<Setter Property="DisabledColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
<Setter Property="UnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray200}}" />
<Setter Property="NavBarHasShadow" Value="True" />
<Setter Property="TabBarBackgroundColor" Value="{OnPlatform WinUI=Transparent, Default={AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}}" />
<Setter Property="TabBarForegroundColor" Value="{AppThemeBinding Light={StaticResource PrimaryColor}, Dark={StaticResource White}}" />
<Setter Property="TabBarTitleColor" Value="{AppThemeBinding Light={StaticResource PrimaryColor}, Dark={StaticResource White}}" />
<Setter Property="TabBarUnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
</Style>

<Style TargetType="TabbedPage">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.15.6" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.15.6" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.15.7" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CommunityToolkit.Maui.Analyzers.UnitTests\CommunityToolkit.Maui.Analyzers.UnitTests.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing" Version="1.1.2" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="1.1.2" />
<PackageReference Include="xunit.v3" Version="3.2.0" />
<PackageReference Include="xunit.v3.mtp-v2" Version="3.2.0" />
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.1.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.14.0" />
</ItemGroup>
Expand All @@ -37,5 +37,5 @@
<ProjectReference Include="..\CommunityToolkit.Maui.MediaElement\CommunityToolkit.Maui.MediaElement.csproj" />
<ProjectReference Include="..\CommunityToolkit.Maui\CommunityToolkit.Maui.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Microsoft.CodeAnalysis.CSharp.Testing;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Testing;
using Xunit;

namespace CommunityToolkit.Maui.Analyzers.UnitTests;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Microsoft.CodeAnalysis.CSharp.Testing;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Testing;
using Xunit;

namespace CommunityToolkit.Maui.Analyzers.UnitTests;

Expand Down
10 changes: 5 additions & 5 deletions src/CommunityToolkit.Maui.Camera/CameraManager.android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,10 @@ protected async Task StartUseCase(CancellationToken token)

if (Quality.Highest is not null)
{
videoRecorderBuilder = videoRecorderBuilder?.SetQualitySelector(QualitySelector.From(Quality.Highest));
videoRecorderBuilder = videoRecorderBuilder.SetQualitySelector(QualitySelector.From(Quality.Highest));
}

videoRecorder = videoRecorderBuilder?.Build();
videoRecorder = videoRecorderBuilder.Build();
videoCapture = VideoCapture.WithOutput(videoRecorder);

await StartCameraPreview(token);
Expand All @@ -285,7 +285,7 @@ protected virtual async partial Task PlatformStartCameraPreview(CancellationToke
camera = await RebindCamera(processCameraProvider, cameraView.SelectedCamera, token, cameraPreview, imageCapture, videoCapture);
cameraControl = camera.CameraControl;

var point = previewView.MeteringPointFactory?.CreatePoint(previewView.Width / 2.0f, previewView.Height / 2.0f, 0.1f);
var point = previewView.MeteringPointFactory.CreatePoint(previewView.Width / 2.0f, previewView.Height / 2.0f, 0.1f);
var action = new FocusMeteringAction.Builder(point).Build();
camera.CameraControl?.StartFocusAndMetering(action);

Expand Down Expand Up @@ -476,7 +476,7 @@ void SetImageCaptureTargetRotation(int rotation)

sealed class ImageCallBack(ICameraView cameraView) : ImageCapture.OnImageCapturedCallback
{
public override void OnCaptureSuccess(IImageProxy? image)
public override void OnCaptureSuccess(IImageProxy image)
{
base.OnCaptureSuccess(image);
var img = image?.Image;
Expand Down Expand Up @@ -524,7 +524,7 @@ public override void OnCaptureSuccess(IImageProxy? image)
}
}

public override void OnError(ImageCaptureException? exception)
public override void OnError(ImageCaptureException exception)
{
base.OnError(exception);
cameraView.OnMediaCapturedFailed(exception?.Message ?? "An unknown error occurred.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@

<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
<!-- Required NuGet Packages -->
<PackageReference Include="Xamarin.AndroidX.Camera.Camera2" Version="1.5.0" />
<PackageReference Include="Xamarin.AndroidX.Camera.View" Version="1.5.0" />
<PackageReference Include="Xamarin.AndroidX.Camera.Extensions" Version="1.5.0" />
<PackageReference Include="Xamarin.AndroidX.Camera.Camera2" Version="1.4.2.3" />
<PackageReference Include="Xamarin.AndroidX.Camera.View" Version="1.4.2.3" />
<PackageReference Include="Xamarin.AndroidX.Camera.Extensions" Version="1.4.2.3" />

<PackageReference Include="Xamarin.AndroidX.Activity.Ktx" Version="1.11.0" />
<PackageReference Include="Xamarin.AndroidX.Activity.Ktx" Version="1.10.1.3" />

<!-- Ensure Linker does not remove required libraries -->
<None Include="linker.xml" Pack="true" PackagePath="build\$(PackageId).LinkerConfigurationFile.xml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<PackageReference Include="Microsoft.Maui.Core" Version="$(MauiPackageVersion)" />
<PackageReference Include="Microsoft.Maui.Essentials" Version="$(MauiPackageVersion)" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" Condition=" '$(Configuration)'=='Release' " PrivateAssets="All" />
<PackageReference Include="System.Speech" Version="9.0.5" Condition="'$(TargetFramework)' == '$(NetVersion)-windows10.0.19041.0'" />
<PackageReference Include="System.Speech" Version="10.0.0" Condition="'$(TargetFramework)' == '$(NetVersion)-windows10.0.19041.0'" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.Contains('-tizen'))">
Expand Down
Loading
Loading