or
private
void
SendCommandExecuted(
object
parameter)
{
PopupDeviceView popupDeviceView =
new
PopupDeviceView();
PopupDeviceViewModel popupDeviceViewModel = (PopupDeviceViewModel)popupDeviceView.DataContext;
RadWindow radWindow =
new
RadWindow();
radWindow.Content = popupDeviceView;
radWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
radWindow.ResizeMode = ResizeMode.NoResize;
radWindow.CanClose =
false
;
radWindow.CanMove =
false
;
radWindow.ShowDialog();
}
StartRadialAngle = 1.0,
EndRadialAngle = 6.5,
RadialFirstLEvelSeparation = 150.0,
RadialSeparation = 150,
KeepComponentsInOneRadialLayout =
true
,
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading;
using Telerik.Windows.Controls;
namespace HighlightMatchingItemsText
{
public class Country
{
public string Name { get; set; }
public string Capital { get; set; }
}
public class ViewModel : ViewModelBase
{
private ObservableCollection<
Country
> countries;
public ViewModel()
{
this.Countries = new ObservableCollection<
Country
>()
{
new Country() { Name = "Australia", Capital = "Canberra" },
new Country() { Name = "Bulgaria", Capital = "Sofia" },
new Country() { Name = "Canada", Capital = "Ottawa" },
new Country() { Name = "Denmark", Capital = "Copenhagen" },
new Country() { Name = "France", Capital = "Paris" },
new Country() { Name = "Germany", Capital = "Berlin" },
new Country() { Name = "India", Capital = "New Delhi" },
new Country() { Name = "Italy", Capital = "Rome" },
new Country() { Name = "Norway", Capital = "Oslo" },
new Country() { Name = "Russia", Capital = "Moscow" },
new Country() { Name = "Spain", Capital = "Madrid" },
new Country() { Name = "United Kingdom", Capital = "London" },
new Country() { Name = "United States", Capital = "Washington, D.C." },
};
var o = System.Reactive.Linq.Observable.Start(() =>
{
//starts on a background thread.
while (true)
{
Thread.Sleep(6000);
this.Countries = new ObservableCollection<
Country
>()
{
new Country() { Name = "Australia", Capital = "Canberra" },
new Country() { Name = "Bulgaria", Capital = "Sofia" },
new Country() { Name = "Canada", Capital = "Ottawa" },
new Country() { Name = "Denmark", Capital = "Copenhagen" },
};
Console.WriteLine("Collection Changed");
}
});
}
public ObservableCollection<
Country
> Countries
{
get { return this.countries; }
set
{
if (this.countries != value)
{
this.countries = value;
this.OnPropertyChanged(() => this.Countries);
}
}
}
}
}
<
UserControl
x:Class
=
"HighlightMatchingItemsText.Example"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:local
=
"clr-namespace:HighlightMatchingItemsText"
mc:Ignorable
=
"d"
d:DesignHeight
=
"300"
d:DesignWidth
=
"300"
Width
=
"300"
>
<
UserControl.DataContext
>
<
local:ViewModel
/>
</
UserControl.DataContext
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
<
TextBlock
Text="Type A in the autocomplete box, Australia gets highlighted. Keep the drop down open and wait for 6 seconds, the collection changes and the highlighting dissappears.
Wait for another 6 seconds, the collection changes and the highlighting reappaers. This keeps toggling. "
TextWrapping
=
"Wrap"
FontWeight
=
"Bold"
Margin
=
"20"
/>
<
telerik:RadAutoCompleteBox
x:Name
=
"AutoComplete"
Grid.Row
=
"1"
Margin
=
"20"
ItemsSource
=
"{Binding Countries}"
TextSearchPath
=
"Name"
TextSearchMode
=
"Contains"
AutoCompleteMode
=
"Suggest"
>
</
telerik:RadAutoCompleteBox
>
</
Grid
>
</
UserControl
>
<Window x:Class="MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" >
Blah...
</Window>
<telerik:RadRibbonWindow x:Class="MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"> Blah... </telerik:RadRibbonWindow>