Telerik Forums
UI for WPF Forum
1 answer
135 views

Hi,

I am facing issues in copying the PNG files in to rich text box. 

I have an 2 PNG files, one of theirs Layout format is "Square", the other ones Layout format is "Inline with text". 

File with the Layout format of "Square" is copied properly, where as the "Inline with Text" doesn't get copied over as image. Instead, its pasted as a very long text of binaries or strings.

ClipboardEx.GetDocument(); gets Image as span with long text rather than the ImageInline.

Could some one help in fixing this issue please ? Do we have paste special option in Telerik ?

Thanks

Tanya
Telerik team
 answered on 18 Feb 2016
3 answers
769 views
Good morning,
My company is looking at using the RadRichTextBox control for rendered, editing, and exporting Docx documents. I am attempting to write a small test app as a proof-of-concept but I've hit a problem I can't get around. In all of the demos/tutorials I am seeing online they are creating a DoxFormatProvider and using it to create a document like the following:

using( Stream readStream = dialog.OpenFile() )
{
   IDocumentFormatProvider provider = new DocxFormatProvider();
   RadDocument = provider.Import( readStream );
}

Unfortunately what I am seeing is that DocxFormatProvider will not cast to an IDocumentFormatProvider. DocxFormatProvider appears to be a BinaryFormatProviderBase<RadFlowDocument> found in the Telerik.Windows.Documents.Flow assembly. The DocxFormatProvider returns a RadFlowDocument rather than a RadDocument which I have been unable to find a way to get a RadFlowDocument to work in the RadRichTexTextBox control.

It appears like all other providers have their own DLL following the pattern Telerik.Windows.Documents.FormatProviders.XXX.dll where XXX is the provider type but I do not see a Docx DLL. The assemblies I am working with are 2014.2.729.45. Any guidance would be greatly appreciated. Thanks!
Jason
Michael
Top achievements
Rank 1
 answered on 17 Feb 2016
1 answer
128 views

hi, im using current Telerik WPF Q1 2015 and also try using current and i have a problem in my project with DocumentTextSearch. the function is to load  document xaml template and find text string and replace with table. but i have problem with DocumentTextSearch when searching text string from RadDocument its keep hanging when try to find text string. my code is like bellow : 

  public void ReplaceTable(ref RadDocument doc, string searchitem, Table RefTable)
        {
            doc.BeginUpdate();
            try
            {
                using (DocumentPosition startFindPosition = new DocumentPosition(doc.DocumentLayoutBox, true))
                {
                    var found = true;

                    while (found)
                    {
                        DocumentTextSearch textSearch = new DocumentTextSearch(doc);
                        TextRange find = textSearch.Find( Regex.Escape(searchitem), startFindPosition);

                        found = find != null;

                        if (found)
                        {
                            startFindPosition.MoveToPosition(find.EndPosition);
                            startFindPosition.AnchorToNextFormattingSymbol();

                            doc.CaretPosition.MoveToPosition(find.StartPosition);
                            find.SetSelection(doc);

                            //doc.Delete(false);
                            //doc.IncreaseLeftIndent();
                            //if (RefTable.Rows.Count == 1)
                            //{
                            //    doc.Insert("-");

                            //}
                            //else
                            //{
                            //    doc.InsertTable(RefTable);
                            //}
                            doc.Selection.Clear();


                            startFindPosition.RemoveAnchorFromNextFormattingSymbol();
                        }
                    }
                   
                }
            }
            catch (Exception e) { }
            finally
            {
                doc.EndUpdate();
                
            }
        }

i wait your reply

 

Svetoslav
Telerik team
 answered on 17 Feb 2016
3 answers
131 views
I have a carousel that has items that are getting generated dynamically using a DataTemplate. My problem is that I cannot get a GotFocus event to fire on the carousel if an item is clicked. If I don't use the dataTemplate and let the carousel create the items with the properties listed then these items fire the GotFocus event fine. Any ideas?
Robert
Top achievements
Rank 1
 answered on 17 Feb 2016
2 answers
187 views

When working with the RichTextBox together with the Ribbon UI, changing the text alignment in the table style does not seem to work for any "Apply formatting to" OTHER THAN "Whole Table". Here are the steps to reproduce this issue:

1. Open the TelerikUI for WPF Demo.

2. Navigate to the RichTextBox Editor example.

