Alex,
Is there any possible to move the scrollbar to Left side?
(content should be normal).
by
Ramesh.p
Ramesh,
This is possible with this style:
<Style TargetType="{x:Type igDP:RecordListControl}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type igDP:RecordListControl}">
<ScrollViewer FlowDirection="RightToLeft"
RenderTransform="{TemplateBinding FixedNearElementTransform}"
CanContentScroll="true"
Focusable="false" HorizontalScrollBarVisibility="Visible"
VerticalScrollBarVisibility="Visible" >
<ItemsPresenter FlowDirection="LeftToRight" RenderTransform="{TemplateBinding ScrollableElementTransform}"/>
</ScrollViewer>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Please let me know if that works in your scenario.
Ya. you are right. But I created 4 grid at run time.
I want to apply this style for one grid. How to i avoid this style rest of the grid.
Anyway?
Regards,
Ramesh.P
Thank you for your reference.
I let you know once succeed.
You could also retemplate the ScrollViewer and change the position of the vertical scrollbar, which in this case would be the easier way to go. You can see the style here:
http://msdn.microsoft.com/en-us/library/cc278065(VS.95).aspx
Hope this helps.
You should handle the ScrollViewer's ScrollChanged event and handle it appropriately for Horizontal scrolling.
It is working with small issue.
The vertical bar appear and behave in left side - this is correct.
but the horizandal bar behaving totally opposite. - This is not correct.
(If we move the scroll button the content scroll opposite side )
what to do?
By
In this case, you should put the style in the container of the grid you want to be applied to. For example:
Grid1 | |_ StackPanel1 | |_Grid2 | |_StackPanel2
So, let's say you add a XamDataGrid in StackPanel2, so the style should be in StackPanel2's resources.
TheXamDataGrids that are not in that StackPanel2 or higher in the element tree that this StackPanel will not pick up this style.