or
public class ReceptionRowStyleSelector : StyleSelector<br>
{
public override Style SelectStyle(object item, DependencyObject container)
{
if (item is Reception)
{
var reception = (Reception)item;
if (reception.IsCompleted) return CompletedReception;
if (reception.IsCanceledByClient) return CanceledReception;
if (reception.IsClientNotified) return NotifiedReception;
}
return DefaultStyle;
}
...
<DataTemplate x:Key="CustomToolTipDataTemplate2" x:Name="toolTipTemplate2"> <StackPanel Margin="10,5"> <TextBlock FontWeight="Bold" FontFamily="Trebuchet MS" FontSize="12" Text="{Binding Converter={StaticResource ExtendedDataConverter}, ConverterParameter='NAME', StringFormat=County: {0}}" /> <TextBlock x:Name="KPITip" FontFamily="Trebuchet MS" FontSize="12" Text="{Binding Converter={StaticResource ExtendedDataConverter}, ConverterParameter='PAT_EST', StringFormat='Percentage of Paternity Established: {0:0.##}'}" /> </StackPanel> </DataTemplate></Grid.Resources>RadWindow NewWindow = new RadWindow(); NewWindow.ShowDialog(); e.NewObject = NewWindow.NewRow;RadWindow NewWindow = new RadWindow(); NewWindow.Closed += delegate{ e.NewObject = NewWindow.NewRow; }; NewWindow.Show();Public Class TimeZoneAppointment Inherits Telerik.Windows.Controls.ScheduleView.Appointment Private _myModelAppointment As ModelAppointment Public Overloads Property Start As Date Get Return MyBase.Start End Get Set(ByVal value As Date) 'this will also modify the model appointment's start property MyBase.Start = value End Set End Property Public Overloads Property [End] As Date Get Return MyBase.End End Get Set(ByVal value As Date) 'this will also modify the model appointment's end property MyBase.End = value End Set End Property Public Sub New(ByVal ma As ModelAppointment) MyBase.New() _myModelAppointment = ma MyBase.Start = _myModelAppointment.startDate MyBase.End = _myModelAppointment.endDate Dim recurrencePattern As New RecurrencePattern() recurrencePattern.Frequency = RecurrenceFrequency.Weekly Dim recurrenceRule As New RecurrenceRule(recurrencePattern) MyBase.RecurrenceRule = recurrenceRule End SubEnd Class<Window x:Class="WPFprismMEFRadDockingTest.Views.ShellView" xmlns:prism="http://www.codeplex.com/prism" xmlns:controls="clr-namespace:WPFprismMEFRadDockingTest.Controls" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" Title="Prism Shell" WindowStartupLocation="CenterScreen" Height="620" Width="850" Icon="../Images/PnPIcon.ico" mc:Ignorable="d" d:DesignHeight="720" d:DesignWidth="900"> <Window.Background> <ImageBrush ImageSource="/Images/background.jpg" Stretch="UniformToFill"/> </Window.Background> <Window.Resources> </Window.Resources> <Grid x:Name="LayoutRoot"> <Grid.RowDefinitions> <RowDefinition Height="100"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="1*" MinWidth="25"/> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="3*"/> </Grid.ColumnDefinitions> <!-- When minimizing the 2 panes, they will be showed at the left site --> <!-- but the area (defined by the grid) is not minimized, too. And the --> <!-- control in the right grid-area did not use the full space. Seems, --> <!-- that the gridsplitter did not "follow" the minimized panes... --> <telerik:RadDocking x:Name="LeftRadDocking" telerikControls:StyleManager.Theme="Transparent" HasDocumentHost="False" Grid.Row="1" Grid.Column="0" Margin="10,5,5,10" Padding="0"> <telerik:RadDocking.Background> <SolidColorBrush /> </telerik:RadDocking.Background> <telerik:RadDocking.BorderBrush> <SolidColorBrush /> </telerik:RadDocking.BorderBrush> <telerik:RadSplitContainer Name="LeftRadSplitContainer" Background="#99FFFFFF" Opacity="0.5" InitialPosition="DockedLeft"> <telerik:RadPaneGroup Opacity="1"> <telerik:RadPaneGroup.Background> <SolidColorBrush /> </telerik:RadPaneGroup.Background> <telerik:RadPane Header="Pane Left 1"> <telerik:RadPane.Content> <TextBlock TextWrapping="Wrap" Text="This is Pane Left 1 to fill the area with some senseless text." /> </telerik:RadPane.Content> </telerik:RadPane> <telerik:RadPane Header="Pane Left 2" Content="Pane Left 2" > </telerik:RadPane> </telerik:RadPaneGroup> </telerik:RadSplitContainer> </telerik:RadDocking> <GridSplitter Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Stretch" Width="5" ShowsPreview="True" ResizeDirection="Columns" Background="Transparent"/> <ContentControl x:Name="DesktopRegion" Grid.Row="1" Grid.Column="2" Margin="5,5,15,10"> <ContentControl.Template> <ControlTemplate TargetType="ContentControl"> <Grid> <controls:RoundedBox /> <ContentPresenter Margin="10,0,10,0" Content="{TemplateBinding Content}" /> </Grid> </ControlTemplate> </ContentControl.Template> </ContentControl> </Grid> </Window> <DataTemplate x:Key="ChartDataTemplate"> <telerik:RadChart x:Name="Chart" UseDefaultLayout="False"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="1*" /> <RowDefinition Height="19*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="19*" /> <ColumnDefinition Width="1*" /> </Grid.ColumnDefinitions> <telerik:ChartLegend x:Name="LegendArea" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Top" /> <telerik:ChartArea LegendName="LegendArea" /> </Grid> </telerik:RadChart> </DataTemplate>