Skip to content

Commit

Permalink
Merge branch 'main' into fix-4734-ios
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuarezruiz committed Jul 11, 2023
2 parents 05b0495 + b9f64e1 commit b62d39d
Show file tree
Hide file tree
Showing 136 changed files with 2,629 additions and 1,172 deletions.
Expand Up @@ -18,7 +18,7 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="Xam.Plugin.DeviceInfo" Version="4.1.1" />
<PackageReference Include="Xamarin.UITest" Version="4.1.4" />
<PackageReference Include="Xamarin.UITest" Version="4.2.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
</ItemGroup>

Expand Down
Expand Up @@ -23,7 +23,7 @@
<PackageReference Include="Selenium.Support" Version="4.1.1" />
<PackageReference Include="Selenium.WebDriver" Version="4.1.1" />
<PackageReference Include="Xam.Plugin.DeviceInfo" Version="4.1.1" />
<PackageReference Include="Xamarin.UITest" Version="4.1.4" />
<PackageReference Include="Xamarin.UITest" Version="4.2.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
</ItemGroup>

Expand Down
Expand Up @@ -18,7 +18,7 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="Xam.Plugin.DeviceInfo" Version="4.1.1" />
<PackageReference Include="Xamarin.UITest" Version="4.1.4" />
<PackageReference Include="Xamarin.UITest" Version="4.2.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
</ItemGroup>

