Skip to content
Open
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
26 changes: 26 additions & 0 deletions 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.0.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BoxViewFill", "BoxViewFill\BoxViewFill.csproj", "{A351A85C-898E-478C-A5B0-9E9212721D3F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A351A85C-898E-478C-A5B0-9E9212721D3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A351A85C-898E-478C-A5B0-9E9212721D3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A351A85C-898E-478C-A5B0-9E9212721D3F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{A351A85C-898E-478C-A5B0-9E9212721D3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A351A85C-898E-478C-A5B0-9E9212721D3F}.Release|Any CPU.Build.0 = Release|Any CPU
{A351A85C-898E-478C-A5B0-9E9212721D3F}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7FF5A410-C81C-4168-BAFA-CB66DBC453BE}
EndGlobalSection
EndGlobal
14 changes: 14 additions & 0 deletions 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:BoxViewFill"
x:Class="BoxViewFill.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace BoxViewFill;

public partial class App : Application
{
public App()
{
InitializeComponent();
}

protected override Window CreateWindow(IActivationState? activationState)
{
return new Window(new MainPage())
{
Title = "BoxView Fill - .NET MAUI 11"
};
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net11.0-android;net11.0-ios;net11.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net11.0-windows10.0.19041.0</TargetFrameworks>

<OutputType>Exe</OutputType>
<RootNamespace>BoxViewFill</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<MauiEnableXamlCBindingWithSourceCompilation>true</MauiEnableXamlCBindingWithSourceCompilation>

<!-- Display name -->
<ApplicationTitle>BoxViewFill</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>com.companyname.boxviewfill</ApplicationId>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<WindowsPackageType>None</WindowsPackageType>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">17.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">24.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>

<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />

<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />

<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\dotnet_bot.png" Resize="True" BaseSize="300,185" />

<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />

<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(DotNetVersion)" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
global using Microsoft.Maui.Controls;
global using Microsoft.Maui.Controls.Xaml;
global using Microsoft.Maui.Controls.Shapes;
114 changes: 114 additions & 0 deletions 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/MainPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="BoxViewFill.MainPage"
BackgroundColor="#F0F2F5">

<ScrollView>
<VerticalStackLayout Padding="20,40" Spacing="20">

<Label Text="BoxView.Fill"
FontSize="28"
FontAttributes="Bold"
TextColor="#512BD4"
HorizontalOptions="Center" />

<Label Text="The new Fill property on BoxView accepts any Brush, so gradients and patterns can paint a BoxView without a custom handler."
FontSize="14"
TextColor="#666666"
HorizontalOptions="Center"
HorizontalTextAlignment="Center" />

<Label Text="SolidColorBrush"
FontSize="18"
FontAttributes="Bold"
TextColor="#333333"
Margin="0,10,0,0" />

<!-- <docregion_fill_solid> -->
<BoxView HeightRequest="80"
CornerRadius="12">
<BoxView.Fill>
<SolidColorBrush Color="#512BD4" />

Check failure on line 32 in 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/MainPage.xaml

View workflow job for this annotation

GitHub Actions / build (macos-26)

No accessible property, BindableProperty, or event found for "Fill", or mismatching type between value and property.

Check failure on line 32 in 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/MainPage.xaml

View workflow job for this annotation

GitHub Actions / build (macos-26)

No accessible property, BindableProperty, or event found for "Fill", or mismatching type between value and property.

Check failure on line 32 in 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/MainPage.xaml

View workflow job for this annotation

GitHub Actions / build (windows-latest)

No accessible property, BindableProperty, or event found for "Fill", or mismatching type between value and property.

Check failure on line 32 in 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/MainPage.xaml

View workflow job for this annotation

GitHub Actions / build (windows-latest)

No accessible property, BindableProperty, or event found for "Fill", or mismatching type between value and property.

Check failure on line 32 in 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/MainPage.xaml

View workflow job for this annotation

GitHub Actions / build (windows-latest)

No accessible property, BindableProperty, or event found for "Fill", or mismatching type between value and property.
</BoxView.Fill>
</BoxView>
<!-- </docregion_fill_solid> -->

<Label Text="LinearGradientBrush"
FontSize="18"
FontAttributes="Bold"
TextColor="#333333"
Margin="0,10,0,0" />

<!-- <docregion_fill_linear> -->
<BoxView HeightRequest="120"
CornerRadius="12">
<BoxView.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">

Check failure on line 47 in 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/MainPage.xaml

View workflow job for this annotation

GitHub Actions / build (macos-26)

No accessible property, BindableProperty, or event found for "Fill", or mismatching type between value and property.

Check failure on line 47 in 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/MainPage.xaml

View workflow job for this annotation

GitHub Actions / build (macos-26)

No accessible property, BindableProperty, or event found for "Fill", or mismatching type between value and property.

Check failure on line 47 in 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/MainPage.xaml

View workflow job for this annotation

GitHub Actions / build (windows-latest)

No accessible property, BindableProperty, or event found for "Fill", or mismatching type between value and property.

Check failure on line 47 in 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/MainPage.xaml

View workflow job for this annotation

GitHub Actions / build (windows-latest)

No accessible property, BindableProperty, or event found for "Fill", or mismatching type between value and property.

Check failure on line 47 in 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/MainPage.xaml

View workflow job for this annotation

GitHub Actions / build (windows-latest)

No accessible property, BindableProperty, or event found for "Fill", or mismatching type between value and property.
<GradientStop Color="#512BD4" Offset="0.0" />
<GradientStop Color="#0099CC" Offset="1.0" />
</LinearGradientBrush>
</BoxView.Fill>
</BoxView>
<!-- </docregion_fill_linear> -->

<Label Text="RadialGradientBrush"
FontSize="18"
FontAttributes="Bold"
TextColor="#333333"
Margin="0,10,0,0" />

<!-- <docregion_fill_radial> -->
<BoxView HeightRequest="160"
CornerRadius="80">
<BoxView.Fill>
<RadialGradientBrush Center="0.5,0.5" Radius="0.5">

Check failure on line 65 in 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/MainPage.xaml

View workflow job for this annotation

GitHub Actions / build (macos-26)

No accessible property, BindableProperty, or event found for "Fill", or mismatching type between value and property.

Check failure on line 65 in 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/MainPage.xaml

View workflow job for this annotation

GitHub Actions / build (macos-26)

No accessible property, BindableProperty, or event found for "Fill", or mismatching type between value and property.

Check failure on line 65 in 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/MainPage.xaml

View workflow job for this annotation

GitHub Actions / build (windows-latest)

No accessible property, BindableProperty, or event found for "Fill", or mismatching type between value and property.

Check failure on line 65 in 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/MainPage.xaml

View workflow job for this annotation

GitHub Actions / build (windows-latest)

No accessible property, BindableProperty, or event found for "Fill", or mismatching type between value and property.
<GradientStop Color="#FFC107" Offset="0.0" />
<GradientStop Color="#FF5722" Offset="0.8" />
<GradientStop Color="#7B1FA2" Offset="1.0" />
</RadialGradientBrush>
</BoxView.Fill>
</BoxView>
<!-- </docregion_fill_radial> -->

<Label Text="Fill vs BackgroundColor"
FontSize="18"
FontAttributes="Bold"
TextColor="#333333"
Margin="0,20,0,0" />

<Label Text="BackgroundColor still works for solid colors, but only Fill supports brushes."
FontSize="13"
TextColor="#888888" />

<Grid ColumnDefinitions="*,*" ColumnSpacing="12">
<VerticalStackLayout Grid.Column="0" Spacing="6">
<Label Text="BackgroundColor"
FontSize="13"
TextColor="#666666"
HorizontalOptions="Center" />
<BoxView BackgroundColor="#0099CC"
HeightRequest="80"
CornerRadius="8" />
</VerticalStackLayout>
<VerticalStackLayout Grid.Column="1" Spacing="6">
<Label Text="Fill (Brush)"
FontSize="13"
TextColor="#666666"
HorizontalOptions="Center" />
<BoxView HeightRequest="80"
CornerRadius="8">
<BoxView.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">

Check failure on line 102 in 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/MainPage.xaml

View workflow job for this annotation

GitHub Actions / build (macos-26)

No accessible property, BindableProperty, or event found for "Fill", or mismatching type between value and property.

Check failure on line 102 in 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/MainPage.xaml

View workflow job for this annotation

GitHub Actions / build (macos-26)

No accessible property, BindableProperty, or event found for "Fill", or mismatching type between value and property.

Check failure on line 102 in 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/MainPage.xaml

View workflow job for this annotation

GitHub Actions / build (windows-latest)

No accessible property, BindableProperty, or event found for "Fill", or mismatching type between value and property.

Check failure on line 102 in 11.0/UserInterface/Views/BoxView/BoxViewFill/BoxViewFill/MainPage.xaml

View workflow job for this annotation

GitHub Actions / build (windows-latest)

No accessible property, BindableProperty, or event found for "Fill", or mismatching type between value and property.
<GradientStop Color="#0099CC" Offset="0.0" />
<GradientStop Color="#512BD4" Offset="1.0" />
</LinearGradientBrush>
</BoxView.Fill>
</BoxView>
</VerticalStackLayout>
</Grid>

</VerticalStackLayout>
</ScrollView>

</ContentPage>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace BoxViewFill;

public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using Microsoft.Extensions.Logging;

namespace BoxViewFill;

public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});

#if DEBUG
builder.Logging.AddDebug();
#endif

return builder.Build();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +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" />
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Android.App;
using Android.Content.PM;
using Android.OS;

namespace BoxViewFill
{
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Android.App;
using Android.Runtime;

namespace BoxViewFill
{
[Application]
public class MainApplication : MauiApplication
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership)
{
}

protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#512BD4</color>
<color name="colorPrimaryDark">#2B0B98</color>
<color name="colorAccent">#2B0B98</color>
</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Foundation;

namespace BoxViewFill
{
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/appicon.appiconset</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using ObjCRuntime;
using UIKit;

namespace BoxViewFill
{
public class Program
{
static void Main(string[] args)
{
UIApplication.Main(args, null, typeof(AppDelegate));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<maui:MauiWinUIApplication
x:Class="BoxViewFill.WinUI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:maui="using:Microsoft.Maui"
xmlns:local="using:BoxViewFill.WinUI">

</maui:MauiWinUIApplication>
Loading
Loading