Telerik Forums
UI for WPF Forum
3 answers
244 views
Hi,

I am trying to use RadRichTextBox to print envelopes.  I have defined the proper page size and it looks good on the screen.  However, when I print, the text starts at the middle of the page and gets cut off. Below is my code for the RadRichTextBox.  I use standard RadRichTextBoxRibbonUI.

Attached are 2 files: 
(1) Scanned Envelope.jpg - I printed the envelope and then scanned it.  The text gets cut off.
(2) PrintedToPdf.jpg - I printed to PDF Writer instead to printer.  Notice that the pages size seems to be incorrect.
My guess, that page size is not being set properly when printing.  Any suggestions?

<telerik:DocumentRuler Grid.Row="1">
    <telerik:RadRichTextBox x:Name="radRichTextBox" LayoutMode="Paged">
        <telerik:RadDocument>
            <telerik:Section PageOrientation="Landscape" PageMargin="25,25,25,25" PageSize="408, 912">
                <telerik:Paragraph SpacingAfter="0">
                    <telerik:Span Text="Company Name"/>                               
                </telerik:Paragraph>
                <telerik:Paragraph SpacingAfter="0">
                    <telerik:Span Text="City, Province, Postal Code"/>
                </telerik:Paragraph>
                <telerik:Paragraph>
                    <telerik:Span Text="Country"/>
                </telerik:Paragraph>
                <telerik:Paragraph/>
                <telerik:Paragraph/>
                <telerik:Paragraph TextAlignment="Center" SpacingAfter="0">
                    <telerik:Span Text="Company Name"/>
                </telerik:Paragraph>
                <telerik:Paragraph TextAlignment="Center" SpacingAfter="0">
                    <telerik:Span Text="City, Province, Postal Code"/>
                </telerik:Paragraph>
                <telerik:Paragraph TextAlignment="Center" SpacingAfter="0">
                    <telerik:Span Text="Country"/>
                </telerik:Paragraph>
            </telerik:Section>
        </telerik:RadDocument>
    </telerik:RadRichTextBox>
</telerik:DocumentRuler>
Petya
Telerik team
 answered on 22 Aug 2013
7 answers
379 views
I've successfully implemented a custom tile server map provider using the MapProviderBase abstract class.  Is there a way to turn off the client side caching?  Every time I run my application, I can see the correct tiles loading from the tile server, but they don't overwrite the old tiles stored in the client side cache. 

How to I turn this feature off? 

Thanks!
Chris
CTI
Andrey
Telerik team
 answered on 22 Aug 2013
1 answer
110 views
How do I change the RadButton visual state on the DragEnter and DragLeave events?

I have a RadPane docked left. WIthin this pane is a RadListBox and a few RadButtons. The desired behavior is that dragging a listboxitem onto a RadButton will cause the visual state of the RadButton to change on the DragEnter, similar in effect to dragging an item onto the TrashCan button on a Mac computer.

The DragEnter and DragLeave events are handled in the VB.Net code behind and are firing. The DragEnter event changes the cursor to Hand and sets the RadButton.ToolTip to some descriptive text. The DragLeave undoes this behavior. But despite event execution, the visual state does not change on the RadButton; the cursor never changes to hand and the tooltip text does not appear.

The DragVisualOffset has its x & y relative starting points set to -55 in the DragInitialize so that the drag visual state is well clear of the mouse pointer and RadButton when the DragEnter event fires.
Nick
Telerik team
 answered on 22 Aug 2013
1 answer
91 views
Hi folks,

I am trying to make heads or tails out of the changes needed to move from the old version of the DDM to the new one. 

In particular, there seem to be no samples using the new version with things like substantive changes to the DefaultFeedbackPresentation.

In the old version, there was some code hooked in that looks like...
private static UIElement CreateDefaultDropPositionFeedback()
{
    var grid = new Grid()
    {
        Height = 8,
        HorizontalAlignment = HorizontalAlignment.Stretch,
        IsHitTestVisible = false,
        VerticalAlignment = VerticalAlignment.Stretch
    };
    grid.ColumnDefinitions.Add(new ColumnDefinition()
    {
        Width = new GridLength(8)
    });
    grid.ColumnDefinitions.Add(new ColumnDefinition());
    var ellipse = new Ellipse()
    {
        ...
    };
    Grid.SetColumn(ellipse, 0);
    Grid.SetColumn(rectangle, 1);
    grid.Children.Add(ellipse);
    grid.Children.Add(rectangle);
    return grid;
}

Where would this get hooked in on the new version of the Behaviors such as the RowReorderBehavior?

Thanks,
David
Nick
Telerik team
 answered on 22 Aug 2013