Expand Down
40 changes: 0 additions & 40 deletions src/Controls/docs/Microsoft.Maui.Controls/InputView.xml
Expand Up @@ -97,46 +97,6 @@
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsSpellCheckEnabled">
<MemberSignature Language="C#" Value="public bool IsSpellCheckEnabled { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsSpellCheckEnabled" />
<MemberSignature Language="DocId" Value="P:Microsoft.Maui.Controls.InputView.IsSpellCheckEnabled" />
<MemberSignature Language="F#" Value="member this.IsSpellCheckEnabled : bool with get, set" Usage="Microsoft.Maui.Controls.InputView.IsSpellCheckEnabled" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Maui.Controls.Core</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value that controls whether spell checking is enabled.</summary>
<value>
<see langword="true" /> if spell checking is enabled. Otherwise <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsSpellCheckEnabledProperty">
<MemberSignature Language="C#" Value="public static readonly Microsoft.Maui.Controls.BindableProperty IsSpellCheckEnabledProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class Microsoft.Maui.Controls.BindableProperty IsSpellCheckEnabledProperty" />
<MemberSignature Language="DocId" Value="F:Microsoft.Maui.Controls.InputView.IsSpellCheckEnabledProperty" />
<MemberSignature Language="F#" Value=" staticval mutable IsSpellCheckEnabledProperty : Microsoft.Maui.Controls.BindableProperty" Usage="Microsoft.Maui.Controls.InputView.IsSpellCheckEnabledProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Maui.Controls.Core</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Maui.Controls.BindableProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Backing store for the <see cref="P:Microsoft.Maui.Controls.InputView.IsSpellCheckEnabled" /> property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Keyboard">
<MemberSignature Language="C#" Value="public Microsoft.Maui.Keyboard Keyboard { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Maui.Keyboard Keyboard" />
Expand Down
Expand Up @@ -54,6 +54,34 @@
<Editor
IsReadOnly="True"
Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam eget tempus lorem. Sed vitae elit nisi. Donec quis quam sed mi lobortis suscipit vel quis augue. Phasellus risus enim, venenatis id blandit non, vehicula nec dui. Quisque luctus nisi vel ex imperdiet, eget molestie nisl cursus. Cras posuere vulputate lectus, ut sodales augue consequat vel." />
<Label
Text="SpellCheck (True), TextPrediction (True)"
Style="{StaticResource Headline}" />
<Editor
Text="Whats new"
IsSpellCheckEnabled="True"
IsTextPredictionEnabled="True"/>
<Label
Text="SpellCheck (False), TextPrediction (True)"
Style="{StaticResource Headline}" />
<Editor
Text="Whats new"
IsSpellCheckEnabled="False"
IsTextPredictionEnabled="True"/>
<Label
Text="SpellCheck (True), TextPrediction (False)"
Style="{StaticResource Headline}" />
<Editor
Text="Whats new"
IsSpellCheckEnabled="True"
IsTextPredictionEnabled="False"/>
<Label
Text="SpellCheck (False), TextPrediction (False)"
Style="{StaticResource Headline}" />
<Editor
Text="Whats new"
IsSpellCheckEnabled="False"
IsTextPredictionEnabled="False"/>
<Label
Text="Focus"
Style="{StaticResource Headline}" />
Expand Down
28 changes: 28 additions & 0 deletions src/Controls/samples/Controls.Sample/Pages/Controls/EntryPage.xaml
Expand Up @@ -114,6 +114,34 @@
<Entry
Text="I am read only"
IsReadOnly="True"/>
<Label
Text="SpellCheck (True), TextPrediction (True)"
Style="{StaticResource Headline}" />
<Entry
Text="Whats new"
IsSpellCheckEnabled="True"
IsTextPredictionEnabled="True"/>
<Label
Text="SpellCheck (False), TextPrediction (True)"
Style="{StaticResource Headline}" />
<Entry
Text="Whats new"
IsSpellCheckEnabled="False"
IsTextPredictionEnabled="True"/>
<Label
Text="SpellCheck (True), TextPrediction (False)"
Style="{StaticResource Headline}" />
<Entry
Text="Whats new"
IsSpellCheckEnabled="True"
IsTextPredictionEnabled="False"/>
<Label
Text="SpellCheck (False), TextPrediction (False)"
Style="{StaticResource Headline}" />
<Entry
Text="Whats new"
IsSpellCheckEnabled="False"
IsTextPredictionEnabled="False"/>
<Label
Text="Return Command"
Style="{StaticResource Headline}" />
Expand Down
@@ -1,4 +1,4 @@
<views:BasePage
<views:BasePage
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Maui.Controls.Sample.Pages.LabelPage"
Expand All @@ -16,6 +16,7 @@
Text="Defaults"/>
<Label
Text="Label with Tooltip"
FontFamily=".SFUI-Bold"
ToolTipProperties.Text="This has a tooltip!"/>
<Label
TextColor="Red"
Expand Down
Expand Up @@ -64,14 +64,32 @@
Text="at the bottom"
HeightRequest="100"/>
<Label
Text="IsTextPredictionEnabled=True"
Style="{StaticResource Headline}"/>
<SearchBar
Text="SpellCheck (True), TextPrediction (True)"
Style="{StaticResource Headline}" />
<SearchBar
Text="Whats new"
IsSpellCheckEnabled="True"
IsTextPredictionEnabled="True"/>
<Label
Text="IsTextPredictionEnabled=False"
Style="{StaticResource Headline}"/>
<SearchBar
Text="SpellCheck (False), TextPrediction (True)"
Style="{StaticResource Headline}" />
<SearchBar
Text="Whats new"
IsSpellCheckEnabled="False"
IsTextPredictionEnabled="True"/>
<Label
Text="SpellCheck (True), TextPrediction (False)"
Style="{StaticResource Headline}" />
<SearchBar
Text="Whats new"
IsSpellCheckEnabled="True"
IsTextPredictionEnabled="False"/>
<Label
Text="SpellCheck (False), TextPrediction (False)"
Style="{StaticResource Headline}" />
<SearchBar
Text="Whats new"
IsSpellCheckEnabled="False"
IsTextPredictionEnabled="False"/>
<Label
Text="Focus"
Expand Down
Expand Up @@ -3,70 +3,100 @@
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Maui.Controls.Sample.Pages.InputTransparentPage">
<ContentPage.Resources>
<ResourceDictionary>

<ContentPage.Resources>
<ResourceDictionary>
<Style TargetType="Label">
</Style>

<Style TargetType="Button">
<!-- <Setter Property="Padding" Value="14,10" /> -->
<!-- <Setter Property="WidthRequest" Value="200"/> -->
<!-- <Setter Property="WidthRequest" Value="200"/> -->
</Style>
</ResourceDictionary>
</ContentPage.Resources>

<ContentPage.Content>
<ScrollView>
<VerticalStackLayout>
<Label Text="This Button has InputTransparent=false; it should be clickable."/>
<Button Text="Clickable" Clicked="ClickSuccess" HorizontalOptions="Center" />

<Label Margin="0,10,0,0" Text="This Button has InputTransparent=true; it should not be clickable."/>
<Button InputTransparent="True" Text="Not Clickable" Clicked="ClickFail" HorizontalOptions="Center" />

<Grid Margin="0,10,0,0" RowDefinitions="Auto, Auto">

<Label Text="This Button has InputTransparent=true; it should not be clickable. But the button hidden under it should be."/>

