or
<
telerik:RadDocking
Grid.Row
=
"1"
Grid.ColumnSpan
=
"2"
BorderThickness
=
"0"
Padding
=
"0"
IsEnabled
=
"{Binding Path=IsWebLoading, Converter={StaticResource ibcConverter}}"
PreviewClose
=
"RadDocking_PreviewClose"
>
<
telerik:RadSplitContainer
InitialPosition
=
"DockedLeft"
>
<
telerik:RadPaneGroup
>
<
telerik:RadPane
Header
=
"Menu"
telerik:RadDocking.SerializationTag
=
"PaneLeft"
>
<
views:BrowsePanelView
Margin
=
"0"
VerticalAlignment
=
"Stretch"
x:Name
=
"browsePanelView"
DataContext
=
"{Binding Path=BrowsePaneVM}"
/>
</
telerik:RadPane
>
</
telerik:RadPaneGroup
>
</
telerik:RadSplitContainer
>
<
telerik:RadDocking.DocumentHost
>
<
telerik:RadSplitContainer
>
<
telerik:RadPaneGroup
modules:PaneGroupExtensions.ItemsSource
=
"{Binding Path=DocPanelTabCollection}"
SelectionChanged
=
"RadPaneGroup_SelectionChanged"
>
</
telerik:RadPaneGroup
>
</
telerik:RadSplitContainer
>
</
telerik:RadDocking.DocumentHost
>
</
telerik:RadDocking
>
As per message subject, does radPropertyGrid support RegularExpressionAttribute for validation? I can't find a mention in documentation.
public
class
VirtualQueryableCollectionViewHelper<T> where T : Entity
{
public
IEventAggregator EventAggregator {
get
;
set
; }
public
VirtualQueryableCollectionViewHelper(Func<QueryableXenoxContext, EntityQuery<T>> queryGenerator, queryableXenoxContext queryableXenoxContext, XenoxGridView gridView)
{
EventAggregator = ClientIocContainer.Instance.GetExportedValue<IEventAggregator>();
QueryGenerator = queryGenerator;
QueryableXenoxContext = queryableXenoxContext;
GridviewControl = gridView;
DoNothing = i => { };
View =
new
VirtualQueryableCollectionView<T>
{
LoadSize = 30,
VirtualItemCount = 100
};
View.ItemsLoading += (sender, args) => LoadInternal(args.StartIndex, args.ItemCount, DoNothing);
View.FilterDescriptors.CollectionChanged += (sender, args) => LoadInternal(0, View.LoadSize, DoNothing);
View.FilterDescriptors.ItemChanged += (sender, args) => LoadInternal(0, View.LoadSize, DoNothing);
View.SortDescriptors.CollectionChanged += (sender, args) => LoadInternal(0, View.LoadSize, DoNothing);
if
(gridView ==
null
)
{
ScrollIndexIntoView = DoNothing;
}
else
{
ScrollIndexIntoView = i => gridView.ScrollIndexIntoCenterOfView(i);
}
}
public
void
Load(
int
currentIndex,
int
pageSize)
{
LoadInternal(currentIndex, pageSize, ScrollIndexIntoView);
}
public
void
Refresh(
bool
scrollToIndex =
false
,
int
currentIndex = 0)
{
var postLoadAction = scrollToIndex ? ScrollIndexIntoView : DoNothing;
LoadInternal(currentIndex, View.LoadSize, postLoadAction);
}
public
IEnumerable<T> GetAllCollectionItems()
{
return
QueryableXenoxContext.Load(QueryGenerator(QueryableXenoxContext)).Entities;
}
private
void
LoadInternal(
int
currentIndex,
int
pageSize, Action<
int
> onLoaded)
{
if
(currentIndex < 0) currentIndex = 0;
//also load content above current item
pageSize = pageSize*2;
var loadStartIndex = currentIndex - pageSize / 2 < 0 ? 0 : currentIndex - pageSize / 2;
var entityQuery =
QueryGenerator(QueryableXenoxContext)
.Sort(View.SortDescriptors)
.Where(View.FilterDescriptors)
.Skip(loadStartIndex)
.Take(pageSize);
entityQuery.IncludeTotalCount =
true
;
try
{
QueryableXenoxContext.Load(entityQuery, LoadBehavior.RefreshCurrent, lo => {
if
(lo.TotalEntityCount != -1 && lo.TotalEntityCount != View.VirtualItemCount) {
View.VirtualItemCount = lo.TotalEntityCount;
}
View.Load(loadStartIndex, lo.Entities);
onLoaded(currentIndex);
},
null
);
}
catch
(InvalidOperationException)
{
EventAggregator.Publish(
new
ErrorReportedEvent(
"Error loading items. Possible cause: too many items selected"
));
}
}
protected
override
void
OnMouseDoubleClick(MouseButtonEventArgs e)
{
var element = InputHitTest(e.GetPosition(GetRowForItem(SelectedItem)));
if
(element !=
null
)
{
if
(DoubleClickCommand !=
null
&& DoubleClickCommand.CanExecute(DoubleClickCommandParameter))
DoubleClickCommand.Execute(DoubleClickCommandParameter);
}
base
.OnMouseDoubleClick(e);
}
<telerik:RadWindow x:Class="TestWpf.MainWindow" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" |
Header="Test" Width="400" Height="200" |
FocusManager.FocusedElement="{Binding ElementName=tbxUser}"> |
<Grid> |
<Label Content="User : " Height="28" Name="lblUser" /> |
<TextBox Height="23" Name="tbxUser" Width="120"/> |
</Grid> |
</telerik:RadWindow> |