Skip to content

Commit e8398f5

Browse files
committed
Cleanup
1 parent 88c63dc commit e8398f5

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

samples/ScreenBrightnessSample/MainPage.xaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,11 @@
44
x:Class="ScreenBrightnessSample.MainPage"
55
Title="Screen Brightness Plugin">
66

7-
<Slider x:Name="brightnessSlider" ValueChanged="Slider_ValueChanged" />
7+
<VerticalStackLayout
8+
VerticalOptions="CenterAndExpand"
9+
HorizontalOptions="CenterAndExpand"
10+
Padding="30,0">
11+
<Label x:Name="brightnessLabel" />
12+
<Slider x:Name="brightnessSlider" ValueChanged="Slider_ValueChanged" />
13+
</VerticalStackLayout>
814
</ContentPage>

samples/ScreenBrightnessSample/MainPage.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ public MainPage(IScreenBrightness screenBrightness)
1717
void Slider_ValueChanged(System.Object sender, Microsoft.Maui.Controls.ValueChangedEventArgs e)
1818
{
1919
_screenBrightness.Brightness = (float)e.NewValue;
20+
brightnessLabel.Text = $"Current Brightness: {Math.Round(_screenBrightness.Brightness, 2)}";
2021
}
2122
}

samples/ScreenBrightnessSample/ScreenBrightnessSample.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
5-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0-android;net6.0-ios</TargetFrameworks>
5+
<!--<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>-->
6+
<!--<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>-->
67
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
78
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
89
<OutputType>Exe</OutputType>

src/Plugin.Maui.ScreenBrightness/Plugin.Maui.ScreenBrightness.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst;net6.0</TargetFrameworks>
4-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
3+
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0</TargetFrameworks>
4+
<!--<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst;net6.0</TargetFrameworks>-->
5+
<!--<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>-->
56
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
67
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
78
<SingleProject>true</SingleProject>
89
<ImplicitUsings>enable</ImplicitUsings>
910
<Nullable>enable</Nullable>
10-
<UseMauiEssentials>true</UseMauiEssentials>
1111

1212
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
1313
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>

0 commit comments

Comments
 (0)