<Button Grid.Row="1" Margin="2,2,0,0" InputTransparent="False" Text="Clickable" Clicked="ClickSuccess"
HorizontalOptions="Center" />

<Button BackgroundColor="LightBlue" Grid.Row="1" InputTransparent="True" Text="Not Clickable" Clicked="ClickFail"
HorizontalOptions="Center"/>

</Grid>

<Label Margin="0,10,0,0" Text="The Grid below has controls and an overlay layer with more controls."/>

<Grid>

<Grid Margin="10" HeightRequest="100" BackgroundColor="LightBlue">
<Button Text="Bottom Layer" Clicked="ClickSuccess" HorizontalOptions="Center" VerticalOptions="Center" />
</Grid>

<Grid HorizontalOptions="Fill" VerticalOptions="Fill" InputTransparent="True" CascadeInputTransparent="False">
<Button Text="Overlay BR" Clicked="ClickSuccess" HorizontalOptions="End" VerticalOptions="End" Margin="5" />
<Button Text="Overlay TL" Clicked="ClickSuccess" HorizontalOptions="Start" VerticalOptions="Start" Margin="5" />
</Grid>

</Grid>

<Label Margin="0,10,0,0" Text="The Grid below has controls an overlay with CascadeInputTransparent set to true; the overlay buttons should not be usable."/>

<Grid>

<Grid Margin="10" HeightRequest="100" BackgroundColor="LightBlue">
<Button Text="Bottom Layer" Clicked="ClickSuccess" HorizontalOptions="Center" VerticalOptions="Center" />
</Grid>

<Grid HorizontalOptions="Fill" VerticalOptions="Fill" InputTransparent="True" CascadeInputTransparent="True">
<Button Text="Overlay BR" Clicked="ClickFail" HorizontalOptions="End" VerticalOptions="End" Margin="5" />
<Button Text="Overlay TL" Clicked="ClickFail" HorizontalOptions="Start" VerticalOptions="Start" Margin="5" />
</Grid>

</Grid>

</VerticalStackLayout>
</ScrollView>
</ContentPage.Content>
</ContentPage.Resources>

<ScrollView>
<VerticalStackLayout>
<Label Text="This Button has InputTransparent=false; it should be clickable."/>
<Button Text="Clickable" Clicked="ClickSuccess" HorizontalOptions="Center" />

<Label Margin="0,10,0,0" Text="This Button has InputTransparent=true; it should not be clickable."/>
<Button InputTransparent="True" Text="Not Clickable" Clicked="ClickFail" HorizontalOptions="Center" />

<Label Margin="0,10,0,0" Text="This Button has InputTransparent=true; it should not be clickable. But the button hidden under it should be."/>
<Grid RowDefinitions="Auto" ColumnDefinitions="Auto">

<Button InputTransparent="False" Text="Clickable" Clicked="ClickSuccess" Grid.Row="1" Margin="2,2,0,0" HorizontalOptions="Center" />

<Button InputTransparent="True" Text="Not Clickable" Clicked="ClickFail" BackgroundColor="LightBlue" Grid.Row="1" HorizontalOptions="Center" />

</Grid>

<Label Margin="0,10,0,0" Text="The Grid below has controls and an overlay layer with more controls."/>
<Grid>

<Grid Margin="10" HeightRequest="100" BackgroundColor="LightBlue">
<Button Text="Bottom Layer" Clicked="ClickSuccess" HorizontalOptions="Center" VerticalOptions="Center" />
</Grid>

<Grid InputTransparent="True" CascadeInputTransparent="False" HorizontalOptions="Fill" VerticalOptions="Fill">
<Button Text="Overlay BR" Clicked="ClickSuccess" HorizontalOptions="End" VerticalOptions="End" Margin="5" />
<Button Text="Overlay TL" Clicked="ClickSuccess" HorizontalOptions="Start" VerticalOptions="Start" Margin="5" />
</Grid>

</Grid>

<Label Margin="0,10,0,0" Text="The Grid below has controls an overlay with CascadeInputTransparent set to true; the overlay buttons should not be usable."/>
<Grid>

<Grid Margin="10" HeightRequest="100" BackgroundColor="LightBlue">
<Button Text="Bottom Layer" Clicked="ClickSuccess" HorizontalOptions="Center" VerticalOptions="Center" />
</Grid>

