Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color of the next page button abnormal #189

Open
rokorec31 opened this issue Jun 20, 2024 · 1 comment
Open

Color of the next page button abnormal #189

rokorec31 opened this issue Jun 20, 2024 · 1 comment

Comments

@rokorec31
Copy link

Describe the bug
I tried setting PaginationEnabled=true, and the color of next button became black.

To Reproduce
Steps to reproduce the behavior:

  1. You can reproduce it using the code I provided.

Expected behavior
Do not override the button color.

Screenshots
Screenshot 2024-06-20 104614

Desktop (please complete the following information):

  • OS: Windows 10 build 19045.4529
  • Version: Maui.DataGrid 4.0.4

Xaml code

<dg:DataGrid Grid.Row="0"
             ItemsSource="{Binding Offices}"
             IsRefreshing="{Binding IsListRefreshing}"
             PullToRefreshCommand="{Binding RefreshOfficesCommand}"
             RefreshingEnabled="True"
             SelectionMode="Single"
             SortingEnabled="True"
             PaginationEnabled="True"
             HeaderBordersVisible="False"
             SelectedItem="{Binding SelectedOffice}"
             RowTappedCommand="{Binding SelectOfficeChangedCommand}"
             HeaderBackground="Transparent"
             FooterBackground="Transparent"
             ActiveRowColor="White"
             BorderColor="Transparent"
             BorderThickness="0"
             HeaderHeight="32"
             RowHeight="64"
             HeaderLabelStyle="{StaticResource GridHeaderLabelStyle}">
    <dg:DataGrid.Columns>
        <dg:DataGridColumn Title=""
                           PropertyName="."
                           SortingEnabled="False"
                           HorizontalContentAlignment="Center"
                           VerticalContentAlignment="Center"
                           Width="100">
            <dg:DataGridColumn.CellTemplate>
                <DataTemplate>
                    <StackLayout Padding="4">
                        <ff:CachedImage Source="{Binding FullUrl}"
                                        ErrorPlaceholder="img_default.png"
                                        LoadingPlaceholder="img_default.png"
                                        Aspect="AspectFit"
                                        HorizontalOptions="CenterAndExpand"
                                        VerticalOptions="CenterAndExpand" />
                    </StackLayout>
                </DataTemplate>
            </dg:DataGridColumn.CellTemplate>
        </dg:DataGridColumn>

        <dg:DataGridColumn Title="Name"
                           PropertyName="Name"
                           SortingEnabled="True"
                           HorizontalContentAlignment="Start"
                           VerticalContentAlignment="Center"
                           Width="{OnIdiom 200, Phone=140}">
            <dg:DataGridColumn.CellTemplate>
                <DataTemplate>
                    <Label Style="{StaticResource LabelStyleBody1}"
                           Text="{Binding}"
                           TextColor="{StaticResource Greyscale700}"
                           VerticalTextAlignment="Center"
                           LineBreakMode="MiddleTruncation" />
                </DataTemplate>
            </dg:DataGridColumn.CellTemplate>
        </dg:DataGridColumn>

        <dg:DataGridColumn Title="Total Devices"
                           PropertyName="Docks"
                           SortingEnabled="True"
                           HorizontalContentAlignment="Start"
                           VerticalContentAlignment="Center"
                           Width="{OnIdiom 160, Phone=110}">
            <dg:DataGridColumn.CellTemplate>
                <DataTemplate>
                    <Label Style="{StaticResource LabelStyleBody1}"
                           Text="{Binding Count, FallbackValue='-'}"
                           TextColor="{StaticResource Greyscale700}"
                           VerticalTextAlignment="Center"
                           LineBreakMode="MiddleTruncation" />
                </DataTemplate>
            </dg:DataGridColumn.CellTemplate>
        </dg:DataGridColumn>

        <dg:DataGridColumn Title="Unassigned Devices"
                           PropertyName="UnassignedDevices"
                           SortingEnabled="True"
                           HorizontalContentAlignment="Start"
                           VerticalContentAlignment="Center"
                           IsVisible="{OnIdiom True, Phone=False}"
                           Width="160">
            <dg:DataGridColumn.CellTemplate>
                <DataTemplate>
                    <Label Style="{StaticResource LabelStyleBody1}"
                           Text="{Binding Count, FallbackValue='-'}"
                           TextColor="{StaticResource Greyscale700}"
                           VerticalTextAlignment="Center"
                           LineBreakMode="MiddleTruncation" />
                </DataTemplate>
            </dg:DataGridColumn.CellTemplate>
        </dg:DataGridColumn>
    </dg:DataGrid.Columns>

    <dg:DataGrid.RowsBackgroundColorPalette>
        <dg:PaletteCollection>
            <Color>White</Color>
        </dg:PaletteCollection>
    </dg:DataGrid.RowsBackgroundColorPalette>
</dg:DataGrid>
@symbiogenesis
Copy link
Collaborator

The upstream MAUI stepper control we use isn't super great. We do expose PaginationStepperStyle which gives access to whatever limited styling options are available for the stepper.

Anything else would be an upstream limitation or bug.

If we moved away from that control it may help, at the cost of some added complexity. But the overall ethos of this library thus far is to basically just use the default MAUI cross-platform controls, and not reinvent any wheels.

PRs welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants