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

There is a new command called "ShowInsertTableOfContentsDialog" but we must give arguments and there is no documentation that show wich kind of arguments is needed.

Thanks a lot.
Patrick
Top achievements
Rank 2
 answered on 02 Jul 2012
1 answer
529 views
Hello,
I've created a mail merge application as per he example on your website.

The Word document is loaded in, and the docprovider is set. I then insert images fine using insert>picture and they show up in the document. Everything appears fine form within the program. 


When I send the emails however, the pictures don't show up. From within Outlook I get an error that reads:

 "the linked image cannot be displayed. The file may have been moved, renamed, or deleted. Verify that the link points to the correct file and location."

 I've attached a screenshot of exactly how I'm inserting the image into the document. Below is the code I use when I send the emails. Also noteworthy, I had to change the formatprovider from docx to rtf before sending the emails. If I use the docxformatprovider, the text in the email shows up with a bunch of symbols, improperly formatted. 

Here's DocOpened event I use when opening and loading the word doc:
try
{
    OpenFileDialog fDialog = (OpenFileDialog)sender;
     
    switch (System.IO.Path.GetExtension(fDialog.FileName))
    {
        case ".docx":
            docProvider = new DocxFormatProvider();
            break;
        case ".rtf":
            docProvider = new RtfFormatProvider();
            break;
        case ".txt":
            docProvider = new TxtFormatProvider();
            break;
        case ".html":
            docProvider = new HtmlFormatProvider();
            break;
        default:
            break;
    }
     
    using (FileStream fStream = new FileStream(fDialog.FileName, FileMode.OpenOrCreate, FileAccess.ReadWrite))
    {
        rDoc = docProvider.Import(fStream);
    }
   
    rDoc.LayoutMode = DocumentLayoutMode.Paged;
    emailForm1.Document = rDoc;
}

 ...and then when sending the emails I use this. 
protected void SubmitEmail(object sender, RoutedEventArgs e)
{
    MailMessage message = new MailMessage();
    byte[] emailBytes = null;
    string bodyText = string.Empty;
     
    SmtpClient mailServer = new SmtpClient("mail.pentegra.com");
    mailServer.UseDefaultCredentials = true;
     
    this.emailForm1.Document.MailMergeDataSource.ItemsSource = mergeFields;
    //here's where I change the formatprovider from docx to rtf. if I use docx, the email text comes out as a bunch of   symbols
 
    docProvider = new RtfFormatProvider();  
 
    //this is just a datatable with a list of emails that gets iterated through to send the emails. 
    for (int i = 0; i < _dtMerge.Rows.Count; i++)
    {
        message = new MailMessage();
        foreach (string s in lstAttachments)
        {
            message.Attachments.Add(new Attachment(s));
        }
        message.From = _fromAddress;
        emailForm1.Document.MailMergeDataSource.MoveToIndex(i);
        emailBytes = docProvider.Export(emailForm1.Document.MailMergeCurrentRecord());
 
        //I convert the byte array into the email body test here.
        StringBuilder sb = new StringBuilder();
        using (StreamReader sReader = new StreamReader(mStream))
         {
                    while (!(sReader.EndOfStream))
                    {
                        sb.Append(sReader.ReadLine() + Environment.NewLine);
                    }
          }
         bodyText = sb.ToString();
        message.AlternateViews.Add(AlternateView.CreateAlternateViewFromString(bodyText, null, "text/html"));
         
        message.To.Clear();
        message.To.Add(new MailAddress("x@xx.com"));
 
       mailServer.Send(message);
 
         
}



Everything shows up fine in the emails except the image. 
Martin Ivanov
Telerik team
 answered on 02 Jul 2012
0 answers
175 views
It appears the default behavior when selecting a time is by mouse click only. Can I select via enter key?  
I have the following requirement:

- the time picker control shall enable selection of time by pressing Enter key

Before I start intercepting key press events etc., I just want to make sure there are not setter properties I could be unaware of which would enable this behavior.

Thanks in advance.
Pete
Top achievements
Rank 1
 asked on 02 Jul 2012
2 answers
483 views
Few users are having our WPF telerik application  running very slow. This is when its loads and switch between tabs etc. All tabs have radgrids. It just says not responding and hangs.
But it works very welll on others. 
Do you have any clue?
Mike
Top achievements
Rank 1
 answered on 02 Jul 2012
3 answers
210 views
Hi,
How to Create Style for RadTileView like this picture.
Zarko
Telerik team
 answered on 02 Jul 2012
1 answer
135 views
We are looking to change our charting products and I chose to use the ChartView over the older RadChart for the speed and the better customization options, but I am finding some things missing. The big thing is I need a chart with linear X & Y axis, smoothing (spline type is typically what I would use), and ability for marked zones. I have read several other posts concerning some of these and saying they would be available in the upcoming release (Q2 2012), but I am unable to find these.

Am I missing something or are these features not yet implemented?

Also, I watched the webinar over Q2 2012 Xaml controls and saw a mention of new RadChartView features, but I heard nothing about them. Is there any updated documentation with whats new in RadChartView for Q2 2012.

Thanks for your help and continue the good work,
Ryan
Giuseppe
Telerik team
 answered on 02 Jul 2012
7 answers
266 views
We are trying to bind a collection of items to a set of RadDocumentPanes through the ItemsSource & SelectedItem properties on the RadPaneGroup control. Unfortunately we were unable to create viable documents in this manner, and had to create a custom converter to return our items wrapped as RadDocumentPanes. Is this a limitation of the Rad control or is there a better way to do this? 
George
Telerik team
 answered on 02 Jul 2012
4 answers
156 views
In the attached file it shows the original Windows control bar (that has the minimize, maximize, close) still remains on the RadRibbonView.  Also, there is a forward and back navigation bar, I'm not sure why; so, how can I remove these and place the buttons on the ApplicationName bar?  Source Code:
<telerik:RadRibbonView x:Class="Magnetek.Network.Client.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"
                       xmlns:ribbon="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.RibbonView"
                       MinHeight="100" MinWidth="200"
                       x:Name="RadRibbonWindow">  
</telerik:RadRibbonView>



Also, with Windows Ribbon control I can start my window in a certain position using:

WindowStartupLocation="CenterScreen"

Is there a way to set the startup location and start the application maximized?
Viktor Tsvetkov
Telerik team
 answered on 02 Jul 2012
8 answers
168 views
Hello!

In our WPF project, we have a UserControl with a RadGridView to display persons. We decided to use the EntityFrameworkDataSource because it is easy to implement and offers a lot of advantages.

We implement the Entity Data Source and everything is working except one thing. When we click on the Menu to call the UserControl, a delay is occuring. the UserControl takes 5~10 seconds to appear, and when it appear the RadGridView is already loaded with the data.

If i remove the lines of the DataSource, the UserControl loads fast with 2 seconds. The Gridview only has 20 itens, i'm afraid that when the data begins to grow this delay became worse, it will impact a lot for the client.

Can you help me solving this? It is hard to explain with words, if you not understand the problem let me know and i try to make a video.

Thanks!
Dimitrina
Telerik team
 answered on 02 Jul 2012
8 answers
196 views
Hi,

Is there a good way to couple the TimeBar with GanttView, so that the selection of a timebar selection modifies whats shown on the gantt chart?

Thanks,

Eric
Tsvetie
Telerik team
 answered on 02 Jul 2012
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?