File tree Expand file tree Collapse file tree 4 files changed +14
-6
lines changed
samples/ScreenBrightnessSample
src/Plugin.Maui.ScreenBrightness Expand file tree Collapse file tree 4 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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 >
You can’t perform that action at this time.
0 commit comments