public class GetTextConverter : IValueConverter, IMultiValueConverter
{
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
return "I Am HERE";
}
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return "I Am HERE";
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException();}
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) { throw new NotImplementedException(); }
}
<Style x:Key="CustomLabel" TargetType="telerikCharting:AxisLabel2D">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="telerikCharting:AxisLabel2D">
<Border Background="{TemplateBinding Background}">
<Border.DataContext>
<MultiBinding Converter="{StaticResource GetTextConverter}">
<MultiBinding.Bindings>
<Binding Path="DataContext" ElementName="_GD"/>
<Binding Path="CurrentIndex"/>
</MultiBinding.Bindings>
</MultiBinding>
</Border.DataContext>
<TextBlock Style="{TemplateBinding ItemLabelStyle}" Text="{Binding .}">
<TextBlock.LayoutTransform>
<RotateTransform x:Name="PART_RotateTransform" />
</TextBlock.LayoutTransform>
</TextBlock>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<telerik:RadWindow x:Class="TelerikRadWindow.MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Height="350" Width="525" WindowStartupLocation="CenterScreen"> <telerik:RadWindow.Style> <Style TargetType="telerik:RadWindow"> <Style.Triggers> <DataTrigger Binding="{Binding ShouldMoveWindow}" Value="True"> <DataTrigger.EnterActions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="(Window.Top)" To="+200" BeginTime="0:0:0" Duration="0:0:5" /> </Storyboard> </BeginStoryboard> </DataTrigger.EnterActions> </DataTrigger> </Style.Triggers> </Style> </telerik:RadWindow.Style></telerik:RadWindow>namespace TelerikRadWindow{ public partial class MainWindow { public MainWindow() { InitializeComponent(); ShouldMoveWindow = true; DataContext = this; } public bool ShouldMoveWindow { get; set; } }}<StackPanel> <telerikXaml:XamlDataProvider RichTextBox="{Binding ElementName=radRich}" Xaml="{Binding Path=XamlText, Mode=TwoWay}"></telerikXaml:XamlDataProvider> <telerik:RadRichTextBox x:Name="radRich" /></StackPanel>private string xamlText;public string XamlText{ get { return xamlText; } set { if (xamlText != value) { xamlText = value; RaisePropertyChanged("XamlText"); } }}I have used custom appointment in my project and added a "VisitTime" time property in the appointment template. When I load my calendar for the first time the time reflects correctly in the Appointment tile but when I change the time in code for that appointment, the changes are not getting reflected properly in the appointment tile in UI. The "VisitTime" property is defined as below and is defined in the VisitAppointment class derived from appointment class of telerik.
public DateTimeOffset VisitTime
{
get { return _visitTime; }
set
{
_visitTime = value;
OnPropertyChanged(() => VisitTime);
}
}
I tried using Edit() and Commit() method which are provided by default from telerik in order to update the changes in the UI. I passed the modified appointments collection(i.e custom appointments derived from telerik Appointment class) in the Edit() method and then later on called Commit() but still the changes are not getting reflected until and unless I reload the calendar (i.e fetch data from database again and then create the appointments collection from scratch).
Please help me out with the necessary things that you think I might have missed out.
Thanks in advance.