Telerik Forums
UI for WPF Forum
2 answers
487 views

I need to add different type of cells (NumericUpDown,TextBox,Combobox) to same column in RadDataGrid. Could someone please help its very urgent.......

 

Thanks.

Luís Henrique
Top achievements
Rank 2
 answered on 31 Jan 2018
6 answers
161 views

Hello Telerik team,

I have written the following "Feature Request": ScheduleView: Provide methods to print its content with full paging Support.

At the moment I'm trying to print the "WeekView" (seven days) on two pages. On the first page the first four days and on the second the rest. To realize this I use a hidden RadScheduleView (name: printScheduleView). My plan is to create an image for each page. Currently I am using the PrintVisual method, but later I would like to use the PrintDocument method (public abstract DocumentPage GetPage(int pageNumber)).

Before the PrintVisual method is called, printScheduleView must be rendered correctly, which currently only works with a timer. printScheduleView.UpdateLayout method could not solve the problem. Even a dirty DoEvents (UIElement.UpdateLayout Method) didn't solve the problem completely.

The sample project on my OneDrive account shows the bad behavior.

Can you please help me find a good solution?

Regards,
Marco

Kalin
Telerik team
 answered on 31 Jan 2018
7 answers
229 views

I wanted to select my E:\ Drive in OpenFolderDialog and selected it on the left side, like I always do in Windows default dialogs.

Sadly this does not seem to be possible with your OpenFolderDialog. Instead, I had to click This Computer on the left side and select the drive on the right side.

Could this be changed? Is there maybe an option for it I didn't saw?

Thanks

Petar Mladenov
Telerik team
 answered on 31 Jan 2018
2 answers
181 views

Hi,

I create a program to modelize data. I use Save() function with serialize item (like TableShape Demo)

this my serialize function for my TableGraphSource :

public override void SerializeNode(NodeViewModelBase node, SerializationInfo info)
{
    base.SerializeNode(node, info);
 
    if (node is INodeSerializable)
    {
        info = (node as INodeSerializable).Serialize(info);
    }
}

each model have a Serialize method with his own parameters to serialize

It's the same for Deserialize TableGraphSource :

public override NodeViewModelBase DeserializeNode(IShape shape, SerializationInfo info)
       {
           NodeViewModelBase node = null;
           if (shape is TableShapeMulti)
           {
               var table = new TableModelMulti();
               node = table.Deserialize(info);
           }
           else if (shape is TableShape)
           {
               var table = new TableModel();
               node = table.Deserialize(info);
           }
           else if (shape is ShapeShape)
           {
               if (null != info["Content"])
               {
                   switch (info["Content"].ToString())
                   {
                       case "Controls.Entity.Models.ShapeModel":
                           var _sm = new ShapeModel();
                           node = _sm.Deserialize(info);
                           break;
                      ...
                       default:
                           var shapeModel = Activator.CreateInstance(Type.GetType(info["Content"].ToString()));
                           if (shapeModel is ShapeModel)
                               node = (shapeModel as ShapeModel).Deserialize(info);
                           break;
                   }
               }
 
           }
           else
           {
               var row = new RowModel();
               row.Deserialize(info);
               node = row;
           }
           if (null != node)
           {
               if (info["Position"] != null)
                   node.Position = Utils.ToPoint(info["Position"].ToString()).Value;
 
               if (info[this.NodeUniqueIdKey] != null)
               {
                   var nodeUniquekey = info[this.NodeUniqueIdKey].ToString();
                   if (!this.CachedNodes.ContainsKey(nodeUniquekey))
                   {
                       this.CachedNodes.Add(nodeUniquekey, node);
                   }
               }
           }
 
           return node;
       }

 

Saving is OK and Reloading is OK (all data are correctly affected) but i have a problem with ContainerShape : Width, Height, Position (X,Y) properties are not binding  anymore between shape and model when i reload diagram.

I use styleSelector to link shape with model (my app is based on TableShape demo for code structure)

Can you help me please ? Thanks

nicolasf
Top achievements
Rank 2
 answered on 31 Jan 2018
3 answers
1.2K+ views
I'm trying to get myself introduced into using the RadChartView here and I'm working from your demos on the matter but when I try building I get this compiler error: 

message: The type or namespace name 'Windows' does not exist in the namespace 'Spike.Telerik' (are you missing an assembly reference?)
file: GvsDefectsChartControl.xaml 19 26
project: Spike.Telerik.RadChartView

Apparently there's an assembly that needs to be referenced but the message isn't gibing me much of a hint on which one.
Also, on the whole, I think your demos are lacking in this area. None of the XAML examples I've seen includes the namespace declarations, just the rendered tags. Those all include custom (Telerik) namespaces. Fortunately I have Jetbrains Resharper to help me set up the correct namespace declarations but I'm still stuck with the above error.

This is my complete XAML:

<UserControl x:Class="Spike.Telerik.RadChartView.MyTestChartViewControl"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:chart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Chart"
             xmlns:chartView="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d"
             xmlns:GVS="clr-namespace:Spike.RADChart.GVS"
             d:DesignHeight="300" d:DesignWidth="300">
     
    <UserControl.Resources>
        <GVS:MyViewModel x:Key="_testVM"/>
    </UserControl.Resources>
     
    <Grid DataContext="{StaticResource _testVM}">
             
        <chart:RadCartesianChart >
 
            <chart:RadCartesianChart.HorizontalAxis>
                <chartView:DateTimeCategoricalAxis LabelRotationAngle="50" LabelFormat="HH:mm"/>
            </chart:RadCartesianChart.HorizontalAxis>
 
            <chart:RadCartesianChart.VerticalAxis>
                <chartView:LinearAxis />
            </chart:RadCartesianChart.VerticalAxis>
 
            <chart:RadCartesianChart.Series>
                <chartView:SplineSeries
                    ItemsSource="{Binding Path=Data}"
                    CategoryBinding="Time"
                    ValueBinding="Value"
                    />
 
            </chart:RadCartesianChart.Series>
             
        </chart:RadCartesianChart>
         
    </Grid>
</UserControl>


I would appreciate any help.
Thanks

Dinko | Tech Support Engineer
Telerik team
 answered on 31 Jan 2018
4 answers
130 views

Does anybody know what's the right way to remove the radwindow header from the tab navigation cycle?

 

<telerik:RadWindow IsTabStop="False">

is permitted but doesn't have the desired effect.

 

 

<telerik:RadWindow>

     <telerik:RadWindow.Header
        IsTabStop="False"
        >
        Manage Styles
    </telerik:RadWindow.Header>

Is not permitted... "Attribute is not allowed in property element"

 

 

Thanks

 

Michael
Top achievements
Rank 1
Veteran
 answered on 31 Jan 2018
14 answers
416 views

Hi, i'm using LinearAxis for TimeSpan values. Minimum = 1 second and Maximum - maybe 1000 days.

For values - ScatterLineSeries. In test with perfomance troubles ~500 points.

        <telerik:RadCartesianChart Zoom="10,1"

            Name="_chart" Palette="{StaticResource ScatterCustomPalette}">
            <telerik:RadCartesianChart.HorizontalAxis >
                <telerik:LinearAxis  IsStepRecalculationOnZoomEnabled="False" LabelFitMode="Rotate">
                    <telerik:LinearAxis.LabelTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Converter={StaticResource LinearAxisTimeSpanConverter}}" />
                        </DataTemplate>
                    </telerik:LinearAxis.LabelTemplate>
                </telerik:LinearAxis>
            </telerik:RadCartesianChart.HorizontalAxis>

            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis MajorStep="1"/>
            </telerik:RadCartesianChart.VerticalAxis>

            <telerik:RadCartesianChart.Behaviors>
                <telerik:ChartPanAndZoomBehavior x:Name="_panZoomBehavior" ZoomMode="Horizontal" DragToZoomThreshold="10" />
            </telerik:RadCartesianChart.Behaviors>
        </telerik:RadCartesianChart>

Real max zoom depends from data, Axis.Maximum/coef (>1).

Its wide range for axis X, so i update major step on zoom changing. 

        private void UpdateAxisMajorStep()
        {
            var xAxis = (LinearAxis) _chart.HorizontalAxis;

            double modelWidth = xAxis.Maximum - xAxis.Minimum;
            double viewWidth = xAxis.ActualWidth > 1
                ? xAxis.ActualVisibleRange.Maximum - xAxis.ActualVisibleRange.Minimum
                : modelWidth / _chart.Zoom.Width;
            xAxis.MajorStep = viewWidth / 10;
        }