3. Add a table to the document.

4. Apply a style to the table.

5. Edit the applied style.

6. Select Header Row (or anything other than Whole Table) in the Apply formatting to combo box.

7. Change the text alignment. Does not effect table.

8. Select Whole Table in the Apply formatting to combo box.

9. Change the text alignment. Does effect table. 

Am I missing something or is this, dare I say, a bug?

Aylin
Telerik team
 answered on 17 Feb 2016
7 answers
199 views
Hi. The problem is that when a tree item goes in edit mode and you click on another tree item, the edit mode goes away. But when you do so with any other control (E. G. a button), it stays. We want it to go away too, how can we achieve that?

Here's what I'm talking about.

Thanks.
Dinko | Tech Support Engineer
Telerik team
 answered on 17 Feb 2016
1 answer
272 views

Hi,

 

 I am using RadDropDownButton and RadDropDownContent has a grid with a message and RadGridView.  RadGridview has a single column which has data template that render checkboxes for the elements in list to which this column is bound to.  I get an additional space / extra column at the end of the radgridview.  When I try to remove this column by setting width of the only property to * or set columnwidth of radgridview to * as suggested in the forums,  the grid just keeps on flickering.  I seem to be missing something very simple.  Any help on removing this extra space is appreciated..

 

XAML -

 

<Window x:Class="MainWindow"
    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"
    Title="MainWindow" Height="350" Width="525">
    
    <telerik:RadDropDownButton DropDownIndicatorVisibility="Collapsed" 
                                               Height="25"
                                               Width="25"
                                               ToolTip="Configure Column Set"
                                               Padding="0"  
                                               HorizontalContentAlignment="Left" 
                                               Margin="0,0,6,0"
                                               IsOpen="{Binding IsDropDownContentOpen, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                               Command="{Binding ConfigureColumnSetCommand}">

       
        <telerik:RadDropDownButton.DropDownContent>

            <Grid Margin="10">

                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>

                <!-- Configure Column Set Text-->
                <TextBlock x:Name="txtConfigColumnSetMsg"
                                               Text="Select columns to be visible in grid" />


                <!-- Configure Column Set Grid -->
                <telerik:RadGridView x:Name="grdConfigureColumnSet"
                                                         ItemsSource="{Binding ColumnSet,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                                         Grid.Row="1"
                                                         ShowGroupPanel="False"
                                                         ShowInsertRow="False"
                                                         CanUserDeleteRows="False"
                                                         CanUserFreezeColumns="False"
                                                         RowIndicatorVisibility="Collapsed"
                                                         AutoGenerateColumns="False"
                                                         SelectionMode="Single"
                                                         AutomationProperties.AutomationId="grdConfigureColumnSet"
                                                         ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                                                         ScrollViewer.IsDeferredScrollingEnabled="False"
                                                         ScrollViewer.CanContentScroll="False"
                                                         CanUserReorderColumns="False"
                                                         CanUserSortColumns="False"
                                                         CanUserSortGroups="False"
                                                         IsFilteringAllowed="False" >

                    <telerik:RadGridView.Columns>

                        <telerik:GridViewDataColumn  
                                                     IsReadOnly="True"
                                                     DataMemberBinding="{Binding IsSelected,UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                                                     Width="*">

                           
                            <telerik:GridViewDataColumn.CellTemplate>
                                <DataTemplate>
                                    <CheckBox IsChecked="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger= PropertyChanged}"
                                                                  Content="{Binding Name}" />
                                </DataTemplate>
                            </telerik:GridViewDataColumn.CellTemplate>
                        </telerik:GridViewDataColumn>
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>

               
            </Grid>
        </telerik:RadDropDownButton.DropDownContent>

    </telerik:RadDropDownButton>
</Window>

 

Code behind -

 Class MainWindow

    Public Sub New()

        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.
        Me.DataContext = New MyViewModel
    End Sub

End Class

Public Class MyViewModel

    Public Sub New()

        ColumnSet.Add(New ColumnItem With {.Name = "Col1", .IsSelected = False})


    End Sub

    Public Property ColumnSet As New List(Of ColumnItem)

End Class

Public Class ColumnItem

    Public Property Name As String

    Public Property IsSelected As Boolean

End Class

 

 

 

Regards,

Sreeni.

Stefan
Telerik team
 answered on 17 Feb 2016
2 answers
122 views

Hi,

I am using RadCartesianChart and I am having logarithmic axis, but as it is to expect I have a lot of space from 125 to 250 for instance and little space from 8000 to 10000. I am wondering if I can customize the intervals visually, like on a grid where you adjust the column width.

I attached a screenshot of how it looks like right now

 

Thanks!

Petar Marchev
Telerik team
 answered on 17 Feb 2016
2 answers
266 views

Hi telerik,

We are plotting ScatterlineSeries on a RadCartesianChart. Works well.

However, as we plot several series in same chart, our users request a tooltip with differents units. For example I got the TooltipTemplate following:

<DataTemplate x:Key="MomentTooltipTemplate">
    <Grid Height="56" Width="150" SnapsToDevicePixels="True">
        <Path Data="M0,0 L128.99968,3.4450557E-14 128.99968,36.850185 11,36.850185 8,40 5,36.850185 0,36.850185 z"
    Stretch="Fill"
    Fill="{Binding Presenter, Converter={StaticResource PaletteExtractorConverter}}"
    Stroke="White"
    StrokeThickness="1"
    SnapsToDevicePixels="True" HorizontalAlignment="Center" Width="150" />
        <Grid Margin="5,3,5,9" Height="45" SnapsToDevicePixels="True">
            <Grid.RowDefinitions>
                <RowDefinition Height="15" />
                <RowDefinition Height="15" />
                <RowDefinition Height="15" />
            </Grid.RowDefinitions>
            <TextBlock Text="{Binding DataItem.SeriesName}" Foreground="White" FontFamily="Segoe UI" FontSize="11" VerticalAlignment="Center" Margin="0" />
            <TextBlock Text="{Binding DataItem.Y, ConverterCulture=fr-FR, StringFormat=Load: \{0:N2\} kN.m}" Foreground="White" FontFamily="Segoe UI" FontSize="11" Margin="0" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left" />
            <TextBlock Text="{Binding DataItem.X, StringFormat=Distance: \{0:N2\} m}" Foreground="White" FontFamily="Segoe UI" FontSize="11" Margin="0" VerticalAlignment="Center" Grid.Row="2" />
        </Grid>
    </Grid>
</DataTemplate>

 

and the second one : 

<DataTemplate x:Key="AnnotationTemplate" DataType="telerik:DataPoint">
                <Grid Height="56" Width="111" SnapsToDevicePixels="True">
                    <Path Data="M0,0 L110,0 110,36.850185 11,36.850185 8,40 5,36.850185 0,36.850185 z"
                Stretch="Fill"
                Fill="{Binding Presenter, Converter={StaticResource PaletteExtractorConverter}}"
                Stroke="White"
                StrokeThickness="1"
                SnapsToDevicePixels="True" />
                    <Grid Margin="4,2,5,10" Width="100" Height="45" SnapsToDevicePixels="True">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="15" />
                            <RowDefinition Height="15" />
                            <RowDefinition Height="15" />
                        </Grid.RowDefinitions>
                        <TextBlock Text="{Binding DataItem.SeriesName}" Foreground="White" FontFamily="Segoe UI" FontSize="11" VerticalAlignment="Center" Margin="0" />
                        <TextBlock Text="{Binding DataItem.Y, StringFormat=Load: \{0:N2\} kg}" Foreground="White" FontFamily="Segoe UI" FontSize="11" Margin="0" Grid.Row="1" VerticalAlignment="Center" />
                        <TextBlock Text="{Binding DataItem.X, StringFormat=Distance: \{0:N2\} m}" Foreground="White" FontFamily="Segoe UI" FontSize="11" Margin="0" VerticalAlignment="Center" Grid.Row="2" />
                    </Grid>
                </Grid>
            </DataTemplate>

 

x axes is the same for all series, but not y axes, for some series y-axe is kg and for some other it's kN.m. See attached files to see what I had and what i'd like.

Is it possible to do that with telerik or not ?

Thanks

 Regards

JC
Top achievements
Rank 1
 answered on 17 Feb 2016
1 answer
86 views

I have a LogarithmicAxis that has a minimum of 125 and maximum of 16000 but I need it to start at 0 and then go to 125,250... But as it is Logarithmic, if I put minimum to 0 I will have 0, 2,4...

How can I achieve this?

Petar Marchev
Telerik team
 answered on 17 Feb 2016
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?