Telerik Forums
UI for WPF Forum
1 answer
683 views

Hi,

 I am trying integrating a rad PDFViewer which show a pdf generated in a Stream to print it, at first, i would like to show the pdf document with a scalefactor of 0.5 and give the user the possibility to increase or decrease the zoom. In way to perform that, i added a RadSlider and bound the scalefactor of the pdf viewer with the value of the rad slider like show the code below (The problem i encounter is that the scalefactor is initially set to 1, however the pdf viewer width allow to show the 0.5 scale value) : 

<telerik:RadPdfViewer x:Name="pdfViewer"
                      Grid.Row="1"
                      Width="450"
                      DocumentSource="{Binding Document,
                                               Mode=TwoWay}"
                      ScaleFactor="{Binding ElementName=ZoomSlider,
                                            Path=Value,
                                            Mode=TwoWay,
                                            UpdateSourceTrigger=PropertyChanged}"
                      ScaleMode="FitToWidth"
                      ScrollViewer.VerticalScrollBarVisibility="Auto" />

Then the code of the RadSlider:

<telerik:RadSlider x:Name="ZoomSlider"
                   Grid.Column="0"
                   Width="300"
                   HorizontalAlignment="Center"
                   HandlesVisibility="Visible"
                   Maximum="1.5"
                   Value="0.5"
                   Minimum="0"
                   TickFrequency="0.25"
                   TickPlacement="TopLeft">
    <telerik:RadSlider.TickTemplate>
        <DataTemplate>
            <Grid>
                <TextBlock Text="{Binding}" />
            </Grid>
        </DataTemplate>
    </telerik:RadSlider.TickTemplate>
</telerik:RadSlider>

 
Nikolay Demirev
Telerik team
 answered on 10 Sep 2015
2 answers
191 views

 

The simple Rad controls can be processed by System.Windows.Markup.XamlWriter correctly, but when process the RadRichTextBox, "stackoverflow" occured.

I have made the following test:

1.Create a buttton and a normal RichTextBox with name "richTextBox"

2.Write the following codes in the click event of the button

            string data = System.Windows.Markup.XamlWriter.Save(richTextBox.Document);
            FileStream fs = new FileStream("C:/TEST.XAML", FileMode.Create);
            StreamWriter sw = new StreamWriter(fs);
            sw.WriteLine(data);
            sw.Close();
            fs.Close();

3.Add the Telerik InlineContainer in to richtextbox and click the button to save the flowdocument into xaml file.

      For the simple controls like Radbutton or RadMaskedTextInput , it's okay:

           Add the following codes in desgine screen:

                     <InlineUIContainer>
                        <telerik:RadMaskedTextInput TextMode="PlainText"  />
                    </InlineUIContainer>

           Got the result:

              <FlowDocument PagePadding="5,0,5,0" AllowDrop="True" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"><Paragraph><telerik:RadMaskedTextInput Value="asdaasdasd" OriginalValue="{x:Null}" SelectionLength="0" SelectionStart="10" Text="asdaasdasd" TextMode="PlainText" IsEmpty="False" HasErrors="False"><telerik:RadMaskedTextInput.CopyCommand><telerik:DelegateCommand /></telerik:RadMaskedTextInput.CopyCommand><telerik:RadMaskedTextInput.ClearCommand><telerik:DelegateCommand /></telerik:RadMaskedTextInput.ClearCommand><telerik:RadMaskedTextInput.CutCommand><telerik:DelegateCommand /></telerik:RadMaskedTextInput.CutCommand><telerik:RadMaskedTextInput.PasteCommand><telerik:DelegateCommand /></telerik:RadMaskedTextInput.PasteCommand></telerik:RadMaskedTextInput></Paragraph></FlowDocument>

 

        Then, for the RadRichTextBox,  it can be shown in RichTextBox correctly.

                    <InlineUIContainer>
                        <telerik:RadRichTextBox x:Name="radRichTextBox" Height="100" Width="120" />
                    </InlineUIContainer>

         But  it failed to saved as xaml with "System.StackOverflowException" 

         Is there any workaround?

         (I used to insert RadRichTextBox into RadRichTextBox, but it also has the cursor problem as my another thread "Cursor Focus problem of TextBox in RadRichTextBox".....)

        

Ruyu
Top achievements
Rank 1
 answered on 10 Sep 2015
2 answers
247 views

Hey guys,

Is there anyway to have a move grip/handle to move the shape instead/beside moving by dragging the shape itself ?

 

Like the attached image.

 

 I have a scenario which I there are shapes with semi transparent content over each other so I don't ant to change the z order index but I have a listbox that contains the name of the shapes so when user select the an item  it selects the shape which is not the top most shape. What I want to do is to have a move grip/handle to allow the user move the shape in the designer area by dragging the grip handle without messing with selecting other shapes. It would be exactly similar with what existing rotation grip behaves.

The reason why I am asking this is because currently if the user click inside the designer area to drag the selected shape which is not the most top the diagram tries to select the top most but I don't want the selection changes but I want the user be able to drag the selected shape which is already selected and it is not the top most shape. 

 

Bruno
Top achievements
Rank 1
 answered on 09 Sep 2015
8 answers
178 views

Hi, I have a question about preparing a RadDocument for export to PDF. I'm creating a RadDocument object and setting its properties programmatically and when it is exported to a pdf file it doesn't have outer margins and text that is set to be aligned to center is not centered.
Exporting to Word document file is OK and when a RadDocument is created by importing the docx file and then exported to pdf the formating is consistent with the word file as expected. What propery might be not set correctly thus causing this behaviour?