1 answer
218 views
<telerik:RadDiagram x:Name="myDiagram" Grid.Row="1" IsBackgroundSurfaceVisible="False" ShapeTemplateSelector="{StaticResource ShapeTempleteSelecterr}"  IsZoomEnabled="False" ScrollViewer.VerticalScrollBarVisibility="Auto" >
            <primitives:ItemInformationAdorner.AdditionalContent>
                <telerik:SettingsPane Diagram="{Binding ElementName=myDiagram}" Template="{StaticResource SettingPaneTemplete}" />
            </primitives:ItemInformationAdorner.AdditionalContent>
        </telerik:RadDiagram>



I have written my custom template for SettingPane but I wants Partial custom. When we select the shape, the settingpane button will show and when we click on that button, settingpane window will show.

so I want only that button, and when I click on that button my custom template will show.

I had tried for that but button not shown, direct template shown.

so how to solve this problem.

 
Petar Mladenov
Telerik team
 answered on 22 Aug 2013
2 answers
170 views
HI,

I want to add the RadDiagramShape dynamically to RadDiagram control but wants to change the ContentTemplete.
<telerik:RadDiagram x:Name="myDiagram">
 
 </telerik:RadDiagram
private void btnAddNewShape_Click(object sender, System.Windows.RoutedEventArgs e)
       {
           DataTemplate templete = new DataTemplate(typeof(RadRichTextBox));
 
           this.myDiagram.AddShape(new RadDiagramShape() { });
       }


But the content editor not show RadRichTextBox, It show normal Content Property as String.


So How to add dynamically ContentTemplete of RadDiagramShape


Thanks

Sopan Vaidya
Sopan
Top achievements
Rank 1
 answered on 22 Aug 2013
3 answers
145 views
How can I lock the tile position, so maximized tiles return to their original position? I see someone created a feature request for silverlight in 2010 for the same issue, but nothing in WPF.
Tina Stancheva
Telerik team
 answered on 21 Aug 2013
1 answer
929 views
I have a  RadTreeView and I am trying to use stye triggers for disabling few nodes:
<telerikNavigation:RadTreeView  ItemTemplate="{StaticResource HierarchyItemsTreeItemTemplate}">
        <Style TargetType="telerikNavigation:RadTreeView">
            <Style.Triggers>
                <DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor,
    AncestorType=TreeViewItem}, Converter={StaticResource converter}}"
    Value="true">
                     <Setter Property="IsEnabled" Value="false"/>
                 </DataTrigger>
            </Style.Triggers>
        </Style>
    </telerikNavigation:RadTreeView >

But this gives me error: The attachable property Triggers was not found in Style.  Is there any alternate approach and Triggers are being obsolete?
Tina Stancheva
Telerik team
 answered on 21 Aug 2013
1 answer
342 views
Hi


I have a RadTreeView bound to an observable collection. The width is specified as Auto so I would expect  that the tree view should resize dynamically.

So what I am seeing is


1) First set of data is bound, with an Items whose content is long. The treeview expands to an appropriate width.
2) The data bound is changed so that all the items are a couple character. The treeview  is still the same width

I would expect the width to change in conjunction with the size of the data bound

Cheers

Arthur
Tina Stancheva
Telerik team
 answered on 21 Aug 2013
3 answers
384 views
hi 

I was added RadDatePicker to Footer with below code i want to display the default  Current date as "System.Date.Now";  but the date is not binding to that footer .

the same RadDatePicker i have in my form and i need to bind the same thing "System.Date.Now" it is binding but in footer it is not binding please help me


<TelerikGrid:GridViewDataColumn  Header="Qty1" MinWidth="100" Width="110"  TextAlignment="Right" DataMemberBinding="{Binding Qty1, Mode=TwoWay}" DataFormatString="{}{0:N2}">
                                                          <TelerikGrid:GridViewDataColumn.Footer>
                                                                <StackPanel Orientation="Vertical" Height="50" HorizontalAlignment="Left">
                                                                    <telerikInput:RadDatePicker x:Name="dt" HorizontalAlignment="Center"  SelectedValue="{Binding dat}" Margin="11,0,0,0" />
                                                                    <CheckBox  Height="16" Name="checkBox1"   IsChecked="{Binding Path=CurrentItem.InActive,Mode=TwoWay}" HorizontalAlignment="Center" />
                                                                </StackPanel>
                                                            </TelerikGrid:GridViewDataColumn.Footer>
                                                           </TelerikGrid:GridViewDataColumn>

Kalin
Telerik team
 answered on 21 Aug 2013
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
DataPager
PersistenceFramework
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?