Behaviour looks good, but when i'm trying zoom in with big factor perfomance slow down.

Chart shows 10 ticks and labels at horizontal axis, but looks like

    calculated labels count = Chart.ActualRange/MajorStep. 

For example Maximum = 500000, Visible range 0 - 5000 and MajorStep = 500, count of calculated labels =  1000. Perfomance becomes unusable. 

Martin Ivanov
Telerik team
 answered on 30 Jan 2018
5 answers
638 views

Hi,

I'm using the last version of telerik and I was trying to integrate the RadPdfViewerToolBar into RadPdfViewer

This is my code

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
    </Grid.RowDefinitions>
    <telerik:RadPdfViewerToolBar RadPdfViewer="{Binding ElementName=pdfViewer, Mode=OneTime}" />
     
    <telerik:RadPdfViewer Grid.Row="2" x:Name="pdfViewer" DataContext="{Binding CommandDescriptors, ElementName=pdfViewer}"                              
                            RenderOptions.BitmapScalingMode="HighQuality"     />
    <telerik:RadPdfViewerToolBar/>
</Grid>

 

I populate the pdfViewer on datacontext change

private void RootElement_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            if (e.NewValue != e.OldValue)
            {
                pdfViewer.DocumentSource = new PdfDocumentSource(new Uri(e.NewValue.ToString()));               
            }
        }

 

As shown on the attachment, the toolbar it seems not related to the pdfviewer.

Another question. Is it possible to specify a page number when I open the pdf? Something like GotoPage xy

 

Thank you

Polya
Telerik team
 answered on 30 Jan 2018
1 answer
291 views

Hi,

I have simple RadToolBar with RadRibbonButtons mostly:

<UserControl
    x:Class="EditorToolBar"
    xmlns:local="Views"
    d:DesignHeight="300"
    d:DesignWidth="300"
    mc:Ignorable="d">
    <telerik:RadToolBarTray DataContext="{Binding .}">
        <telerik:RadToolBarTray.Resources>
            <telerik:FontFamiliesProvider x:Key="FontFamiliesProvider" />
        </telerik:RadToolBarTray.Resources>
        <telerik:RadToolBar Height="32">
            <telerik:RadButtonGroup>
                <telerik:RadRibbonButton
                    Name="button"
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding PrintCommand}"
                    Size="Medium"
                    SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/print.png" />
                <telerik:RadRibbonButton
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowSpellCheckingDialogCommand}"
                    Size="Medium"
                    SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/EnableSpellCheck.png" />
                <telerik:RadRibbonButton
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowFindReplaceDialogCommand}"
                    Size="Medium"
                    SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/Find.png"
                    Text="Find/Replace" />
            </telerik:RadButtonGroup>
            <telerik:RadToolBarSeparator />
            <telerik:RadButtonGroup>
                <telerik:RadRibbonButton
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding CutCommand}"
                    CollapseToSmall="WhenGroupIsMedium"
                    Size="Medium"
                    SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/cut.png"
                    ToolTip="Cut" />
                <telerik:RadRibbonButton
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding CopyCommand}"
                    CollapseToSmall="WhenGroupIsMedium"
                    Size="Medium"
                    SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/copy.png"
                    ToolTip="Copy" />
                <telerik:RadRibbonButton
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding PasteCommand}"
                    CollapseToSmall="WhenGroupIsMedium"
                    Size="Medium"
                    SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/paste.png"
                    ToolTip="Paste" />
            </telerik:RadButtonGroup>
            <telerik:RadToolBarSeparator />
            <telerik:RadButtonGroup>
                <telerik:RadRibbonButton
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding UndoCommand}"
                    Size="Small"
                    SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/undo.png"
                    Text="Undo" />
                <telerik:RadRibbonButton
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding RedoCommand}"
                    Size="Small"
                    SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/redo.png"
                    Text="Redo" />
            </telerik:RadButtonGroup>
            <telerik:RadToolBarSeparator />
            <telerik:RadButtonGroup>
                <telerik:RadComboBox
                    x:Name="FontFamilySelector"
                    Width="132"
                    Height="21"
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeFontFamilyCommand}"
                    telerik:ScreenTip.Description="Change the font family."
                    telerik:ScreenTip.Title="Font"
                    CanAutocompleteSelectItems="False"
                    CanKeyboardNavigationSelectItems="False"
                    CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=SelectedValue}"
                    IsReadOnly="True"
                    OpenDropDownOnFocus="True" />
                <telerik:RadComboBox
                    x:Name="FontSizeSelector"
                    Width="45"
                    Height="21"
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeFontSizeCommand}"
                    CanAutocompleteSelectItems="False"
                    CanKeyboardNavigationSelectItems="False"
                    CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=SelectedItem.Tag}"
                    IsReadOnly="True"
                    IsTextSearchEnabled="False"
                    OpenDropDownOnFocus="True">
                    <telerik:RadRibbonComboBoxItem Content="12" Tag="16" />
                </telerik:RadComboBox>
            </telerik:RadButtonGroup>
            <telerik:RadToolBarSeparator />
            <telerik:RadButtonGroup>
                <telerik:FormattingColorPicker
                    x:Name="FontForeColorPicker"
                    Height="22"
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeFontForeColorCommand}"
                    ActiveColor="Red"
                    Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/FontForeColor.png" />
                <telerik:FormattingColorPicker
                    x:Name="FontHighlightColorPicker"
                    Height="22"
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeFontHighlightColorCommand}"
                    ActiveColor="Yellow"
                    AutomaticColor="Transparent"
                    Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/highlight.png"
                    NoColorText="No color" />
                <telerik:RadRibbonButton
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ClearFormattingCommand}"
                    Size="Small"
                    SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/ClearFormatting16.png" />
            </telerik:RadButtonGroup>
            <telerik:RadToolBarSeparator />
            <telerik:RadButtonGroup>
                <telerik:RadRibbonButton
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=InsertPictureCommand}"
                    Size="Medium"
                    SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/Picture.png" />
                <telerik:RadRibbonButton
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ShowInsertHyperlinkDialogCommand}"
                    Size="Small"
                    SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/inserthyperlink.png" />
            </telerik:RadButtonGroup>
            <telerik:RadToolBarSeparator />
            <telerik:RadButtonGroup>
                <telerik:RadRibbonToggleButton
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleBoldCommand}"
                    Size="Small"
                    SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/bold.png" />
                <telerik:RadRibbonToggleButton
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleItalicCommand}"
                    Size="Small"
                    SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/italic.png" />
                <telerik:RadRibbonToggleButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleUnderlineCommand}" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/underline.png" />
                <telerik:RadRibbonToggleButton
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleStrikethroughCommand}"
                    Size="Small"
                    SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/Strikethrough16.png" />
            </telerik:RadButtonGroup>
            <telerik:RadToolBarSeparator />
            <telerik:RadButtonGroup>
                <telerik:RadRibbonToggleButton CommandParameter="Left" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeTextAlignmentCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/alignleft.png" Text="Align Left" />
                <telerik:RadRibbonToggleButton CommandParameter="Center" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeTextAlignmentCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/aligncenter.png" Text="Center" />
                <telerik:RadRibbonToggleButton CommandParameter="Right" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeTextAlignmentCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/alignright.png" Text="Align Right" />
                <telerik:RadRibbonToggleButton CommandParameter="Justify" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeTextAlignmentCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/alignjustify.png" Text="Justify" />
            </telerik:RadButtonGroup>
            <telerik:RadToolBarSeparator />
            <telerik:RadButtonGroup>
                <telerik:RadRibbonToggleButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleBulletsCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/list-bullets.png" />
                <telerik:RadRibbonToggleButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleNumberedCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/list-numbered.png" />
                <telerik:RadRibbonDropDownButton Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/MultilevelList.png">
                    <telerik:RadRibbonDropDownButton.DropDownContent>
                        <StackPanel>
                            <telerik:RadGroupHeader Content="List Library" />
                            <telerik:RadGallery ItemHeight="88" ItemWidth="88" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeListStyleCommand}" ViewportHeight="176" ViewportWidth="266">
                                <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/MultilevelListNone.png" Tag="None" />
                                <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/MultilevelListBulleted.png" Tag="Bulleted" />
                                <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/MultilevelListNumbered.png" Tag="Numbered" />
                                <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/MultilevelListNumberedParenthesis.png" Tag="NumberedParenthesis" />
                                <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/MultilevelListNumberedHierarchical.png" Tag="NumberedHierarchical" />
                            </telerik:RadGallery>
                        </StackPanel>
                    </telerik:RadRibbonDropDownButton.DropDownContent>
                </telerik:RadRibbonDropDownButton>
            </telerik:RadButtonGroup>
            <telerik:RadToolBarSeparator />
            <telerik:RadButtonGroup>
                <telerik:RadRibbonButton
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowInsertSymbolWindowCommand}"
                    LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/Symbol.png"
                    Size="Large"
                    Text="Symbol" />
                <telerik:RadRibbonDropDownButton
                    CollapseToMedium="WhenGroupIsMedium"
                    Command="{Binding InsertTableCommand}"
                    LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/InsertTable.png"
                    Size="Large"
                    Text="Insert">
                    <telerik:RadRibbonDropDownButton.DropDownContent>
                        <StackPanel>
                            <telerik:RadRibbonButton ClickMode="Press">
                                <telerik:TableSizePicker Command="{Binding InsertTableCommand}" />
                            </telerik:RadRibbonButton>
                            <telerik:RadMenuItem IsSeparator="True" />
                            <telerik:RadRibbonButton
                                HorizontalAlignment="Stretch"
                                telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowInsertTableDialogCommand}"
                                Size="Medium"
                                SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/InsertTable.png"
                                Text="Insert Table..." />
                        </StackPanel>
                    </telerik:RadRibbonDropDownButton.DropDownContent>
                </telerik:RadRibbonDropDownButton>
            </telerik:RadButtonGroup>
            <telerik:RadToolBarSeparator />
            <telerik:RadButtonGroup>
                <telerik:RadRibbonToggleButton
                    VerticalAlignment="Bottom"
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleSubscriptCommand}"
                    Size="Small"
                    SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/subscript.png" />
                <telerik:RadRibbonToggleButton
                    telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleSuperscriptCommand}"
                    LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/superscript.png"
                    Size="Small" />
            </telerik:RadButtonGroup>
        </telerik:RadToolBar>
    </telerik:RadToolBarTray>