Thanks.

Tanya
Telerik team
 answered on 09 Sep 2015
2 answers
357 views

Hello there,

 

In the RadGridView, when the grid is grouped by a column, each group header row has an arrow icon on the left hand side pointing up or down to indicate whether the group is expanded or not.  Is it possible to change that icon to a custom icon?

 

Thanks

Russell

Russell
Top achievements
Rank 1
 answered on 09 Sep 2015
2 answers
147 views
On Gridview, I have a request to make the grid scroll more rows when using the mouse wheel then it is doing now.  I have looked up things like SystemInformation.MouseWheelScrollLines property.  So is there an easier way to make the mouse wheel go through rows faster when using the mouse wheel?  
Stefan
Telerik team
 answered on 09 Sep 2015
2 answers
433 views

I attached a small project illustrating a problem. I have combo boxes and text boxes on the control. When I do not apply any properties on my components and start the application my tab order is perfectly fine. I hit tab and it goes to first combo cox then to cext etc. Exactly the way tab index is set up. But as soon as I add property IsEditable="true" to my combo box it messes it up. When I start application it omits combo box and it goes straight to text box, then it omits another combo box and it goes again straight to text box. Please advice how to fix this tab problem issue. I want to have this editable and have tab index going top down and left right.

Second question. I applied style with ThemeType=telerikControls:Windows8Theme how can I have yellow rectangle around the focused combo box this theme gives gray one which is very hard to recognize.

 <Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:TestTelerikTabStop"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="TestTelerikTabStop.MainWindow"
    xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <!-- Please comment in and out IsEditable property to see effect on tabindex
             Please help yelow rectangle on focused combobox in Windows8Theme theme
        -->
        <Style x:Key="RadComboBoxStyle" BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerikControls:Windows8Theme, ElementType=telerik:RadComboBox}}" TargetType="telerik:RadComboBox">
            <Setter Property="Height" Value="23" />
            <Setter Property="FontFamily" Value="Calibri"/>
            <Setter Property="ClearSelectionButtonContent" Value="Clear"/>
            <Setter Property="ClearSelectionButtonVisibility" Value="Visible"/>
            <Setter Property="IsEditable" Value="True"/>    
            <Setter Property="IsReadOnly" Value="True"/>
            <Setter Property="Focusable" Value="True"/>
        </Style>
    </Window.Resources>
    <DockPanel DockPanel.Dock="Top">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" MinWidth="265"/>
                <ColumnDefinition Width="Auto" MinWidth="517"/>
                <ColumnDefinition Width="Auto" MinWidth="517"/>
            </Grid.ColumnDefinitions>

            <telerik:RadComboBox x:Name="radComboBox" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" TabIndex="0" IsTabStop="True"  Style="{StaticResource RadComboBoxStyle}" Width="131">
                <telerik:RadComboBoxItem Content="Adam"/>
                <telerik:RadComboBoxItem Content="Alex"/>
                <telerik:RadComboBoxItem Content="Andrew"/>
            </telerik:RadComboBox>
            <telerik:RadComboBox x:Name="radComboBox1" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Left" TabIndex="2" IsTabStop="True" Style="{StaticResource RadComboBoxStyle}" Margin="0,1" Width="131">
            </telerik:RadComboBox>
            <telerik:RadComboBox x:Name="radComboBox2" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Left" TabIndex="3" IsTabStop="True" Style="{StaticResource RadComboBoxStyle}" Width="143">
            </telerik:RadComboBox>
            <telerik:RadComboBox x:Name="radComboBox3"  Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" TabIndex="5" IsTabStop="True" Style="{StaticResource RadComboBoxStyle}" Margin="0,1" Width="143">
            </telerik:RadComboBox>
            <TextBox  Grid.Row="1" Grid.Column="0" Margin="0,0,134,0" TabIndex="1"/>
            <TextBox  Grid.Row="1" Grid.Column="1" Margin="0,0,374,0" TabIndex="4"/>

        </Grid>
    </DockPanel>
</Window>

Will
Top achievements
Rank 1
 answered on 09 Sep 2015
3 answers
100 views

Hi,

When i select "automatic conversion" for minor tick lenght and major tick lenght, and if i put a large zoom, i have this problem (Attach file).

This is normal?

How can i just put 6:00/6:15/6:30/6:45 instead of 6:00/6:1515/6:3030/6:4545?

 Thanks

Nasko
Telerik team
 answered on 09 Sep 2015
3 answers
94 views

Hi

I would like to ask if there is an easy solution to create a grid on the x-axis of a datecontinuous axis.

e.g. every x second/minute/hour depending on the total timespan shown in the chart there will be a tick/grid line. independent if there exist a value for that specific datetime

 thanks for your help!

 

Petar Marchev
Telerik team
 answered on 09 Sep 2015
6 answers
126 views

Hi

I need to drag and drop from / to  GridViewColumnGroup of RadGridView.

I haven't found any example or guide how to do it.

Setting up DragDropManager events (like DragInitializeHandler, DropHandler ... ) to RadGridView doesn't work on GridViewColumnGroup.

Drag and drop from / to GridViewCells and GridViewHeaderCells works, but GridViewColumnGroup doesn't.

Does anyone know how to drag and drop from / to GridViewColumnGroup?

Yoan
Telerik team
 answered on 09 Sep 2015
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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
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
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?