Skip to content

ToggleSwitch Right Alignment #4030

@jpwkeeper

Description

@jpwkeeper

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions