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

ToggleSwitch Right Alignment #4030

Closed
jpwkeeper opened this issue Jan 27, 2021 · 0 comments · Fixed by #4052
Closed

ToggleSwitch Right Alignment #4030

jpwkeeper opened this issue Jan 27, 2021 · 0 comments · Fixed by #4052
Assignees
Labels
Milestone

Comments

@jpwkeeper
Copy link

I am unable to get the ToggleSwitch to align to the right side. I've tried HorizontalAlignment, HorizontalContentAlignment, HeaderControlHelper.HeaderHorizontalContentAlignment setting all of those to Right, and it still ends up justified left OR with a large space at the end (can't tell which, but it ends up roughly the same). I can force it with a hard size but I'm reluctant to do so since that can potentially cause scaling issues.

           <Border Grid.Row="5" Grid.Column="1" HorizontalAlignment="Right"  BorderBrush="Black" BorderThickness="2">
              <mah:ToggleSwitch ContentDirection="LeftToRight" 
                                               mah:HeaderedControlHelper.HeaderHorizontalContentAlignment="Right" 
                                               HorizontalContentAlignment="Right" 
                                               HorizontalAlignment="Right" 
                                               Padding="0" 
                                               OnContent="Yes" 
                                               OffContent="No"/>
          </Border>

MahAppsRightJustified

@punker76 punker76 added the Bug label Jan 27, 2021
@punker76 punker76 self-assigned this Jan 27, 2021
@punker76 punker76 added this to the 2.4.4 milestone Jan 27, 2021
punker76 added a commit that referenced this issue Feb 25, 2021
(GH-4030) Fix ToggleSwitch Right Alignment
batzen pushed a commit to batzen/MahApps.Metro that referenced this issue Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants