or
<Style TargetType="{x:Type telerik:RadTreeListView}" x:Key="IprRadTreeListViewStyle" BasedOn="{StaticResource IPRBaseStyle}"> <Setter Property="ValidatesOnDataErrors" Value="None"/> <Setter Property="telerik:StyleManager.Theme" Value="Summer"/></Style><Style TargetType="{x:Type controls:IPRRadTreeListView}" BasedOn="{StaticResource IprRadTreeListViewStyle}"></Style>class IPRRadTreeListView : RadTreeListView { static IPRRadTreeListView() { DefaultStyleKeyProperty.OverrideMetadata(typeof(IPRRadTreeListView), new FrameworkPropertyMetadata(typeof(RadTreeListView))); } public IPRRadTreeListView() : base() { ... } ... }ChangeParagraphSpacingAfter methode but it works only for empty data but when i load exsisting data
it return again with spaces.
my code look like:
private void rtfMain_Loaded(object sender, RoutedEventArgs e) { this.rtfControlMain.ChangeParagraphSpacingAfter(0); this.rtfControlMain.ChangeParagraphLineSpacing(1.15); }xaml:
<telerik:RadRichTextBox x:Name="rtfControlMain" ToolTip="{Binding ElementName=rtfControl,Path=Text}" IsReadOnly="{Binding ElementName=rtfControl,Path=IsReadOnly}" IsSelectionMiniToolBarEnabled="{Binding ElementName=rtfControl,Path=IsReadOnly, Converter={StaticResource inverseBooleanConverter}}" FontFamily="Segoe UI" FontSize="11" DocumentInheritsDefaultStyleSettings="True" Grid.Row="2" Loaded="rtfMain_Loaded"> <telerik:RadRichTextBox.Resources> <Style TargetType="TextBlock" /> </telerik:RadRichTextBox.Resources> <telerik:RadRichTextBox.Document> <telerik:RadDocument LineSpacing="1.15" ParagraphDefaultSpacingAfter="0" /> </telerik:RadRichTextBox.Document> </telerik:RadRichTextBox>Please suggest how can i control this spacing.
Thanks,
<Window x:Class="PFCP.Infrastructure.Client.Shell.MVVM.Splash" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" WindowStartupLocation="CenterOwner" WindowStyle="None" Height="240" Width="420" BorderBrush="Transparent" BorderThickness="0" ShowInTaskbar="False" AllowsTransparency="True" Background="Transparent" ResizeMode="NoResize" Icon="{x:Null}" > <Window.Resources> </Window.Resources> <telerik:RadBusyIndicator x:Name="_busyIndicator" IsBusy="True" BusyContent="{Binding BusyContent}"> <Border HorizontalAlignment="Right" Margin="0" VerticalAlignment="Bottom" Background="Goldenrod" BorderThickness="1" SnapsToDevicePixels="True" BorderBrush="Gray" CornerRadius="8"> <Grid> <StackPanel> <Label Margin="4" Content="{Binding SplashTitle}" FontSize="24" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" Foreground="Black"> <Label.BitmapEffect> <OuterGlowBitmapEffect GlowSize="15" /> </Label.BitmapEffect> </Label> <Label Margin="15,0,0,0" Content="{Binding VersionInfo}" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" Foreground="Black" /> </StackPanel> <Image x:Name="image" Source="..\..\Images\SplashBackground.png" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" SnapsToDevicePixels="True" RenderTransformOrigin="0.5,0.5"> <Image.RenderTransform> <TransformGroup> <ScaleTransform/> <SkewTransform/> <RotateTransform/> <TranslateTransform/> </TransformGroup> </Image.RenderTransform> </Image> </Grid> </Border> </telerik:RadBusyIndicator> </Window> /// <summary> /// Helper class to show or close given splash screen /// </summary> internal class SplashScreenService : ISplashScreenService { private Splash _splash = null; private SplashViewModel _splashViewModel = null; /// <summary> /// Constructor /// </summary> public SplashScreenService(IContainer dependencyContainer) { } /// <summary> /// Set dynamic text in the splash /// </summary> /// <param name="message"></param> public void SetSplashText(string message) { if (this._splashViewModel != null) { this._splashViewModel.BusyContent = message; } } /// <summary> /// Show the splash screen /// </summary> public void ShowSplash(Window ownerWindow, string splashTitle, string versionInfo, string splashText) { if (this._splash != null) { this._splash.Dispatcher.BeginInvoke(new Action(() => { this._splash.Close(); })); } System.Threading.Thread thread = new System.Threading.Thread(new System.Threading.ParameterizedThreadStart((object oParam) => { SplashStartInfo splashStartInfo = oParam as SplashStartInfo; Debug.Assert(splashStartInfo != null); this._splashViewModel = new SplashViewModel(); Splash splashView = new Splash(_splashViewModel); this._splashViewModel.SplashTitle = splashStartInfo.SplashTitle; this._splashViewModel.VersionInfo = splashStartInfo.VersionInfo; this._splashViewModel.BusyContent = splashStartInfo.SplashText; if (splashStartInfo.OwnerHandle != null) { WindowInteropHelper winInteropHelper = new WindowInteropHelper(splashView); winInteropHelper.Owner = splashStartInfo.OwnerHandle; } this._splash = splashView; this._splash.ShowDialog(); })); thread.SetApartmentState(System.Threading.ApartmentState.STA); thread.Start(new SplashStartInfo(ownerWindow, splashTitle, versionInfo, splashText)); } /// <summary> /// Close the splash screen /// </summary> public void CloseSplash() { if (this._splash != null) { this._splash.Dispatcher.BeginInvoke(new Action(() => { this._splash.Close(); })); if (this._splash is IDisposable) { (this._splash as IDisposable).Dispose(); } } } } #region helper class SPlashStartInfo... /// <summary> /// Helper class for start of the splash screen in the separate thread /// </summary> class SplashStartInfo { public SplashStartInfo(Window ownerWindow, string splashTitle, string versionInfo, string splashText) { this.SplashTitle = splashTitle; this.VersionInfo = versionInfo; this.SplashText = splashText; this.OwnerHandle = new WindowInteropHelper(ownerWindow).Handle; } public string SplashTitle { get; set; } public string SplashText { get; set; } public string VersionInfo { get; set; } public IntPtr OwnerHandle { get; set; } }