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

Pagination Index goes wrong after cutomizing the PaginationButtonStyle #218

Closed
PieceOfFall opened this issue Dec 21, 2023 · 3 comments
Closed

Comments

@PieceOfFall
Copy link

Describe the bug

Selection status of Pagination goes wrong after I customize the PaginationButtonStyle

Environment:

.net8
HandyControls 3.5.0

Steps to reproduce the bug

I use Pagination in my project

                <!-- 分页组件 -->
                <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center">
                    <hc:Pagination MaxPageCount="{Binding MaxPageCount}" PageIndex="{Binding PageIndex,Mode=TwoWay}" AutoHiding="True"
                                   Margin="20" PaginationButtonStyle="{StaticResource PaginationButtonStyle}">
                        <i:Interaction.Triggers>
                            <i:EventTrigger EventName="PageUpdated">
                                <i:InvokeCommandAction 
                                    CommandParameter="页码更新"
                                    Command="{Binding ExecuteCommand}"/>
                            </i:EventTrigger>
                        </i:Interaction.Triggers>
                    </hc:Pagination>
                </StackPanel>

, and set PaginationButtonStyle:

        <Style x:Key="PaginationButtonStyle" TargetType="RadioButton" BasedOn="{StaticResource MaterialDesignChoiceChipPrimaryOutlineRadioButton}">
            <Setter Property="Margin" Value="3"/>
            <Setter Property="FontSize" Value="20" />
            <Setter Property="Height" Value="30" />
        </Style>
    </UserControl.Resources>

But when I try to use the pageIndex(press index 2),

I find the first Index also being selected:

image

In this case, If I press the Index 1, selected Index 2 won't be canceled..and the last Index perform in the same way

Expected behavior

No response

Screenshots

image
image

NuGet package version

HandyControl 3.4.0

IDE

Visual Studio 2022

Framework type

.Net 7.0

Windows version

Windows 11 (22000)

Additional context

No response

@ghost1372
Copy link
Owner

report it in original repo

@PieceOfFall
Copy link
Author

Thus,could you please close your entrance to report bug here ?

@ghost1372
Copy link
Owner

This is only for reports about the custom version, we have already informed here
#48

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