Reputation: 349
I'm trying to insert an list of button in a StackPanel But I'd like to hide the wrap content to left instead of right, as it is currently doing
Here my is code xaml
<StackPanel Orientation="Horizontal" >
<Button Width="50">1.5678</Button>
<Button Width="50">1.5678</Button>
<Button Width="50">1.5678</Button>
<Button Width="50">1.5678</Button>
<Button Width="50">1.5678</Button>
<Button Width="50">1.5678</Button>
<Button Width="50">1.5678</Button>
<TextBox x:Name="EDT_NUMERO_CFOP" Style="{StaticResource TextBoxNoBorder}" Height="30"></TextBox>
</StackPanel>
I think that there's something like "hideToLeft"
Upvotes: 1
Views: 454
Reputation: 145
Wrap the StackPanel inside ScrollViewer with FlowDirection property = RightToLeft
<ScrollViewer CanContentScroll="True" FlowDirection="RightToLeft">
<StackPanel Orientation="Horizontal" Margin="0,0,6,6.5" >
<Button Width="50">1.5678</Button>
<Button Width="50">1.5678</Button>
<Button Width="50">1.5678</Button>
<Button Width="50">1.5678</Button>
<Button Width="50">1.5678</Button>
<Button Width="50">1.5678</Button>
<Button Width="50">1.5678</Button>
<TextBox x:Name="EDT_NUMERO_CFOP" Style="{StaticResource TextBoxNoBorder}" Height="30"></TextBox>
</StackPanel>
</ScrollViewer>
Upvotes: 2