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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
Expand Down Expand Up @@ -91,6 +91,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Controls\Validation\DataValidationView.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Converters\DebugConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Converters\FiltersConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Converters\FromDataValidationStateToVoiceOverStringConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Converters\FromNullableAppBarButtonToAppBarButtonConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Converters\FromNullableBoolToCustomValueConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Framework\AttachableUserControl.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@
Model="{Binding Form}"
Margin="0,4,0,0">
<!-- List -->
<!-- TODO: When OS voiceover is enabled Dad name is read twice and checkbox doesn't work
Uno Issue: https://github.com/unoplatform/uno/issues/12329-->
<Grid Background="{StaticResource SurfaceBrush}"
CornerRadius="4">
<!--Remove this line from listView Properties to avoid crash on Windows App: ue:ListViewBaseMultipleSelectionBehavior.SelectedItems="{Binding Form.FavoriteDadNames, Mode=TwoWay}"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Nventive.View.Converters;

namespace ApplicationTemplate.Views;

public sealed class FromDataValidationStateToVoiceOverStringConverter : ConverterBase
{
protected override object Convert(object value, Type targetType, object parameter)
{
var validationFailures = value as DataValidationState;

if (validationFailures != null && validationFailures.Errors.Any())
{
var readableString = string.Join(" \n", validationFailures.Errors);

return readableString;
}
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@
<converters:DebugConverter x:Key="Debug" />

<converters:FromNullableAppBarButtonToAppBarButtonConverter x:Key="NullableAppBarButtonToAppBarButton" />

<converters:FromDataValidationStateToVoiceOverStringConverter x:Key="DataValidationStateToVoiceOverString" />
</ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Expand Down Expand Up @@ -475,7 +475,6 @@
Width="12"
Height="4"
Opacity="0"
AutomationProperties.AccessibilityView="Raw"
xamarin:Margin="0,2,0,0" />

<Path x:Name="CheckGlyph"
Expand All @@ -499,7 +498,8 @@
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Grid.Column="1"
TextWrapping="Wrap" />
TextWrapping="Wrap"
Comment thread
Arieldelossantos marked this conversation as resolved.
AutomationProperties.AccessibilityView="Raw" />
</Grid>
</ControlTemplate>
</Setter.Value>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:ApplicationTemplate">

Expand All @@ -19,7 +19,8 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:DataValidationView">
<Grid x:Name="RootGrid">
<Grid x:Name="RootGrid"
AutomationProperties.Name="{Binding State, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DataValidationStateToVoiceOverString}}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="ValidationStates">
<VisualState x:Name="Default" />
Expand Down