Skip to content

Commit

Permalink
1st working release
Browse files Browse the repository at this point in the history
  • Loading branch information
davefxy committed Apr 25, 2023
1 parent ce56a67 commit ad00fd3
Show file tree
Hide file tree
Showing 25 changed files with 33 additions and 52 deletions.
4 changes: 2 additions & 2 deletions AutoSuggestBox/AppBuilderExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using AutoSuggestBox.Handlers;
using Maui.AutoSuggestBox.Handlers;

namespace AutoSuggestBox;
namespace Maui.AutoSuggestBox;

/// <summary>
/// This class contains CustomSwitch <see cref="MauiAppBuilder"/> extensions.
Expand Down
4 changes: 2 additions & 2 deletions AutoSuggestBox/Controls/AutoSuggestBox.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#nullable enable
using AutoSuggestBox.Handlers;
using Maui.AutoSuggestBox.Handlers;
using System.Windows.Input;

namespace AutoSuggestBox
namespace Maui.AutoSuggestBox
{
public class AutoSuggestBox : View, IAutoSuggestBox
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AutoSuggestBox
namespace Maui.AutoSuggestBox
{
/// <summary>
/// Provides event data for the AutoSuggestBox.QuerySubmitted event.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AutoSuggestBox
namespace Maui.AutoSuggestBox
{
/// <summary>
/// Provides data for the <see cref="AutoSuggestBox.SuggestionChosen"/> event.
Expand Down
2 changes: 1 addition & 1 deletion AutoSuggestBox/Controls/AutoSuggestBoxTextChangeReason.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AutoSuggestBox;
namespace Maui.AutoSuggestBox;

public enum AutoSuggestBoxTextChangeReason
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AutoSuggestBox
namespace Maui.AutoSuggestBox
{
/// <summary>
/// Provides data for the TextChanged event.
Expand Down
2 changes: 1 addition & 1 deletion AutoSuggestBox/Controls/IAutoSuggestBox.shared.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AutoSuggestBox;
namespace Maui.AutoSuggestBox;

public interface IAutoSuggestBox : IView
{
Expand Down
2 changes: 1 addition & 1 deletion AutoSuggestBox/Extensions/AutoSuggestBoxViewExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Text;
using System.Threading.Tasks;

namespace AutoSuggestBox.Extensions;
namespace Maui.AutoSuggestBox.Extensions;


/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions AutoSuggestBox/Handlers/AutoSuggestBoxHandler.Android.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#nullable enable
using Microsoft.Maui.Handlers;
using AutoSuggestBox.Platforms.Android;
using Maui.AutoSuggestBox.Platforms.Android;
using Microsoft.Maui.Platform;

namespace AutoSuggestBox.Handlers;
namespace Maui.AutoSuggestBox.Handlers;

public partial class AutoSuggestBoxHandler : ViewHandler<IAutoSuggestBox, AutoSuggestBoxView>
{
Expand Down
6 changes: 3 additions & 3 deletions AutoSuggestBox/Handlers/AutoSuggestBoxHandler.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#if ANDROID
using PlatformView = AutoSuggestBox.Platforms.Android.AutoSuggestBoxView;
using PlatformView = Maui.AutoSuggestBox.Platforms.Android.AutoSuggestBoxView;
#elif IOS
using PlatformView = AutoSuggestBox.Platforms.iOS.AutoSuggestBoxView;
using PlatformView = Maui.AutoSuggestBox.Platforms.iOS.AutoSuggestBoxView;
#elif (NETSTANDARD || !PLATFORM) || (NET6_0_OR_GREATER && !IOS && !ANDROID)
using PlatformView = System.Object;
#endif
using Microsoft.Maui.Handlers;

namespace AutoSuggestBox.Handlers;
namespace Maui.AutoSuggestBox.Handlers;

/// <summary>
/// AutoSuggestBox handler
Expand Down
4 changes: 2 additions & 2 deletions AutoSuggestBox/Handlers/AutoSuggestBoxHandler.iOS.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#nullable enable
using Microsoft.Maui.Handlers;
using AutoSuggestBox.Platforms.iOS;
using Maui.AutoSuggestBox.Platforms.iOS;

namespace AutoSuggestBox.Handlers;
namespace Maui.AutoSuggestBox.Handlers;

public partial class AutoSuggestBoxHandler : ViewHandler<IAutoSuggestBox, AutoSuggestBoxView>
{
Expand Down
2 changes: 1 addition & 1 deletion AutoSuggestBox/Handlers/NativeAutoSuggestBox.Android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.Maui;
using Microsoft.Maui.Platform;

namespace AutoSuggestBox.Platforms.Android
namespace Maui.AutoSuggestBox.Platforms.Android
{
/// <summary>
/// Extends AutoCompleteTextView to have similar APIs and behavior to UWP's AutoSuggestBox, which greatly simplifies wrapping it
Expand Down
2 changes: 1 addition & 1 deletion AutoSuggestBox/Handlers/NativeAutoSuggestBox.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Runtime.InteropServices;
using UIKit;

namespace AutoSuggestBox.Platforms.iOS
namespace Maui.AutoSuggestBox.Platforms.iOS
{
/// <summary>
/// Creates a UIView with dropdown with a similar API and behavior to UWP's AutoSuggestBoxView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">30.0</SupportedOSPlatformVersion>
<RootNamespace>Maui.AutoSuggestBox</RootNamespace>
</PropertyGroup>

<PropertyGroup>
<GitInfoReportImportance>high</GitInfoReportImportance>
<PackageId>DotMorten.Maui.AutoSuggestBox</PackageId>
<PackageId>AutoSuggestBox</PackageId>
<Summary>A control that allows you to design any type of switch/ toggle for .NET MAUI. It's also 100% accessible.</Summary>
<Authors>Morten Nielsen</Authors>
<NeutralLanguage>en</NeutralLanguage>
<Product>DotMorten.Maui.AutoSuggestBox</Product>
<Copyright>Morten Nielsen</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReleaseNotes></PackageReleaseNotes>
<DefineConstants>$(DefineConstants);</DefineConstants>
<UseFullSemVerForNuGet>false</UseFullSemVerForNuGet>
<Title>AutoSuggest Box for .NET MAUI</Title>
<Title>Maui AutoSuggest Box</Title>
<Description>Use an AutoSuggestBox to provide a list of suggestions for a user to select from as they type.</Description>
<Product>$(AssemblyName) ($(TargetFramework))</Product>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
Expand Down
2 changes: 1 addition & 1 deletion AutoSuggestionBoxApp/AutoSuggestionBoxApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AutoSuggestBox\AutoSuggestBox.csproj" />
<ProjectReference Include="..\AutoSuggestBox\Maui.AutoSuggestBox.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion AutoSuggestionBoxApp/MauiProgram.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using AutoSuggestBox;
using Maui.AutoSuggestBox;

namespace AutoSuggestionBoxApp;

Expand Down
2 changes: 1 addition & 1 deletion AutoSuggestionBoxApp/Views/Dynamic.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
x:Class="AutoSuggestionBoxApp.Views.Dynamic"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:AutoSuggestBox;assembly=AutoSuggestBox"
xmlns:local="clr-namespace:Maui.AutoSuggestBox;assembly=Maui.AutoSuggestBox"
Padding="20">
<ScrollView>
<StackLayout>
Expand Down
2 changes: 1 addition & 1 deletion AutoSuggestionBoxApp/Views/Dynamic.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using AutoSuggestBox;
using Maui.AutoSuggestBox;
using Microsoft.Maui.Controls.Platform;

namespace AutoSuggestionBoxApp.Views
Expand Down
2 changes: 1 addition & 1 deletion AutoSuggestionBoxApp/Views/Email.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
x:Class="AutoSuggestionBoxApp.Views.Email"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:AutoSuggestBox;assembly=AutoSuggestBox"
xmlns:local="clr-namespace:Maui.AutoSuggestBox;assembly=Maui.AutoSuggestBox"
Padding="20">
<ContentPage.Content>
<StackLayout>
Expand Down
2 changes: 1 addition & 1 deletion AutoSuggestionBoxApp/Views/Email.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using AutoSuggestBox;
using Maui.AutoSuggestBox;
namespace AutoSuggestionBoxApp.Views
{
[XamlCompilation(XamlCompilationOptions.Compile)]
Expand Down
2 changes: 1 addition & 1 deletion AutoSuggestionBoxApp/Views/PreviousAndSuggested.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
x:Class="AutoSuggestionBoxApp.Views.PreviousAndSuggested"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:AutoSuggestBox;assembly=AutoSuggestBox"
xmlns:local="clr-namespace:Maui.AutoSuggestBox;assembly=Maui.AutoSuggestBox"
Padding="20">
<ContentPage.Content>
<StackLayout>
Expand Down
2 changes: 1 addition & 1 deletion AutoSuggestionBoxApp/Views/PreviousAndSuggested.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using AutoSuggestBox;
using Maui.AutoSuggestBox;
using System.ComponentModel;

namespace AutoSuggestionBoxApp.Views
Expand Down
19 changes: 1 addition & 18 deletions AutoSuggestionBoxApp/Views/Simple.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
x:Class="AutoSuggestionBoxApp.Views.Simple"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:AutoSuggestBox;assembly=AutoSuggestBox"
xmlns:local="clr-namespace:Maui.AutoSuggestBox;assembly=Maui.AutoSuggestBox"
Padding="20">
<ContentPage.Content>
<StackLayout>
Expand All @@ -19,23 +19,6 @@
PlaceholderText="Enter another country"
QuerySubmitted="SuggestBox_QuerySubmitted"
TextChanged="SuggestBox_TextChanged" />
<TableView Intent="Form">
<TableRoot>
<TableSection Title="Country">
<ViewCell>
<StackLayout Padding="10,0" Orientation="Horizontal">
<Label Text="Origin" VerticalOptions="Center" />
<local:AutoSuggestBox
x:Name="SuggestBox3"
PlaceholderText="Enter a country"
QuerySubmitted="SuggestBox_QuerySubmitted"
TextChanged="SuggestBox_TextChanged" />
</StackLayout>
</ViewCell>
</TableSection>
</TableRoot>
</TableView>

</StackLayout>
</ContentPage.Content>
</ContentPage>
4 changes: 1 addition & 3 deletions AutoSuggestionBoxApp/Views/Simple.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using AutoSuggestBox;
using Maui.AutoSuggestBox;
using System.ComponentModel;

namespace AutoSuggestionBoxApp.Views
Expand Down Expand Up @@ -48,8 +48,6 @@ private void SuggestBox_QuerySubmitted(object sender, AutoSuggestBoxQuerySubmitt
SuggestBox2.Focus();
else if (sender == SuggestBox2)
SuggestBox2.Unfocus();
else if (sender == SuggestBox3)
SuggestBox3.Unfocus();
}
}
}
2 changes: 1 addition & 1 deletion dotMorten.Maui.AutoSuggestBox.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.6.33513.286
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoSuggestBox", "AutoSuggestBox\AutoSuggestBox.csproj", "{90DB4AF2-D4DD-4C1A-AF1F-CC3D2C5C9562}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Maui.AutoSuggestBox", "AutoSuggestBox\Maui.AutoSuggestBox.csproj", "{90DB4AF2-D4DD-4C1A-AF1F-CC3D2C5C9562}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoSuggestionBoxApp", "AutoSuggestionBoxApp\AutoSuggestionBoxApp.csproj", "{49376CD0-BF14-47BA-8783-3E0E89C129AC}"
EndProject
Expand Down

0 comments on commit ad00fd3

Please sign in to comment.