Hi,
I need to display buttons in which user can use to add controls. Buttons are categorized in groups. Here is the XAML I am having -
<ScrollViewer
VerticalScrollBarVisibility="Auto">
<GroupBox
Name="maingroup"
Header="Click To Add Controls"
BorderBrush="Transparent">
<Grid>
<Grid.RowDefinitions>
<RowDefinition
Height="*" />
<RowDefinition
Height="90" />
</Grid.RowDefinitions>
<GroupBox
Grid.Row="0"
Name="groupVarControls"
Header="{Binding Path=GroupBoxHeaderText, Mode=OneWay}">
<ScrollViewer
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Hidden">
<WrapPanel
Margin="7,7,0,0"
AllowDrop="False">
<syncfusion:RibbonButton
SizeForm="Large"
Name="BarControl"
LargeIcon="Images\Bar.png"
Label="Bar"
AllowDrop="True">
</syncfusion:RibbonButton>
<!-- 10 More buttons -->
</WrapPanel>
</ScrollViewer>
</GroupBox>
<GroupBox
Grid.Row="1"
Name="groupVarControls2"
Visibility="{Binding Path=GroupBoxVisibility, Mode=OneWay}"
Header="Click to Add control">
<ScrollViewer
VerticalScrollBarVisibility="Hidden"
HorizontalScrollBarVisibility="Auto">
<WrapPanel
Margin="7,7,0,0"
AllowDrop="False">
<syncfusion:RibbonButton
SizeForm="Large"
Name="ClockControl"
AllowDrop="False"
LargeIcon="Images\Clock.png"
Label="Clock"
Click="ClockControl_Click" />
<!-- More buttons -->
</WrapPanel>
</ScrollViewer>
</GroupBox>
</Grid>
</GroupBox>
</ScrollViewer>
I want a vertical scroll bar common for both wrappanels and individual horizontal scrollbars. With this XAML scrollbars are not coming correctly, ScrollViewer causes the wrapping to be "disabled", it just leaves my controls in a single row (or column), and uses a scrollbar right away.
I can't give a fixed widht to wrappanels as this control will be displayed in a dockpanel(similar to VS toolbox) and user can cnage it.
Any ideas?