Telerik Forums
UI for WPF Forum
1 answer
228 views
Hi,

I'm using Telerik 2011.3.1116.35 and VS2008 with a RadRichtextBox. Actually I use a RtdDataProvider to add Rtf document in my RadRichTextBox.

When I try to insert new text at the end of my RadRichTextBox, the new text seems to clear the current content of my RadRichTextBox bedfore insert my new text.

Here is the xaml:
<Window x:Class="WpfApplication3.Window1"
    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"
    xmlns:telerikProvider="clr-namespace:Telerik.Windows.Documents.FormatProviders.Rtf;assembly=Telerik.Windows.Documents.FormatProviders.Rtf"
    Title="Window1" Height="300" Width="641">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
              
        <StackPanel Orientation="Horizontal" DataContext="{Binding ElementName=editor, Path=Commands}">
            <telerik:RadRibbonToggleButton Text="B" FontFamily="Times New Roman" FontSize="14" FontWeight="Bold" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleBoldCommand}" />
            <telerik:RadRibbonToggleButton Text="I" FontFamily="Times New Roman" FontSize="14" FontStyle="Italic" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleItalicCommand}" />
            <telerik:RadRibbonToggleButton FontFamily="Times New Roman" FontSize="14" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleUnderlineCommand}">
                <Underline>U</Underline>
            </telerik:RadRibbonToggleButton>
            <telerik:RadButton Click="RadButton_Click">Test</telerik:RadButton>
        </StackPanel>
       
        <telerik:RadRichTextBox Grid.Row="1" x:Name="editor" Margin="24 24 0 0" AllowDrop="True" ShowComments="True" IsSelectionMiniToolBarEnabled="False" IsContextMenuEnabled="False" />       
        <telerikProvider:RtfDataProvider Name="Rtf" RichTextBox="{Binding ElementName=editor}" />
        <telerik:DocumentRuler AssociatedRichTextBox="{Binding ElementName=editor, Mode=OneTime}" Grid.Row="1" />
        <telerik:RadRichTextBoxStatusBar Grid.Row="2" AssociatedRichTextBox="{Binding ElementName=editor, Mode=OneTime}" />
    </Grid>
</Window>

Here is the code-behind:

using

 

System;

 

using

 

System.Collections.Generic;

 

using

 

System.Linq;

 

using

 

System.Text;

 

using

 

System.Windows;

 

using

 

System.Windows.Controls;

 

using

 

System.Windows.Data;

 

using

 

System.Windows.Documents;

 

using

 

System.Windows.Input;

 

using

 

System.Windows.Media;

 

using

 

System.Windows.Media.Imaging;

 

using

 

System.Windows.Navigation;

 

using

 

System.Windows.Shapes;

 

using

 

VPlayer;

 

using

 

Telerik.Windows.Documents.Model.Styles;

 

namespace

 

WpfApplication3

 

{

 

/// <summary>

 

 

/// Interaction logic for Window1.xaml

 

 

/// </summary>

 

 

public partial class Window1 : Window

 

{

 

public Window1()

 

{

InitializeComponent();

}

 

private void RadButton_Click(object sender, RoutedEventArgs e)

 

{

Rtf.Rtf =

"Line 1";

 

editor.Document.CaretPosition.MoveToLastPositionInDocument();

editor.Insert(

@"Line 2");

 

}

}

}


Thank's

Alex
Telerik team
 answered on 08 Dec 2011
3 answers
122 views
Is there a way of getting the spell checker to perform live checks and add the wavy underscore?  If not do you intend to add this in a future update?
Andrew
Telerik team
 answered on 08 Dec 2011
1 answer
87 views
i'm using with the pie.
my ItemLabelFormat #%{P2} #XCAT becouse i want to display the category name.
my category name is enum, and i want to display the description by the enum.
Hou could i do that?
Petar Marchev
Telerik team
 answered on 08 Dec 2011
1 answer
106 views

Hi

i have problem following this scenario :

TreeView use LoadOnDemand and CheckList

1.  parent node checked;
2.  parent node expand;

i want to result that is all check of child node for parent node

but all not checked for checkbox for child node for parent node

how to do checked for all checkbox of child node for parent node??

thank you

Petar Mladenov
Telerik team
 answered on 08 Dec 2011
3 answers
148 views
hello,

I use a colorselector in a raddropdownbutton (on a ribbon), to select color for several objects.
i have a framework as described bellow.

I'd like that each time i click on "color" button, the selectedcolor is empty.
because i need to be able to apply the same color for different objects, and sometimes user doesn't select all at one time, but select one defines a color, the selects another object and want to define same color. then he needs to change color selection, then reopen colorselector to choose right color.

<Window x:Class="tlk_colorpicker.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <tlk:RadDropDownButton Content="Color"  x:Name="color">
            <tlk:RadDropDownButton.DropDownContent>
                <tlk:RadColorSelector  SelectedColorChanged="PredefSelectedColorChanged"    NoColorVisibility="Collapsed" />
            </tlk:RadDropDownButton.DropDownContent>
        </tlk:RadDropDownButton>
         
        <Rectangle x:Name="oRect" Width="50" Height="50" Grid.Row="2"  Fill="AliceBlue" />
    </Grid>
</Window>
private void PredefSelectedColorChanged(object sender, EventArgs e)
        {
            oRect.Fill = new SolidColorBrush(((RadColorSelector)sender).SelectedColor);
            color.IsOpen = false;
        }

thanks for your expertise
Aurore
Petar Mladenov
Telerik team
 answered on 08 Dec 2011
2 answers
196 views
Is there a way to customize the ToolTip placement for an item tooltip within the WPF RadChart?  It looks like it always uses MousePoint but I would like to have the tooltips shown above their source DataPoint.  Ideally I would like to specify a CustomPopupPlacementCallback similar to WPF ToolTips.

The WPF equivalent property is ToolTipService.Placement.  I did not see any similar properties on the ItemToolTip2D class.  I found a ChartTooltipBehavior class in the WPF documentation which was promising but it only appears to apply to Windows Phone.

Thanks for any help or suggestions that can be offered.
Steve
Top achievements
Rank 1
 answered on 08 Dec 2011
1 answer
211 views
Hello Telerik,
I'm following the demo titled "GridView Printing Paged Data" and I got some problem selecting a print range... since my view can have a lot of items I wish to let the user select a range...

Here's my PrintPreview method

public static void PrintPreview(GridViewDataControl source)
       {
           Window window = new Window();
           window.Title = "Print Preview";
 
           DocumentViewer documentViewer = new DocumentViewer();
           PrintDialog printDialog = new PrintDialog();
 
           printDialog.PageRangeSelection = PageRangeSelection.UserPages;
           printDialog.UserPageRangeEnabled = true;
 
           printDialog.MaxPage = 40;
           documentViewer.Document = ToFixedDocument(ToPrintFriendlyGrid(source), printDialog);
            
           window.Content = documentViewer;
 
           window.ShowDialog();
       }

It shows me only Print alla pages...what am I doing wrong?
Thanks
Paolo

Dimitrina
Telerik team
 answered on 08 Dec 2011
3 answers
75 views
Hi Folks,
I've got a RadGridView with a details view that itself contains three RadGridViews.
The problem is, events from the inner Grid e.g. SelectionChanged or MouseDoubleClick  are transported somehow to the outer Grid.
This leads to serious problems, for example the outer grid collapses the details when the user double clicks in the inner gridview..
How can I prevent the outer grid accepting events from controls of the details page ? 
(Is this a common event routing issue ?)

Best regards
Oliver

(P.S. or, vica versa, how to prevent the "inner" controls sending events to the outside? There's this structure: The outer grid contains a RadTabControl, some tabs, each tab contains a Grid which contains three RadGridViews and some buttons)

Vlad
Telerik team
 answered on 08 Dec 2011
0 answers
92 views

Hi,


We are using Telerik WPF controls (ver. 2011.2.920.35) and we are trying to accomplish tooltips in the case of a validation failure in one of the grid cells.

Attached is a screenshot that highlights two cells - one with a combobox and the other with a text field. We want the validation errors to be presented for the cell with a combobox just like the way it gets presented for a text field column.

Please let us know how can we do that.

Any help is very much appreciated.

Regards,
Shalini
salini
Top achievements
Rank 1
 asked on 08 Dec 2011
1 answer
105 views

Hi,

I have a scenario where I need to update the layout of a RadGridView when I change the width of a column from my ViewModel.
My first approach was to use the ColumnWidthChanged event, but it does not fire.
Is this intended behavior?
I could trigger the UpdateLayout() call from my ViewModel, but it does not belong there because it is entirely UI related stuff...

Any suggestions?

Best Regards,
Christian

 

 

 

Vlad
Telerik team
 answered on 08 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?