Telerik Forums
UI for WPF Forum
1 answer
330 views
Hi

i'm tring to change the spacing between lines in wpf RadRichText control. i've already tried the

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,



Ivailo Karamanolev
Telerik team
 answered on 21 Jul 2011
1 answer
133 views
Hallo,
we have a serious problem with BussyIndicator component with the combination of theme "Metro". We're using bussy indicator inside splash window, which is opened during the app start up in the separate thread. Folowing exception is raised:

----------- Exception
   v System.Windows.DependencyObject.GetValue(DependencyProperty dp)
   v Telerik.Windows.Controls.MetroColorPalette.get_BasicColor() v c:\TB\102\WPF_Scrum\Current_HotFix\Sources\Development\Core\Controls\Theming\MetroColorPalette.cs:line 39
   v Telerik.Windows.Controls.MetroColors.get_BasicColor() v c:\TB\102\WPF_Scrum\Current_HotFix\Sources\Development\Core\Controls\Theming\MetroColors.cs:line 62
-----------

The xaml code of splash window is:
<Window x:Class="PFCP.Infrastructure.Client.Shell.MVVM.Splash"
        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>

the code for display of the splash is:

/// <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; }
}

 If I set in the App.OnStartup() method "StyleManager.ApplicationTheme = new MetroTheme();" the exception is raised, when I use any other theme, application starts without any problems.. Thanks for any solution.
Tomas.
Dani
Telerik team
 answered on 21 Jul 2011
1 answer
142 views
If you move the quick access bar below the ribbon the text "Show below the ribbon." becomes blank.
It also happens in each of your WPF demo ribbonview applications.
At least it does on my machine (windows 7 32bit).

Attached is an image of it happening in your demo.

Please let me know if there is a patch or a way I can override it in code-behind c#.
Viktor Tsvetkov
Telerik team
 answered on 21 Jul 2011
6 answers
283 views
Hello, I've tried to generate the style for the control as said onhttp://www.telerik.com/help/wpf/raddatafilter-styles-and-templates-styling-the-raddatafilter.html

But, I can't seem to do the "Create a Copy" for creating the style/template structure for the control.

Where can I find it to be able to put on my ResourceDictionary and edit the Style default?

Thanks
Rossen Hristov
Telerik team
 answered on 21 Jul 2011
2 answers
93 views
RadControl for WPF 4.0 2011.2.0712
Blend 4.0
For all AdditionalTemplates only CreateEmpty action.
Also Demo project Themes_WPF not compiling

by error The 'clr-namespace' URI refers to a namespace 'Telerik.Windows.Controls.External' that is not included in the assembly.   

All projects in Themes_WPF solution targeted to 3.5 framework and have not valid reference to System.Xaml not presented in 3.5 framework.

Tatarincev
Top achievements
Rank 1
 answered on 21 Jul 2011
0 answers
80 views
Hi Support
I have problem with binding a value of FilterDescriptor in RadGridView. I'm just able of binding it to StaticResource how can we bind it to non static ones.

Thanks in advance
Mehri
Mehri
Top achievements
Rank 1
 asked on 21 Jul 2011
3 answers
251 views
I have a gridview, with a column that is a date. It displays the date in the format of the current culture.
However, at runtime the culture can change.
How can I let the gridview adapt to this new culture, so that the dates are formatted in the new culture format?
Milan
Telerik team
 answered on 21 Jul 2011
1 answer
122 views
Hi,
How can I change the content of DateTime MaskedInput programmaticaly?
I set the new DateTime to Value property of MaskedInput but nothing changed.
the setter of Text property is inaccessible also and cannot be changed.
I've used MaskedInput in a UserControl and wanna change it from the main App Window in code.
What's the solution?  
Libertad
Top achievements
Rank 1
 answered on 21 Jul 2011
0 answers
73 views
Hi

I' facing an issue that on load gridview cloumns first Shrink and then expand. which looks odd in the application. Kindly suggest me how to overcome with this issue.

Regads
Nikhil Jain
Top achievements
Rank 1
 asked on 21 Jul 2011
6 answers
262 views
Hi,

I am trying to implement a binding for some properties of SeriesDefinition for RadChart in XAML. Here is a part of my XAML:

<telerik:RadChart.SeriesMappings>
    <telerik:SeriesMapping LegendLabel="Rates" CollectionIndex="1">
        <telerik:SeriesMapping.SeriesDefinition>
            <telerik:LineSeriesDefinition AxisName="Rate" ItemLabelFormat="0.00 \%">
                <telerik:LineSeriesDefinition.Visibility>
                    <Binding Path="ChartRateSeriesVisible" Source="{StaticResource ViewModel}" Converter="{StaticResource BooleanToSeriesVisibilityConverter}" />
                </telerik:LineSeriesDefinition.Visibility>
            </telerik:LineSeriesDefinition>
        </telerik:SeriesMapping.SeriesDefinition>
    </telerik:SeriesMapping>
</telerik:RadChart.SeriesMappings>

This binding works fine, it gets the value from my ViewModel, so series are either visible on invisible.

The issue is the following:
I have a CheckBox on my View (UserControl defined in XAML) which is also binded to the same property of ViewModel (ChartRateSeriesVisible  property). And I want to control the visibility of a series by clicking on the checkbox. CheckBox's binding is defined property. I can see in the trace that checking/unchecking the checkbox updates the value of ChartRateSeriesVisible property.

But chart is not updated automatically. Only then I reload the chart completely (by updating its ItemsSource for instance), my LineSeries is hidden or visible depending on the value of ChartRateSeriesVisible.

What am I doing wrong or what am I missing?
In the telerik's sample application 'Simple Filtering' almost the same approach is used! Series Visiblity property is also binded to the ViewModel's property, etc.

I am using WPF 3.5 and the version of telerik assemblies is 2010.2.924.35.

Thanks in advance.
Giuseppe
Telerik team
 answered on 21 Jul 2011
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?