<Grid HorizontalOptions="Fill" VerticalOptions="Fill" InputTransparent="True" CascadeInputTransparent="True">
<Button Text="Overlay BR" Clicked="ClickFail" HorizontalOptions="End" VerticalOptions="End" Margin="5" />
<Button Text="Overlay TL" Clicked="ClickFail" HorizontalOptions="Start" VerticalOptions="Start" Margin="5" />
</Grid>

</Grid>

<Label Margin="0,10,0,0" Text="The Grid below has a 'Test Button' that is controlled by the switches."/>
<VerticalStackLayout>

<Grid Margin="10" HeightRequest="100" BackgroundColor="LightBlue">

<Grid x:Name="rootLayout">
<Grid x:Name="nestedLayout">
<Button x:Name="testButton" Text="Test Button" Clicked="ClickSuccess" HorizontalOptions="Center" VerticalOptions="Center" />
</Grid>
</Grid>
</Grid>

<Grid ColumnDefinitions="Auto,Auto,Auto,Auto,Auto,2" RowDefinitions="Auto,Auto,Auto" ColumnSpacing="12" RowSpacing="6" Margin="10,0,10,0">
<!-- root -->
<Label Grid.Row="0" Grid.Column="0" Text="Root" VerticalOptions="Center" FontAttributes="Bold" />
<Label Grid.Row="0" Grid.Column="1" Text="Transparent" VerticalOptions="Center" />
<Switch Grid.Row="0" Grid.Column="2" IsToggled="{Binding InputTransparent, Source={Reference rootLayout}, Mode=OneWayToSource}" VerticalOptions="Center" />
<Label Grid.Row="0" Grid.Column="3" Text="Cascade" VerticalOptions="Center" />
<Switch Grid.Row="0" Grid.Column="4" IsToggled="{Binding CascadeInputTransparent, Source={Reference rootLayout}, Mode=OneWayToSource}" VerticalOptions="Center" />
<BoxView Grid.Row="0" Grid.Column="5" Color="Green" WidthRequest="2" HorizontalOptions="End" IsVisible="{Binding InputTransparent, Source={Reference rootLayout}, Mode=OneWay}" />
<!-- nested -->
<Label Grid.Row="1" Grid.Column="0" Text="Nested" VerticalOptions="Center" FontAttributes="Bold" />
<Label Grid.Row="1" Grid.Column="1" Text="Transparent" VerticalOptions="Center" />
<Switch Grid.Row="1" Grid.Column="2" IsToggled="{Binding InputTransparent, Source={Reference nestedLayout}, Mode=OneWayToSource}" VerticalOptions="Center" />
<Label Grid.Row="1" Grid.Column="3" Text="Cascade" VerticalOptions="Center" />
<Switch Grid.Row="1" Grid.Column="4" IsToggled="{Binding CascadeInputTransparent, Source={Reference nestedLayout}, Mode=OneWayToSource}" VerticalOptions="Center" />
<BoxView Grid.Row="1" Grid.Column="5" Color="Green" WidthRequest="2" HorizontalOptions="End" IsVisible="{Binding InputTransparent, Source={Reference nestedLayout}, Mode=OneWay}" />
<!-- button -->
<Label Grid.Row="2" Grid.Column="0" Text="Button" VerticalOptions="Center" FontAttributes="Bold" />
<Label Grid.Row="2" Grid.Column="1" Text="Transparent" VerticalOptions="Center" />
<Switch Grid.Row="2" Grid.Column="2" IsToggled="{Binding InputTransparent, Source={Reference testButton}, Mode=OneWayToSource}" VerticalOptions="Center" />
<BoxView Grid.Row="2" Grid.Column="5" Color="Green" WidthRequest="2" HorizontalOptions="End" IsVisible="{Binding InputTransparent, Source={Reference testButton}, Mode=OneWay}" />
</Grid>

</VerticalStackLayout>

</VerticalStackLayout>
</ScrollView>

</ContentPage>
Expand Up @@ -55,13 +55,13 @@ public virtual void SetAppearance(BottomNavigationView bottomView, IShellAppeara
var titleColor = controller.EffectiveTabBarTitleColor;

_itemTextColor = MakeColorStateList(
titleColor ?? foregroundColor,
disabledColor,
titleColor ?? foregroundColor,
disabledColor,
unselectedColor);

_itemIconTint = MakeColorStateList(
foregroundColor ?? titleColor,
disabledColor,
foregroundColor ?? titleColor,
disabledColor,
unselectedColor);

bottomView.ItemTextColor = _itemTextColor;
Expand Down

0 comments on commit b62d39d

Please sign in to comment.