private void btnNext_Click(object sender, RoutedEventArgs e)
{
SetScrollPosition();
BindData();
RestoreScrollPosition();
}
private void SetScrollPosition()
{
GridViewScrollViewer svSummaryInfo = (GridViewScrollViewer)rtSummaryInfo.FindChildByType<GridViewScrollViewer>();
_dbVerticalOffset = svSummaryInfo.VerticalOffset;
_dbHorizontalOffset = svSummaryInfo.HorizontalOffset;
}
private
void RestoreScrollPosition()
{
GridViewScrollViewer
svSummaryInfo = (GridViewScrollViewer)rtSummaryInfo.FindChildByType<GridViewScrollViewer>();
if (svSummaryInfo != null)
{
svSummaryInfo.ScrollToHorizontalOffset(_dbHorizontalOffset);
svSummaryInfo.ScrollToVerticalOffset(_dbVerticalOffset);
}
}
Please provide a code snippet for the same.
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Text;
using
System.ComponentModel.DataAnnotations;
namespace
namespace
{
public
class
dummy
{
[Display(AutoGenerateFilter =
false
)]
public
string
Name
{
get
;
set
;
}
[Display(ShortName =
"Company's Name"
)]
public
string
CompanyName
{
get
;
set
;
}
public
string
Title
{
get
;
set
;
}
}
}
Hello,
the ToolTip text "Start dragging in order to change items' position" is not translated in german culture.
OutlookBar_style.xaml:
...
<
ToolTipService.ToolTip
>
<
TextBlock
Text
=
"Start dragging in order to change items' position"
telerik:LocalizationManager.ResourceKey
=
"OutlookBarHorizontalSplitter"
/>
</
ToolTipService.ToolTip
>
...
As workaround I tried to set the ToolTip-Text by setting the HorizontalSplitterStyle like this:
...
<
UserControl.Resources
>
<
Style
x:Name
=
"OutlookBarHorizontalSplitter"
TargetType
=
"Thumb"
>
<
Setter
Property
=
"ToolTip"
Value
=
"My localized Text"
/>
</
Style
>
</
UserControl.Resources
>
<
Grid
>
<
telerik:RadOutlookBar
x:Name
=
"MenuOutlookBar"
HorizontalSplitterStyle
=
"{DynamicResource OutlookBarHorizontalSplitter}"
>
...
Unfortuately after this the whole Style of the HorizontalSplitter is lost and the Tooltip is still default.
Please let me know if there is a solution for this issue.
Regards
Rainer
private void rtSummaryInfo_RowLoaded(object sender, RowLoadedEventArgs e)
{
TreeListViewRow
lobjTreeListViewRow = (e.Row as Telerik.Windows.Controls.TreeListView.TreeListViewRow);
SummaryData lobjSummaryData = (e.Row as Telerik.Windows.Controls.TreeListView.TreeListViewRow).DataContext as SummaryData;
if (_lstExpandedNode.Contains(lobjSummaryData.NodeName))
{
lobjTreeListViewRow.IsExpanded =
true; // at this point, scrollviewer gets resets
}
}
I need to maintain the scroll position while expanding a node. Your help is appreciated.