or
<
telerik:RadMaskedCurrencyInput
Value
=
"12345"
Placeholder
=
" "
IsCurrencySymbolVisible
=
"False"
>
public
class
CustomFilteringBehavior : FilteringBehavior
{
public
override
System.Collections.Generic.IEnumerable<
object
> FindMatchingItems(
string
searchText, System.Collections.IList items, System.Collections.Generic.IEnumerable<
object
> escapedItems,
string
textSearchPath, TextSearchMode textSearchMode)
{
var searchTextToUpper = searchText.ToUpper();
var matchingItems = items.OfType<Person>().
Where(x => x.FirstName.ToUpper().Contains(searchTextToUpper) || x.LastName.ToUpper().Contains(searchTextToUpper)
|| (x.FirstName +
" "
+ x.LastName).ToUpper().Contains(searchTextToUpper));
return
matchingItems.Where(x => !escapedItems.Contains(x));
}
}
<UserControl.Resources>
<local:ViewModel x:Key=
"ViewModel"
/>
<local:CustomFilteringBehavior x:Key=
"CustomFilteringBehavior"
/>
<DataTemplate x:Key=
"CustomItemTemplate"
>
<StackPanel Orientation=
"Horizontal"
>
<TextBlock Text=
"{Binding FirstName}"
/>
<TextBlock Text=
" "
/>
<TextBlock Text=
"{Binding LastName}"
/>
</StackPanel>
</DataTemplate>
</UserControl.Resources>
<Grid x:Name=
"LayoutRoot"
Background=
"White"
DataContext=
"{StaticResource ViewModel}"
>
<StackPanel>
<telerik:RadAutoCompleteBox ItemsSource=
"{Binding People}"
FilteringBehavior=
"{StaticResource CustomFilteringBehavior}"
DropDownItemTemplate=
"{StaticResource CustomItemTemplate}"
BoxesItemTemplate=
"{StaticResource CustomItemTemplate}"
SelectionMode=
"Single"
AutoCompleteMode=
"Suggest"
/>
</StackPanel>
</Grid>
<
tel:RadListBox
ItemsSource
=
"{Binding Path=DtedDirectories}"
SelectedValue
=
"{Binding Path=SelectedDtedDirectory}"
SelectionMode
=
"Single"
>
<
tel:RadListBox.ItemContainerStyle
>
<
Style
TargetType
=
"tel:RadListBoxItem"
>
<
Setter
Property
=
"tel:DragDropManager.AllowCapturedDrag"
Value
=
"True"
/>
</
Style
>
</
tel:RadListBox.ItemContainerStyle
>
<
tel:RadListBox.DragDropBehavior
>
<
tel:ListBoxDragDropBehavior
AllowReorder
=
"True"
/>
</
tel:RadListBox.DragDropBehavior
>
</
tel:RadListBox
>
<Expander IsExpanded="{Binding Path=IsExpanded}"></Expander> |
<Telerik:RadExpander IsExpanded="{Binding Path=IsExpanded}" ></Telerik:RadExpander> |
Bound to
private bool _isExpanded = true; |
public bool IsExpanded |
{ |
get { return _isExpanded; } |
set |
{ |
_isExpanded = value; |
//Some code |
} |
} |
private
void
Button_Click_1(
object
sender, RoutedEventArgs e)
{
var shapes =
new
List<RadDiagramShape>();
for
(
int
i = 0; i <= 15; i++)
{
var shape =
new
RadDiagramShape();
shapes.Add(shape);
if
(i == 0)
{
_mainShape = shapes[0];
}
if
(i > 0)
{
var conn =
new
RadDiagramConnection {Source = _mainShape, Target = shape, SourceCapType = CapType.Arrow1};
RadDiagram.Items.Add(conn);
}
}
RadDiagram.Items.AddRange(shapes);
RadDiagram.Layout();
RadDiagram.AutoFit();
}
<
telerik:RadMaskedTextInput
Culture
=
""
Mask
=
""
MinWidth
=
"300"
Margin
=
"10,10,10,10"
HorizontalContentAlignment
=
"Right"
UpdateValueEvent
=
"LostFocus"
TextMode
=
"PlainText"
InputBehavior
=
"Insert"
/>
private
void
pivot_MouseDown(
object
sender, MouseButtonEventArgs e)
{
if
(e.ClickCount == 2)
{
RadPivotGrid p = sender
as
RadPivotGrid;
FrameworkElement cell = e.OriginalSource
as
FrameworkElement;