Maui vs Xamarin Forms

2 Answers 698 Views
General Discussions
Larry
Top achievements
Rank 1
Iron
Iron
Veteran
Larry asked on 24 Aug 2022, 10:03 PM

I'm just wondering if you folks have run into major UI differences when porting Xamarin code over...

Xamarin version:

Essentially identical code in Maui (only differences were required by Maui, such as SelectorSettings --> PopupSettings):

 

Code involved:

 


<?xml version="1.0" encoding="utf-8" ?>
<ContentView
    x:Class="iTrackBilliards.Views.RotationView"
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:controls="clr-namespace:iTrackBilliards.Controls;assembly=iTrackBilliards"
    xmlns:helpers="clr-namespace:iTrackBilliards.Helpers;assembly=iTrackBilliards"
    xmlns:resx="clr-namespace:iTrackBilliards.Resources;assembly=iTrackBilliards"
    xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
    xmlns:viewModels="clr-namespace:iTrackBilliards.ViewModels;assembly=iTrackBilliards">
    <ContentView.Resources>
        <helpers:RotationCellContentSelector x:Key="RotationCellContentSelector">
            <helpers:RotationCellContentSelector.CellTemplatePlayer1>
                <telerik:DataGridTextCellStyle FontSize="{OnPlatform Default=18, Android=11, iOS=10}" TextColor="{StaticResource Player1Color}" />
            </helpers:RotationCellContentSelector.CellTemplatePlayer1>
            <helpers:RotationCellContentSelector.CellTemplatePlayer2>
                <telerik:DataGridTextCellStyle FontSize="{OnPlatform Default=18, Android=11, iOS=10}" TextColor="{StaticResource Player2Color}" />
            </helpers:RotationCellContentSelector.CellTemplatePlayer2>
        </helpers:RotationCellContentSelector>
        <Style BasedOn="{StaticResource SmallLabelStyleCentered}" TargetType="Label" />
    </ContentView.Resources>
    <ContentView.Content>
        <FlexLayout
            Margin="{OnPlatform Default='10',
                                Android='3,10',
                                iOS='3,10'}"
            x:DataType="viewModels:RotationBaseViewModel"
            Direction="Column"
            HorizontalOptions="Center"
            WidthRequest="{OnPlatform Default=800,
                                      Android=350,
                                      iOS=350}">
            <!--#region Player, Game, Inning-->
            <Grid
                ColumnDefinitions="Auto,*,*,Auto, Auto"
                HorizontalOptions="StartAndExpand"
                RowDefinitions="Auto,Auto">
                <!--#region Player-->
                <controls:GetShowPlayerControl
                    Grid.Row="0"
                    Grid.Column="0"
                    Grid.ColumnSpan="5"
                    CurrentPlayer="{Binding CurrentPlayer, Mode=TwoWay}"
                    CurrentPlayerName="{Binding CurrentPlayerName, Mode=TwoWay}"
                    PlayerColor="{Binding PlayerColor, Mode=TwoWay}"
                    PlayerList="{Binding PlayerList}"
                    SelectPlayerIsEnabled="{Binding SelectPlayerIsEnabled}" />
                <!--#endregion-->
                <!--#region Game and Inning-->
                <Label
                    Grid.Row="1"
                    Grid.Column="0"
                    Margin="{OnPlatform Default='0,0,10,0',
                                        Android='0,0,2,0',
                                        iOS='0,0,3,0'}"
                    Style="{StaticResource SmallLabelStyleCentered}"
                    Text="{x:Static resx:AppResources.Game}"
                    VerticalOptions="Center" />
                <telerik:RadListPicker
                    Grid.Row="1"
                    Grid.Column="1"
                    IsVisible="{Binding SelectGameIsEnabled}"
                    ItemsSource="{Binding Games}"
                    SelectedItem="{Binding Game, Mode=TwoWay}">
                    <VisualElement.Behaviors>
                        <telerik:RadEventToCommandBehavior Command="{Binding GameSelectionChangedCommand}" EventName="SelectionChanged" />
                    </VisualElement.Behaviors>
                    <telerik:RadListPicker.PopupSettings>
                        <telerik:PickerPopupSettings FooterTemplate="{StaticResource FooterTemplate}" HeaderTemplate="{StaticResource GameHeaderTemplate}" />
                    </telerik:RadListPicker.PopupSettings>
                </telerik:RadListPicker>
                <Label
                    Grid.Row="1"
                    Grid.Column="1"
                    Margin="{OnPlatform Default='0,0,10,0',
                                        Android='0,0,2,0',
                                        iOS='0,0,2,0'}"
                    IsVisible="{Binding SelectGameIsEnabled, Converter={helpers:BooleanConverter}}"
                    Style="{StaticResource SelectedEntityLabelStyle}"
                    Text="{Binding Game}"
                    VerticalOptions="Center" />
                <Label
                    Grid.Row="1"
                    Grid.Column="3"
                    Style="{StaticResource SmallLabelStyleCentered}"
                    Text="{x:Static resx:AppResources.Inning}" />
                <Label
                    Grid.Row="1"
                    Grid.Column="4"
                    FontAttributes="Bold"
                    Style="{StaticResource SelectedEntityLabelStyle}"
                    Text="{Binding InningNumber}"
                    VerticalOptions="Center" />
                <!--#endregion-->
            </Grid>
            <!--#endregion-->
            <!--#region Balls Left and Save Inning Button-->
            <telerik:RadBorder BorderColor="{StaticResource NormalTextColor}" BorderThickness="0,1,0,0">
                <FlexLayout
                    Margin="{OnPlatform Default='0,35,0,0',
                                        Android='0,25,0,0',
                                        iOS='0,20,0,0'}"
                    Direction="Row"
                    HeightRequest="{OnPlatform Default=50,
                                               Android=30,
                                               iOS=40}"
                    JustifyContent="SpaceBetween">
                    <!--  Balls Left  -->
                    <StackLayout
                        HorizontalOptions="Start"
                        Orientation="Horizontal"
                        VerticalOptions="Center">
                        <Label Style="{StaticResource SmallLabelStyleCentered}" Text="{x:Static resx:AppResources.BallsLeft}" />
                        <telerik:RadNumericInput
                            ControlTemplate="{StaticResource CustomRadNumericInputControlTemplate}"
                            Maximum="{Binding MaxBallsLeft}"
                            Minimum="0"
                            WidthRequest="{OnPlatform Default=250,
                                                      Android=135,
                                                      iOS=135}"
                            Value="{Binding BallsLeft, Mode=TwoWay}" />
                    </StackLayout>
                    <!--  Save Inning Button  -->
                    <StackLayout
                        HorizontalOptions="End"
                        Orientation="Horizontal"
                        VerticalOptions="Center">
                        <telerik:RadButton
                            Command="{Binding SaveInningCommand}"
                            HorizontalOptions="Center"
                            IsEnabled="{Binding IsSaveEnabled}"
                            Text="{Binding SaveInningButtonText}"
                            VerticalOptions="Center"
                            WidthRequest="{OnPlatform Default=85,
                                                      Android=90,
                                                      iOS=70}" />
                    </StackLayout>
                </FlexLayout>
            </telerik:RadBorder>
            <!--#endregion-->
            <!--#region isBreak and Alternate Breaks-->
            <telerik:RadBorder>
                <FlexLayout
                    Margin="{OnIdiom '0,10',
                                     Phone='0,5'}"
                    Direction="Row"
                    HeightRequest="{OnIdiom 60,
                                            Phone=50}"
                    JustifyContent="SpaceBetween"
                    WidthRequest="{OnPlatform Default=800,
                                              Android=300,
                                              iOS=300}">
                    <StackLayout
                        HorizontalOptions="Start"
                        Orientation="Horizontal"
                        VerticalOptions="Center">
                        <Label Style="{StaticResource SmallLabelStyleCentered}" Text="{x:Static resx:AppResources.Break}" />
                        <telerik:RadCheckBox IsChecked="{Binding IsBreakShot}" VerticalOptions="Center" />
                    </StackLayout>
                    <StackLayout
                        HorizontalOptions="Start"
                        Orientation="Horizontal"
                        VerticalOptions="Center">
                        <Label
                            IsVisible="{Binding AlternateBreakShots}"
                            Style="{StaticResource SmallLabelStyleCentered}"
                            Text="Alternate Breaks" />
                    </StackLayout>
                </FlexLayout>
            </telerik:RadBorder>
            <!--#endregion-->
            <!--#region On Break-->
            <telerik:RadBorder>
                <FlexLayout
                    Direction="Row"
                    HeightRequest="{OnPlatform Default=50,
                                               Android=30,
                                               iOS=40}"
                    JustifyContent="SpaceBetween">
                    <StackLayout
                        HorizontalOptions="Start"
                        Orientation="Horizontal"
                        VerticalOptions="Center">
                        <Label Style="{StaticResource SmallLabelStyleCentered}" Text="{x:Static resx:AppResources.OnBreak}" />
                        <telerik:RadNumericInput
                            ControlTemplate="{StaticResource CustomRadNumericInputControlTemplate}"
                            IsEnabled="{Binding IsBreakShot}"
                            Maximum="{Binding MaxBallsOnBreak}"
                            Minimum="0"
                            WidthRequest="{OnPlatform Default=250,
                                                      Android=135,
                                                      iOS=135}"
                            Value="{Binding BallsOnBreak, Mode=TwoWay}" />
                    </StackLayout>
                </FlexLayout>
            </telerik:RadBorder>
            <!--#endregion-->
            <!--#region List Pickers-->
            <Grid
                Margin="{OnPlatform Default='0,20,0,0',
                                    Android='10,5,0,0',
                                    iOS='10,5,0,0'}"
                HorizontalOptions="Start"
                RowDefinitions="Auto,Auto"
                RowSpacing="{OnPlatform Default=30,
                                        Android=5,
                                        iOS=5}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="{OnPlatform Default=50, Android=25, iOS=25}" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <!--  Notation  -->
                <Label
                    Grid.Row="0"
                    Grid.Column="0"
                    HorizontalOptions="End"
                    Style="{StaticResource SmallLabelStyle}"
                    Text="{x:Static resx:AppResources.Notation}"
                    VerticalOptions="{OnPlatform Default=Center,
                                                 Android=End,
                                                 iOS=End}" />
                <telerik:RadListPicker
                    Grid.Row="0"
                    Grid.Column="1"
                    HorizontalOptions="Start"
                    ItemsSource="{Binding RequiredNotationList}"
                    SelectedItem="{Binding RequiredNotation, Mode=TwoWay}">
                    <telerik:RadListPicker.PopupSettings>
                        <telerik:PickerPopupSettings FooterTemplate="{StaticResource FooterTemplate}" HeaderTemplate="{StaticResource NotationHeaderTemplate}" />
                    </telerik:RadListPicker.PopupSettings>
                </telerik:RadListPicker>
                <!--  Modifier  -->
                <Label
                    Grid.Row="0"
                    Grid.Column="3"
                    HorizontalOptions="End"
                    Style="{StaticResource SmallLabelStyleCentered}"
                    Text="{x:Static resx:AppResources.Modifier}"
                    VerticalOptions="{OnPlatform Default=Center,
                                                 Android=End,
                                                 iOS=End}" />
                <telerik:RadListPicker
                    Grid.Row="0"
                    Grid.Column="4"
                    HorizontalOptions="Start"
                    ItemsSource="{Binding NotationModifierList}"
                    SelectedItem="{Binding NotationModifier, Mode=TwoWay}">
                    <telerik:RadListPicker.PopupSettings>
                        <telerik:PickerPopupSettings FooterTemplate="{StaticResource FooterTemplate}" HeaderTemplate="{StaticResource ModifierHeaderTemplate}" />
                    </telerik:RadListPicker.PopupSettings>
                </telerik:RadListPicker>
                <!--  Foul  -->
                <Label
                    Grid.Row="1"
                    Grid.Column="0"
                    HorizontalOptions="End"
                    Style="{StaticResource SmallLabelStyleCentered}"
                    Text="{x:Static resx:AppResources.Foul}"
                    VerticalOptions="{OnPlatform Default=Center,
                                                 Android=End,
                                                 iOS=End}" />
                <telerik:RadListPicker
                    Grid.Row="1"
                    Grid.Column="1"
                    HorizontalOptions="Start"
                    ItemsSource="{Binding FoulList}"
                    SelectedItem="{Binding Foul, Mode=TwoWay}">
                    <telerik:RadListPicker.PopupSettings>
                        <telerik:PickerPopupSettings FooterTemplate="{StaticResource FooterTemplate}" HeaderTemplate="{StaticResource FoulHeaderTemplate}" />
                    </telerik:RadListPicker.PopupSettings>
                </telerik:RadListPicker>
                <!--  Miss Reason  -->
                <Label
                    Grid.Row="1"
                    Grid.Column="3"
                    HorizontalOptions="End"
                    Style="{StaticResource SmallLabelStyleCentered}"
                    Text="{x:Static resx:AppResources.Optional}"
                    VerticalOptions="{OnPlatform Default=Center,
                                                 Android=End,
                                                 iOS=End}" />
                <telerik:RadListPicker
                    Grid.Row="1"
                    Grid.Column="4"
                    HorizontalOptions="Start"
                    ItemsSource="{Binding OptionalList}"
                    SelectedItem="{Binding Optional, Mode=TwoWay}">
                    <telerik:RadListPicker.PopupSettings>
                        <telerik:PickerPopupSettings FooterTemplate="{StaticResource FooterTemplate}" HeaderTemplate="{StaticResource OptionalHeaderTemplate}" />
                    </telerik:RadListPicker.PopupSettings>
                </telerik:RadListPicker>
            </Grid>
            <!--#endregion-->
            <!--#region Stats Grid-->
            <Grid
                Margin="{OnPlatform Default='20,15,0,0',
                                    Android='5,15,0,0',
                                    iOS='5,15,0,0'}"
                ColumnDefinitions="1.5*, *, 1.5*, *, 1.5*, *, 1.5*, *"
                HeightRequest="{OnPlatform Default=175,
                                           Android=115,
                                           iOS=100}"
                RowDefinitions="Auto,Auto,Auto,Auto,Auto"
                WidthRequest="{OnPlatform Default=650,
                                          Android=350,
                                          iOS=325}">
                <!--  Player 1  -->
                <Label
                    Grid.Row="0"
                    Grid.Column="0"
                    Grid.ColumnSpan="8"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{Binding Player1Truncated, Mode=TwoWay}"
                    TextColor="DeepPink" />
                <!--  Player 2  -->
                <Label
                    Grid.Row="0"
                    Grid.Column="4"
                    Grid.ColumnSpan="4"
                    IsVisible="{Binding Player2Enabled}"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{Binding Player2}"
                    TextColor="GreenYellow" />
                <!--  Player 1 TPA  -->
                <Label
                    Grid.Row="1"
                    Grid.Column="0"
                    HorizontalTextAlignment="Start"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{x:Static resx:AppResources.TPA}" />
                <Label
                    Grid.Row="1"
                    Grid.Column="1"
                    HorizontalTextAlignment="End"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{Binding DisplayPlayer1Tpa}" />
                <!--  Player 1 Games Won  -->
                <Label
                    Grid.Row="1"
                    Grid.Column="2"
                    HorizontalTextAlignment="Start"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{x:Static resx:AppResources.GamesWon}" />
                <Label
                    Grid.Row="1"
                    Grid.Column="3"
                    HorizontalTextAlignment="End"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{Binding Player1GamesWon}"
                    TextColor="DeepPink" />
                <!--  Player 2 TPA  -->
                <Label
                    Grid.Row="1"
                    Grid.Column="4"
                    HorizontalTextAlignment="Start"
                    IsVisible="{Binding Player2Enabled}"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{x:Static resx:AppResources.TPA}" />
                <Label
                    Grid.Row="1"
                    Grid.Column="5"
                    HorizontalTextAlignment="End"
                    IsVisible="{Binding Player2Enabled}"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{Binding DisplayPlayer2Tpa}" />
                <!--  Player 2 Games Won  -->
                <Label
                    Grid.Row="1"
                    Grid.Column="6"
                    HorizontalTextAlignment="Start"
                    IsVisible="{Binding Player2Enabled}"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{x:Static resx:AppResources.GamesWon}" />
                <Label
                    Grid.Row="1"
                    Grid.Column="7"
                    HorizontalTextAlignment="End"
                    IsVisible="{Binding Player2Enabled}"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{Binding Player2GamesWon}"
                    TextColor="GreenYellow" />
                <!--  Player 1 Balls Pocketed  -->
                <Label
                    Grid.Row="2"
                    Grid.Column="0"
                    HorizontalTextAlignment="Start"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{x:Static resx:AppResources.Pocketed}" />
                <Label
                    Grid.Row="2"
                    Grid.Column="1"
                    HorizontalTextAlignment="End"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{Binding Player1BallsPocketed}" />
                <!--  Player 1 Bad Position  -->
                <Label
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalTextAlignment="Start"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{x:Static resx:AppResources.BadPosition}" />
                <Label
                    Grid.Row="2"
                    Grid.Column="3"
                    HorizontalTextAlignment="End"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{Binding Player1BadPosition}" />
                <!--  Player 2 Balls Pocketed  -->
                <Label
                    Grid.Row="2"
                    Grid.Column="4"
                    HorizontalTextAlignment="Start"
                    IsVisible="{Binding Player2Enabled}"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{x:Static resx:AppResources.Pocketed}" />
                <Label
                    Grid.Row="2"
                    Grid.Column="5"
                    HorizontalTextAlignment="End"
                    IsVisible="{Binding Player2Enabled}"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{Binding Player2BallsPocketed}" />
                <!--  Player 2 Bad Position  -->
                <Label
                    Grid.Row="2"
                    Grid.Column="6"
                    HorizontalTextAlignment="Start"
                    IsVisible="{Binding Player2Enabled}"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{x:Static resx:AppResources.BadPosition}" />
                <Label
                    Grid.Row="2"
                    Grid.Column="7"
                    HorizontalTextAlignment="End"
                    IsVisible="{Binding Player2Enabled}"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{Binding Player2BadPosition}" />
                <!--  Player 1 Bad Safety  -->
                <Label
                    Grid.Row="3"
                    Grid.Column="0"
                    HorizontalTextAlignment="Start"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{x:Static resx:AppResources.BadSafety}" />
                <Label
                    Grid.Row="3"
                    Grid.Column="1"
                    HorizontalTextAlignment="End"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{Binding Player1BadSafety}" />
                <!--  Player 1 Misses  -->
                <Label
                    Grid.Row="3"
                    Grid.Column="2"
                    HorizontalTextAlignment="Start"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{x:Static resx:AppResources.Misses}" />
                <Label
                    Grid.Row="3"
                    Grid.Column="3"
                    HorizontalTextAlignment="End"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{Binding Player1Misses}" />
                <!--  Player 2 Bad Safety  -->
                <Label
                    Grid.Row="3"
                    Grid.Column="4"
                    HorizontalTextAlignment="Start"
                    IsVisible="{Binding Player2Enabled}"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{x:Static resx:AppResources.BadSafety}" />
                <Label
                    Grid.Row="3"
                    Grid.Column="5"
                    HorizontalTextAlignment="End"
                    IsVisible="{Binding Player2Enabled}"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{Binding Player2BadSafety}" />
                <!--  Player 2 Misses  -->
                <Label
                    Grid.Row="3"
                    Grid.Column="6"
                    HorizontalTextAlignment="Start"
                    IsVisible="{Binding Player2Enabled}"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{x:Static resx:AppResources.Misses}" />
                <Label
                    Grid.Row="3"
                    Grid.Column="7"
                    HorizontalTextAlignment="End"
                    IsVisible="{Binding Player2Enabled}"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{Binding Player2Misses}" />
                <!--  Player 1 Bad Kicks  -->
                <Label
                    Grid.Row="4"
                    Grid.Column="0"
                    HorizontalTextAlignment="Start"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{x:Static resx:AppResources.BadKick}" />
                <Label
                    Grid.Row="4"
                    Grid.Column="1"
                    HorizontalTextAlignment="End"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{Binding Player1BadKicks}" />
                <!--  Player 1 Scratches On Break  -->
                <Label
                    Grid.Row="4"
                    Grid.Column="2"
                    HorizontalTextAlignment="Start"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{x:Static resx:AppResources.ScratchOnBreak}" />
                <Label
                    Grid.Row="4"
                    Grid.Column="3"
                    HorizontalTextAlignment="End"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{Binding Player1ScratchOnBreak}" />
                <!--  Player 2 Bad Kicks  -->
                <Label
                    Grid.Row="4"
                    Grid.Column="4"
                    HorizontalTextAlignment="Start"
                    IsVisible="{Binding Player2Enabled}"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{x:Static resx:AppResources.BadKick}" />
                <Label
                    Grid.Row="4"
                    Grid.Column="5"
                    HorizontalTextAlignment="End"
                    IsVisible="{Binding Player2Enabled}"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{Binding Player2BadKicks}" />
                <!--  Player 2 Scratches On Break  -->
                <Label
                    Grid.Row="4"
                    Grid.Column="6"
                    HorizontalTextAlignment="Start"
                    IsVisible="{Binding Player2Enabled}"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{x:Static resx:AppResources.ScratchOnBreak}" />
                <Label
                    Grid.Row="4"
                    Grid.Column="7"
                    HorizontalTextAlignment="End"
                    IsVisible="{Binding Player2Enabled}"
                    Style="{StaticResource StatLabelStyle}"
                    Text="{Binding Player2ScratchOnBreak}" />
            </Grid>
            <!--#endregion-->
            <!--#region Innings Grid-->
            <telerik:RadBorder
                BorderColor="{StaticResource NormalTextColor}"
                BorderThickness="1"
                HeightRequest="{OnPlatform Default=225,
                                           Android=225,
                                           iOS=225}"
                WidthRequest="{OnPlatform Default=800,
                                          Android=350,
                                          iOS=315}">
                <telerik:RadDataGrid
                    AutoGenerateColumns="False"
                    ItemsSource="{Binding Innings}"
                    SelectionStyle="{StaticResource CustomSelectionStyle}"
                    UserFilterMode="Disabled"
                    UserSortMode="None">
                    <telerik:RadDataGrid.SortDescriptors>
                        <telerik:PropertySortDescriptor PropertyName="Inning" SortOrder="Descending" />
                    </telerik:RadDataGrid.SortDescriptors>
                    <telerik:RadDataGrid.MouseHoverStyle>
                        <telerik:DataGridBorderStyle BackgroundColor="{StaticResource MouseHoverBackgroundColor}" />
                    </telerik:RadDataGrid.MouseHoverStyle>
                    <telerik:RadDataGrid.Columns>
                        <telerik:DataGridNumericalColumn
                            CanUserEdit="False"
                            CellContentStyle="{StaticResource CustomDataGridTextCellStyle}"
                            CellContentStyleSelector="{StaticResource RotationCellContentSelector}"
                            HeaderStyle="{StaticResource CustomDataGridColumnHeaderStyle}"
                            HeaderText="{x:Static resx:AppResources.Inning}"
                            PropertyName="Inning"
                            SizeMode="Stretch" />
                        <telerik:DataGridNumericalColumn
                            CanUserEdit="False"
                            CellContentStyle="{StaticResource CustomDataGridTextCellStyle}"
                            CellContentStyleSelector="{StaticResource RotationCellContentSelector}"
                            HeaderStyle="{StaticResource CustomDataGridColumnHeaderStyle}"
                            HeaderText="{x:Static resx:AppResources.Run}"
                            PropertyName="Run"
                            SizeMode="Stretch" />
                        <telerik:DataGridTextColumn
                            CanUserEdit="False"
                            CellContentStyle="{StaticResource CustomDataGridTextCellStyle}"
                            CellContentStyleSelector="{StaticResource RotationCellContentSelector}"
                            HeaderStyle="{StaticResource CustomDataGridColumnHeaderStyle}"
                            HeaderText="{x:Static resx:AppResources.Notation}"
                            PropertyName="Notation"
                            SizeMode="Stretch" />
                        <telerik:DataGridTextColumn
                            CanUserEdit="False"
                            CellContentStyle="{StaticResource CustomDataGridTextCellStyle}"
                            HeaderStyle="{StaticResource CustomDataGridColumnHeaderStyle}"
                            HeaderText="{x:Static resx:AppResources.Modifier}"
                            PropertyName="Modifier"
                            SizeMode="Stretch" />
                        <telerik:DataGridTextColumn
                            CanUserEdit="False"
                            CellContentStyle="{StaticResource CustomDataGridTextCellStyle}"
                            HeaderStyle="{StaticResource CustomDataGridColumnHeaderStyle}"
                            HeaderText="{x:Static resx:AppResources.Foul}"
                            PropertyName="Foul"
                            SizeMode="Stretch" />
                        <telerik:DataGridTextColumn
                            CanUserEdit="False"
                            CellContentStyle="{StaticResource CustomDataGridTextCellStyle}"
                            HeaderStyle="{StaticResource CustomDataGridColumnHeaderStyle}"
                            HeaderText="{x:Static resx:AppResources.Optional}"
                            PropertyName="Optional"
                            SizeMode="Stretch" />
                    </telerik:RadDataGrid.Columns>
                </telerik:RadDataGrid>
            </telerik:RadBorder>
            <!--#endregion-->
        </FlexLayout>
    </ContentView.Content>
</ContentView>
I was new to Xamarin Forms when I started this project. Have I written 'bad' XAML?

2 Answers, 1 is accepted

Sort by
0
Larry
Top achievements
Rank 1
Iron
Iron
Veteran
answered on 25 Aug 2022, 12:01 AM
Wow - (very) long story short: changing the top level from Flexlayout to Stacklayout fixed the problem. That's encouraging.
0
Didi
Telerik team
answered on 25 Aug 2022, 06:53 AM

Hello Larry,

I am glad the layout issue is solved when using StackLayout..

There are challenges with the layouts. You can check all issues logged regarding to the .NET MAUI layouts in the .NET MAUI GitHub repo: https://github.com/dotnet/maui/issues 

Regards,
Didi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Larry
Top achievements
Rank 1
Iron
Iron
Veteran
commented on 25 Aug 2022, 05:01 PM

Thank you for that link. It will be very helpful.
Tags
General Discussions
Asked by
Larry
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Larry
Top achievements
Rank 1
Iron
Iron
Veteran
Didi
Telerik team
Share this question
or