<
telerik:RadGridView
x:Name
=
"RadGrid"
Margin
=
"5"
IsReadOnly
=
"True"
AutoGenerateColumns
=
"False"
CanUserInsertRows
=
"False"
ShowGroupPanel
=
"False"
DataLoadMode
=
"Asynchronous"
IsSynchronizedWithCurrentItem
=
"True"
GridLinesVisibility
=
"Both"
VerticalAlignment
=
"Stretch"
HorizontalAlignment
=
"Stretch"
ItemsSource
=
"{Binding CurrentParticlesList}"
>
<
telerik:RadGridView.Resources
>
<
Style
TargetType
=
"telerik:GridViewHeaderCell"
>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"telerik:GridViewHeaderCell"
>
<
ContentPresenter
>
<
ContentPresenter.LayoutTransform
>
<
RotateTransform
Angle
=
"270"
/>
</
ContentPresenter.LayoutTransform
>
<
ContentPresenter.HorizontalAlignment
>
Center
</
ContentPresenter.HorizontalAlignment
>
<
ContentPresenter.Margin
>
2,5,2,10
</
ContentPresenter.Margin
>
</
ContentPresenter
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
</
telerik:RadGridView.Resources
>
</
telerik:RadGridView
>
using
System;<br>
using
System.Collections.Generic;<br>
using
System.Linq;<br>
using
System.Windows;<br>
using
Telerik.Reporting;<br>
using
System.Collections.ObjectModel;<br>
using
Telerik.Reporting.Processing;<br>
using
Telerik.Windows.Controls;<br>
using
Telerik.Windows.Controls.GridView;<br><br>
namespace
YourNamespaceHere<br>{<br>
/// <summary><br> /// Interaction logic for PrintPreviewTelerikReportViewer.xaml<br> /// </summary><br> public partial class PrintPreviewTelerikReportViewer : Window<br> {<br> #region Variables<br> RadGridView _CurrentRadGridView = new RadGridView();<br> #endregion<br><br> #region Ctor<br> /// <summary><br> /// ctor<br> /// </summary><br> /// <param name="p_RadGridView"></param><br> public PrintPreviewTelerikReportViewer(RadGridView p_RadGridView)//this is for print preview<br> {<br> try<br> {<br> InitializeComponent();<br> TitleBackground = Params.RibbonThemeSolidColor;<br> _CurrentRadGridView = p_RadGridView;<br> this.Loaded += new RoutedEventHandler(PrintPreviewTelerikReportViewer_Loaded);<br> }<br> catch (Exception _Exception)<br> {<br> MessageBox.Show(_Exception.Message.ToString());<br> }<br> }<br> #endregion<br><br> #region Events<br> /// <summary><br> /// loaded event<br> /// </summary><br> /// <param name="sender"></param><br> /// <param name="e"></param><br> void PrintPreviewTelerikReportViewer_Loaded(object sender, RoutedEventArgs e)<br> {<br> try<br> {<br> rvCommonReportViewer.ReportSource = GenerateReport(_CurrentRadGridView);<br> rvCommonReportViewer.RefreshReport();<br> rvCommonReportViewer.ViewMode = Telerik.ReportViewer.Wpf.ViewMode.PrintPreview;<br> }<br> catch (Exception _Exception)<br> {<br> MessageBox.Show(_Exception.Message.ToString());<br> }<br> }<br> #endregion<br><br> #region Methods<br> /// <summary><br> /// print telerik report static method<br> /// </summary><br> /// <param name="p_RadGridView"></param><br> public static void PrintTelerikReport(RadGridView p_RadGridView)<br> {<br> try<br> {<br> ReportSource _ReportSource = GenerateReport(p_RadGridView);<br> ReportProcessor _ReportProcessor = new ReportProcessor();<br> _ReportProcessor.PrintReport(_ReportSource, null);<br> }<br> catch (Exception _Exception)<br> {<br> MessageBox.Show(_Exception.Message.ToString());<br> }<br> }<br><br> /// <summary><br> /// generate report static Methods<br> /// </summary><br> /// <param name="p_RadGridView"></param><br> /// <returns></returns><br> private static Telerik.Reporting.Report GenerateReport(RadGridView p_RadGridView)<br> {<br> #region Variables For Report<br><br> Telerik.Reporting.Report _testReport = new Telerik.Reporting.Report();<br><br> Telerik.Reporting.GroupHeaderSection _GroupHeaderSection = new Telerik.Reporting.GroupHeaderSection();<br> Telerik.Reporting.GroupFooterSection _GroupFooterSection = new Telerik.Reporting.GroupFooterSection();<br> Telerik.Reporting.PageFooterSection _PageFooterSection = new Telerik.Reporting.PageFooterSection();<br> Telerik.Reporting.TextBox _CurrentTimeTextBox = new Telerik.Reporting.TextBox();<br> Telerik.Reporting.TextBox _PageInfoTextBox = new Telerik.Reporting.TextBox();<br> Telerik.Reporting.ReportHeaderSection _ReportHeaderSection = new Telerik.Reporting.ReportHeaderSection();<br> Telerik.Reporting.TextBox _TitleTextBox = new Telerik.Reporting.TextBox();<br> Telerik.Reporting.DetailSection _DetailSection = new Telerik.Reporting.DetailSection();<br><br> Telerik.Reporting.Group _Group = new Telerik.Reporting.Group();<br><br> Telerik.Reporting.Drawing.StyleRule _StyleRule1 = new Telerik.Reporting.Drawing.StyleRule();<br> Telerik.Reporting.Drawing.StyleRule _StyleRule2 = new Telerik.Reporting.Drawing.StyleRule();<br> Telerik.Reporting.Drawing.StyleRule _StyleRule3 = new Telerik.Reporting.Drawing.StyleRule();<br> Telerik.Reporting.Drawing.StyleRule _StyleRule4 = new Telerik.Reporting.Drawing.StyleRule();<br><br> double _Headerlocation = 0.02;<br> double _GroupHeaderlocationY = 0.02;<br> double _GroupHeaderlocationX = 0.02;<br> #endregion<br><br> #region This is for Detail<br> //this is for group detail<br> foreach (ColumnGroupDescriptor _ColumnGroupDescriptor in p_RadGridView.GroupDescriptors)<br> {<br> _Group.Groupings.Add(new Telerik.Reporting.Grouping("=Fields." + _ColumnGroupDescriptor.Column.UniqueName));<br><br> Telerik.Reporting.TextBox _tbHeader = new Telerik.Reporting.TextBox();<br> _tbHeader.CanGrow = true;<br> _tbHeader.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(_GroupHeaderlocationX), Telerik.Reporting.Drawing.Unit.Inch(_GroupHeaderlocationY));<br> _tbHeader.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(5.0), Telerik.Reporting.Drawing.Unit.Inch(0.30000000596046448D));<br> _tbHeader.Style.Font.Bold = true;<br> _tbHeader.Style.Font.Name = "Segoe UI";<br> _tbHeader.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(8D);<br> _tbHeader.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Left;<br> _tbHeader.Value = "=Fields." + _ColumnGroupDescriptor.Column.UniqueName;<br><br> _GroupHeaderSection.Items.Add(_tbHeader);<br><br> _GroupHeaderlocationY += 0.20;<br> _GroupHeaderlocationX += 0.10;<br> }<br><br> //this is for simple detail<br> foreach (Telerik.Windows.Controls.GridViewColumn _GridViewColumn in p_RadGridView.Columns)<br> {<br> if (_GridViewColumn.GetType() != typeof(GridViewSelectColumn) && _GridViewColumn.IsVisible != false)<br> {<br> double _DataWidth = Convert.ToDouble(_GridViewColumn.Width.Value / 100);<br><br> Telerik.Reporting.TextBox _tbHeader = new Telerik.Reporting.TextBox();<br> _tbHeader.CanGrow = true;<br> if (p_RadGridView.GroupDescriptors.Count != 0)<br> {<br> _tbHeader.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(_Headerlocation), Telerik.Reporting.Drawing.Unit.Inch(_GroupHeaderlocationY));<br> }<br> else<br> {<br> _tbHeader.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(_Headerlocation), Telerik.Reporting.Drawing.Unit.Inch(0.02));<br> }<br> _tbHeader.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(_DataWidth), Telerik.Reporting.Drawing.Unit.Inch(0.40000000596046448D));<br> _tbHeader.Style.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(37)))), ((int)(((byte)(160)))), ((int)(((byte)(218)))));<br> _tbHeader.Style.Font.Bold = true;<br> _tbHeader.Style.Font.Name = "Segoe UI";<br> _tbHeader.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(8D);<br> _tbHeader.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;<br> _tbHeader.StyleName = "Caption";<br> _tbHeader.Value = _GridViewColumn.Header.ToString();<br><br> _GroupHeaderSection.Items.Add(_tbHeader);<br><br><br><br> Telerik.Reporting.TextBox _tbData = new Telerik.Reporting.TextBox();<br> _tbData.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(_Headerlocation), Telerik.Reporting.Drawing.Unit.Inch(3.9577484130859375E-05D));<br> _tbData.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(_DataWidth), Telerik.Reporting.Drawing.Unit.Inch(0.20));<br> _tbData.Style.Font.Name = "Segoe UI";<br> _tbData.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(8D);<br> _tbData.Value = "=Fields." + _GridViewColumn.UniqueName;<br><br> _DetailSection.Items.Add(_tbData);<br><br> _Headerlocation += Convert.ToDouble(_GridViewColumn.Width.Value / 100);<br> }<br> }<br> #endregion<br><br> #region This is for Page Footer<br> // labelsGroupFooterSection<br> _GroupFooterSection.Height = Telerik.Reporting.Drawing.Unit.Inch(0.099999904632568359D);<br> _GroupFooterSection.Name = "labelsGroupFooterSection";<br> _GroupFooterSection.Style.Visible = false;<br><br> // pageFooter<br> _PageFooterSection.Height = Telerik.Reporting.Drawing.Unit.Inch(0.44166669249534607D);<br> _PageFooterSection.Items.AddRange(new Telerik.Reporting.ReportItemBase[] { _CurrentTimeTextBox, _PageInfoTextBox });<br> _PageFooterSection.Name = "pageFooter";<br><br> // currentTimeTextBox<br> _CurrentTimeTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.02083333395421505D), Telerik.Reporting.Drawing.Unit.Inch(0.02083333395421505D));<br> _CurrentTimeTextBox.Name = "currentTimeTextBox";<br> _CurrentTimeTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(3.1979167461395264D), Telerik.Reporting.Drawing.Unit.Inch(0.40000000596046448D));<br> _CurrentTimeTextBox.Style.Font.Name = "Segoe UI";<br> _CurrentTimeTextBox.StyleName = "PageInfo";<br> _CurrentTimeTextBox.Value = "=NOW()";<br><br> // pageInfoTextBox<br> _PageInfoTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(3.2395832538604736D), Telerik.Reporting.Drawing.Unit.Inch(0.02083333395421505D));<br> _PageInfoTextBox.Name = "pageInfoTextBox";<br> _PageInfoTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(3.1979167461395264D), Telerik.Reporting.Drawing.Unit.Inch(0.40000000596046448D));<br> _PageInfoTextBox.Style.Font.Name = "Segoe UI";<br> _PageInfoTextBox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Right;<br> _PageInfoTextBox.StyleName = "PageInfo";<br> _PageInfoTextBox.Value = "=PageNumber";<br> #endregion<br><br> #region This is for Page Header<br> // labelsGroupHeaderSection<br> _GroupHeaderSection.Height = Telerik.Reporting.Drawing.Unit.Inch(0.44166669249534607D);<br> _GroupHeaderSection.Name = "labelsGroupHeaderSection";<br> _GroupHeaderSection.PrintOnEveryPage = true;<br><br> // reportHeader<br> _ReportHeaderSection.Height = Telerik.Reporting.Drawing.Unit.Inch(0.35833343863487244D);<br> _ReportHeaderSection.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {<br> _TitleTextBox});<br> _ReportHeaderSection.Name = "reportHeader";<br><br> // titleTextBox<br> _TitleTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.20000000298023224D), Telerik.Reporting.Drawing.Unit.Inch(0D));<br> _TitleTextBox.Name = "titleTextBox";<br> _TitleTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(6.2375001907348633D), Telerik.Reporting.Drawing.Unit.Inch(0.31999999284744263D));<br> _TitleTextBox.Style.Color = System.Drawing.Color.Black;<br> _TitleTextBox.Style.Font.Name = "Segoe UI";<br> _TitleTextBox.StyleName = "Title";<br> _TitleTextBox.Value = "Test Summary Report";<br> #endregion<br><br> // detail<br> _DetailSection.Height = Telerik.Reporting.Drawing.Unit.Inch(0.20);<br> _DetailSection.Name = "detail";<br><br> _Group.GroupFooter = _GroupFooterSection;<br> _Group.GroupHeader = _GroupHeaderSection;<br><br> _testReport.Groups.AddRange(new Telerik.Reporting.Group[] { _Group });<br> _testReport.Items.AddRange(new Telerik.Reporting.ReportItemBase[] { _GroupHeaderSection, _GroupFooterSection, _PageFooterSection, _ReportHeaderSection, _DetailSection });<br><br> #region This is for Style<br> _testReport.PageSettings.Margins = new Telerik.Reporting.Drawing.MarginsU(Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(1D));<br> _testReport.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.Letter;<br> _testReport.Style.BackgroundColor = System.Drawing.Color.White;<br> _testReport.Style.BorderColor.Bottom = System.Drawing.Color.FromArgb(((int)(((byte)(37)))), ((int)(((byte)(160)))), ((int)(((byte)(218)))));<br> _testReport.Style.BorderColor.Default = System.Drawing.Color.FromArgb(((int)(((byte)(37)))), ((int)(((byte)(160)))), ((int)(((byte)(218)))));<br> _testReport.Style.BorderColor.Left = System.Drawing.Color.FromArgb(((int)(((byte)(37)))), ((int)(((byte)(160)))), ((int)(((byte)(218)))));<br> _testReport.Style.BorderColor.Right = System.Drawing.Color.FromArgb(((int)(((byte)(37)))), ((int)(((byte)(160)))), ((int)(((byte)(218)))));<br> _testReport.Style.BorderColor.Top = System.Drawing.Color.FromArgb(((int)(((byte)(37)))), ((int)(((byte)(160)))), ((int)(((byte)(218)))));<br> _testReport.Style.BorderStyle.Bottom = Telerik.Reporting.Drawing.BorderType.Solid;<br> _testReport.Style.BorderStyle.Left = Telerik.Reporting.Drawing.BorderType.Solid;<br> _testReport.Style.BorderStyle.Right = Telerik.Reporting.Drawing.BorderType.Solid;<br> _testReport.Style.BorderStyle.Top = Telerik.Reporting.Drawing.BorderType.Solid;<br> _testReport.Style.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(37)))), ((int)(((byte)(160)))), ((int)(((byte)(218)))));<br> _StyleRule1.Selectors.AddRange(new Telerik.Reporting.Drawing.ISelector[] {<br> new Telerik.Reporting.Drawing.StyleSelector("Title")});<br> _StyleRule1.Style.Color = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(58)))), ((int)(((byte)(112)))));<br> _StyleRule1.Style.Font.Name = "Tahoma";<br> _StyleRule1.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(18D);<br> _StyleRule2.Selectors.AddRange(new Telerik.Reporting.Drawing.ISelector[] {<br> new Telerik.Reporting.Drawing.StyleSelector("Caption")});<br> _StyleRule2.Style.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(58)))), ((int)(((byte)(112)))));<br> _StyleRule2.Style.Color = System.Drawing.Color.White;<br> _StyleRule2.Style.Font.Name = "Tahoma";<br> _StyleRule2.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(10D);<br> _StyleRule2.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;<br> _StyleRule3.Selectors.AddRange(new Telerik.Reporting.Drawing.ISelector[] {<br> new Telerik.Reporting.Drawing.StyleSelector("Data")});<br> _StyleRule3.Style.Color = System.Drawing.Color.Black;<br> _StyleRule3.Style.Font.Name = "Tahoma";<br> _StyleRule3.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(9D);<br> _StyleRule3.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;<br> _StyleRule4.Selectors.AddRange(new Telerik.Reporting.Drawing.ISelector[] {<br> new Telerik.Reporting.Drawing.StyleSelector("PageInfo")});<br> _StyleRule4.Style.Color = System.Drawing.Color.Black;<br> _StyleRule4.Style.Font.Name = "Tahoma";<br> _StyleRule4.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(8D);<br> _StyleRule4.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;<br> _testReport.StyleSheet.AddRange(new Telerik.Reporting.Drawing.StyleRule[] {<br> _StyleRule1,<br> _StyleRule2,<br> _StyleRule3,<br> _StyleRule4});<br> _testReport.Width = Telerik.Reporting.Drawing.Unit.Inch(6.4375D);<br> #endregion<br><br> _testReport.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.A4;<br><br> //_testReport.DataSource = p_RadGridView.ItemsSource;//this is for all data<br> _testReport.DataSource = p_RadGridView.Items;//this is for filter grid<br> return _testReport;<br> }<br> #endregion<br> }<br>}<br>
<
Style
TargetType
=
"{x:Type telerik:CarouselItem}"
>
<
Setter
Property
=
"Background"
Value
=
"AliceBlue"
/>
<!--#50FFFFCC-->
<
Setter
Property
=
"BorderBrush"
Value
=
"Transparent"
/>
<
Setter
Property
=
"BorderThickness"
Value
=
"1"
/>
<
Setter
Property
=
"Height"
Value
=
"{Binding ItemHeight, RelativeSource={RelativeSource AncestorType={x:Type local:ILCarousel}}}"
/>
<
Setter
Property
=
"Width"
Value
=
"{Binding ItemWidth, RelativeSource={RelativeSource AncestorType={x:Type local:ILCarousel}}}"
/>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"{x:Type telerik:CarouselItem}"
>
<
Border
BorderThickness
=
"2"
CornerRadius
=
"2"
Padding
=
"5"
Background
=
"{TemplateBinding Background}"
BorderBrush
=
"#FFB8D6FB"
>
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"*"
/>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"*"
/>
<
ColumnDefinition
Width
=
"Auto"
/>
</
Grid.ColumnDefinitions
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<
local:ILScrollViewer
HorizontalScrollBarVisibility
=
"Auto"
VerticalScrollBarVisibility
=
"Auto"
x:Name
=
"content"
Grid.ColumnSpan
=
"3"
>
<
ContentPresenter
Name
=
"PART_presenter"
/>
</
local:ILScrollViewer
>
<
CheckBox
Grid.Column
=
"0"
IsChecked
=
"{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}}"
>
<
CheckBox.Visibility
>
<
MultiBinding
Converter
=
"{StaticResource and}"
>
<
Binding
Path
=
"SelectionMode"
Converter
=
"{StaticResource visibleIfNotEquals}"
ConverterParameter
=
"{x:Static SelectionMode.Single}"
RelativeSource
=
"{RelativeSource AncestorType={x:Type local:ILCarousel}}"
/>
<
Binding
Path
=
"IsCurrent"
RelativeSource
=
"{RelativeSource TemplatedParent}"
Converter
=
"{StaticResource not}"
/>
</
MultiBinding
>
</
CheckBox.Visibility
>
</
CheckBox
>
<
CheckBox
Grid.Column
=
"2"
IsChecked
=
"{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}}"
>
<
CheckBox.Visibility
>
<
MultiBinding
Converter
=
"{StaticResource and}"
>
<
Binding
Path
=
"SelectionMode"
Converter
=
"{StaticResource visibleIfNotEquals}"
ConverterParameter
=
"{x:Static SelectionMode.Single}"
RelativeSource
=
"{RelativeSource AncestorType={x:Type local:ILCarousel}}"
/>
<
Binding
Path
=
"IsCurrent"
RelativeSource
=
"{RelativeSource TemplatedParent}"
/>
</
MultiBinding
>
</
CheckBox.Visibility
>
</
CheckBox
>
<
CheckBox
Grid.Column
=
"4"
IsChecked
=
"{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}}"
>
<
CheckBox.Visibility
>
<
MultiBinding
Converter
=
"{StaticResource and}"
>
<
Binding
Path
=
"SelectionMode"
Converter
=
"{StaticResource visibleIfNotEquals}"
ConverterParameter
=
"{x:Static SelectionMode.Single}"
RelativeSource
=
"{RelativeSource AncestorType={x:Type local:ILCarousel}}"
/>
<
Binding
Path
=
"IsCurrent"
RelativeSource
=
"{RelativeSource TemplatedParent}"
Converter
=
"{StaticResource not}"
/>
</
MultiBinding
>
</
CheckBox.Visibility
>
</
CheckBox
>
</
Grid
>
</
Border
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
DataContext="{Binding IsTeamMate, Converter={StaticResource BooleanToCheckMark}}"
<
tk:GridViewDataColumn
DataContext
=
"{Binding IsTeamMate, Converter={StaticResource BooleanToCheckMark}}"
Header="Already played"
IsGroupable
=
"False"
ShowFieldFilters
=
"False"
UniqueName
=
"IsTeamMate"
Width
=
"30"
>
<
tk:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding IsTeamMate, Converter={StaticResource BooleanToCheckMark}}"
/>
</
DataTemplate
>
</
tk:GridViewDataColumn.CellTemplate
>
</
tk:GridViewDataColumn
>
The Code is very minimalistic
<Window x:Class="RadComboBoxSample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
Title="MainWindow" Height="220" Width="220">
<Window.Resources>
<Style x:Key="RadComboBoxContentUserControlStyle" TargetType="telerik:RadComboBox">
<Setter Property="Margin" Value="10" />
<Setter Property="Padding" Value="10" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="IsReadOnly" Value="True" />
<Setter Property="IsEditable" Value="True" />
<Setter Property="IsFilteringEnabled" Value="True" />
<Setter Property="CanAutocompleteSelectItems" Value="True" />
<Setter Property="CanKeyboardNavigationSelectItems" Value="True" />
<Setter Property="OpenDropDownOnFocus" Value="True" />
<Setter Property="TextSearchMode" Value="Contains" />
<Setter Property="ClearSelectionButtonVisibility" Value="Visible" />
<Setter Property="ClearSelectionButtonContent" Value="Clear" />
<Setter Property="EmptyText" Value="Please select" />
</Style>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" MinWidth="200" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<telerik:RadComboBox Grid.Column="0" Grid.Row="0" Style="{StaticResource RadComboBoxContentUserControlStyle}">
<telerik:RadComboBoxItem Content="14 - Car" />
<telerik:RadComboBoxItem Content="15 - Airplane" />
<telerik:RadComboBoxItem Content="16 - Boat" />
<telerik:RadComboBoxItem Content="17 - Bike" />
</telerik:RadComboBox>
</Grid>
</Window>