</UserControl>

 

Its task is to execute RichTextBox commands.

So I created a binding for commands property:

<local:EditorToolBar
            x:Name="DescEditorToolbar"
            Grid.Column="0"
            DataContext="{Binding ElementName=DescEditor, Path=Commands}" />
 
<telerik:RadRichTextBox
            x:Name="DescEditor"
            Grid.Row="2"
            Margin="1,2,0,0"
            telerik:XamlDataProvider.Source="{Binding Description, Mode=TwoWay}"
            BorderThickness="0"
            DocumentInheritsDefaultStyleSettings="True"
            FontFamily="Verdana"
            FontSize="16"
            IsImageMiniToolBarEnabled="False"
            IsSelectionMiniToolBarEnabled="False"
            IsSpellCheckingEnabled="False" LayoutMode="Paged"/>    

 

At application start, property Description in ViewModel is filled with empty RadDocument xaml string and then user can edit it. It works fine, but for unknown reasons sometimes after application start, toolbar looks like it isn't binded to RichTextBox commands. Pressing Toolbar buttons doesn't change anything in edited Document. It looks like Toolbar and RichTextBox are not connected in any way.

 

Commands in RadRichTextBox are fine, because ctrl+z is working. Should I perform some refresh actions on Toolbar or something?

 

Thanks for any help,

Jakub.

Peshito
Telerik team
 answered on 30 Jan 2018
5 answers
299 views

Hi,

I'm having a lot of difficulties in understanding how to create the layout that I am looking for with RadDocking.  I have read the documentation and have looked at the examples however I am still having difficulties.

https://docs.telerik.com/devtools/wpf/controls/raddocking/getting-started/getting-started2#adding-radpane

Is it possible for someone to help me understand how to create the layout attached in my wireframe?

I am having a hard time getting tabs to be on the left, how to size things with RadSplitContainer and understanding the need of DocumentHost.

Thank you.

David

Kalin
Telerik team
 answered on 30 Jan 2018
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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?