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

I have a window with one or more charts, sometimes i need the window to be in a small size so the charts have also a small size and the value labels are overlaped as you can see in the first image (overlaped.png).
I saw in another post that there is a property called IntelligentLabelsEnabled for Reporting controls, is there something similar in WPF? Or is there a way to accomplish this?

In the same project when I increase the size of the window the chart also look larger but value labels and axis labels remain the same size, is there a way to resize not only the chart but also the labels?

Finally I would like to know if there is a way to change the color of value labes, axis labels and axis lines, is it possible?

(chart1.png)

I am creating the bar series dynamically in the code behind.

Thanks in advance.

Alberto
Yavor
Telerik team
 answered on 13 Nov 2013
1 answer
171 views
The spacing of "RadCartesianChart" and label is too large(i.e  the attachment)

Can I decrease the spacing  behind C#?

Evgenia
Telerik team
 answered on 13 Nov 2013
3 answers
472 views
Since MultiBinding is not supported directly on GridViewDataColumns, I have the following:
<telerik:RadGridView ItemsSource="{Binding TestGridData}" Height="150" Margin="5" AutoGenerateColumns="False" ShowGroupPanel="False">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn Header="StringValue">
            <telerik:GridViewDataColumn.CellTemplate>
                <DataTemplate >
                    <TextBlock>
                        <TextBlock.Text>
                            <MultiBinding Converter="{view:TestConverter}">
                                <Binding Path="StringValue"/>
                                <Binding Path="IntValue"/>
                            </MultiBinding>
                        </TextBlock.Text>
                    </TextBlock>
                </DataTemplate>
            </telerik:GridViewDataColumn.CellTemplate>
        </telerik:GridViewDataColumn>
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

This works absolutely fine but I have to cater for the converter being called more times than I'd expect when editing the underlying collection. If I have 5 rows of data then the converter is called 10 times. The last 5 times are for the 5 rows of data but the first 5 times are for 5 sets of DependencyProperty.UnsetValue being passed into the converter.

Looking at the callstack, this seems to be caused by a call to ClearRow in the GridViewRowItem which is eventually hit as part of the ItemsSourceChanged event.

Can anyone explain why the grid needs to clear every row before assigning the new value? This doesn't happen with a non-multi binding, the converter is only called 5 times after an edit. Is it something to do with the fact that I'm using a CellTemplate?

Cheers! :)
Pete
Top achievements
Rank 1
 answered on 12 Nov 2013
4 answers
127 views
I just added a RadDataForm (as a UserControl) to my project for the first time. In the VS designer, everything looks fine. However, when the UserControl is instantiated (via a XAML DataTemplate), I receive the following exception:
System.Windows.Markup.XamlParseException - "Provide value on 'System.Windows.Markup.StaticResourceHolder' threw an exception."
 
with an InnerException of:
 
"Cannot find resource named 'DataForm_HeaderOuterBorder'. Resource names are case sensitive."


Any thoughts on what I'm missing would be appreciated.

Jeff
Jeff
Top achievements
Rank 1
 answered on 12 Nov 2013
0 answers
117 views
I am using RadGridview with RadEntityFrameworkDataSource and following MVVM pattern in a Project.
I have checked the example code in demo, and I am able to load data from entityframework.
My requirement is, the grid data to be loaded on a button click and also the grid needs to be editable with changes to be updated in table on a button click.

I know that it is possible with normal pattern, but please let me know how can it be achieved using MVVM pattern.

Regards,
Reyas Mohammed
Reyas
Top achievements
Rank 2
 asked on 12 Nov 2013
1 answer
78 views

Hi,

I need to restrict the floating windows to drop on Tabs.
I tried the "CanDropOnTabStrip" property, but its showing error.
Kindly let me know the solution to fix the problem.

screen shot attached for your reference.



Regards
Naveendiran
Kalin
Telerik team
 answered on 12 Nov 2013
1 answer
111 views
In my application I have a scenario where the user has one window open with the PDF Viewer control and they are looking at a pdf file then my application displays a modal dialog.  The user needs to be able to still scroll up/down in the PDF Viewer while this modal dialog is open.  I have given them some shortcut keys to scroll a page at a time (ctrl + pg up & ctrl + pg down) and then I send these commands to the control on the other window from the modal window.  This works for scrolling by a page but a lot of the time they just need to scroll a few lines.  Is there any API for the PDFViewer control that will allow me to send a command to scroll up or down a few lines?

Any help on this would be greatly appreciated!!!

Thanks in advance,
Lee
Alexander
Telerik team
 answered on 12 Nov 2013
1 answer
314 views
Hi,

How do you merge table cells programmatically?

I'm creating a table via code as customer merge field, but I need to merge my header row with with all cells within the same row so that is spans multiple columns.

I'm using library version 2013.1.220.40.

Here's my code thus far (Sorry it's quite long):

Table table = new Table();
 
//Payment Details Title **
Span spanPaymentDetails = new Span("Payment Details");
spanPaymentDetails.StyleName = "styleTableTitle14";
Paragraph paragraphPaymentDetails = new Paragraph();
paragraphPaymentDetails.Inlines.Add(spanPaymentDetails);
 
TableCell cellPaymentDetails = new TableCell();
cellPaymentDetails.Background = Colors.LightGray;
cellPaymentDetails.Blocks.Add(paragraphPaymentDetails);
 
 
//BACS
Span spanBACS = new Span("BACS:");
spanBACS.StyleName = "styleTableContent14";
spanBACS.FontStyle = FontStyles.Italic;
Paragraph paragraphBACS = new Paragraph();
paragraphBACS.Inlines.Add(spanBACS);
 
TableCell cellBACS = new TableCell();
cellBACS.Background = Colors.LightGray;
cellBACS.Blocks.Add(paragraphBACS);
 
 
//Bank
Span spanBankTitle = new Span("Bank: ");
spanBankTitle.StyleName = "styleTableContent14";
spanBankTitle.FontStyle = FontStyles.Italic;
Span spanBankDetail = new Span("HSBC");
spanBankDetail.StyleName = "styleTableContent14";
Paragraph paragraphBank = new Paragraph();
paragraphBank.Inlines.Add(spanBankTitle);
paragraphBank.Inlines.Add(spanBankDetail);
 
TableCell cellBank = new TableCell();
cellBank.Background = Colors.Transparent;
cellBank.Blocks.Add(paragraphBank);
 
 
//Account Name
Span spanAccountNameTitle = new Span("Account Name: ");
spanAccountNameTitle.StyleName = "styleTableContent14";
spanAccountNameTitle.FontStyle = FontStyles.Italic;
Span spanAccountNameDetail = new Span("My Company Name");
spanAccountNameDetail.StyleName = "styleTableContent14";
Paragraph paragraphAccountName = new Paragraph();
paragraphAccountName.Inlines.Add(spanAccountNameTitle);
paragraphAccountName.Inlines.Add(spanAccountNameDetail);
 
TableCell cellAccountName = new TableCell();
cellAccountName.Background = Colors.LightGray;
cellAccountName.Blocks.Add(paragraphAccountName);
 
 
//Sort Code
Span spanSortCodeTitle = new Span("Sort Code: ");
spanSortCodeTitle.StyleName = "styleTableContent14";
spanSortCodeTitle.FontStyle = FontStyles.Italic;
Span spanSortCodeDetail = new Span("22-11-33");
spanSortCodeDetail.StyleName = "styleTableContent14";
Paragraph paragraphSortCode = new Paragraph();
paragraphSortCode.Inlines.Add(spanSortCodeTitle);
paragraphSortCode.Inlines.Add(spanSortCodeDetail);
 
TableCell cellSortCode = new TableCell();
cellSortCode.Background = Colors.LightGray;
cellSortCode.Blocks.Add(paragraphSortCode);
 
 
//Account No.
Span spanAccountNoTitle = new Span("Account No. ");
spanAccountNoTitle.StyleName = "styleTableContent14";
spanAccountNoTitle.FontStyle = FontStyles.Italic;
Span spanAccountNoDetail = new Span("xxxx xxxx");
spanAccountNoDetail.StyleName = "styleTableContent14";
Paragraph paragraphAccountNo = new Paragraph();
paragraphAccountNo.Inlines.Add(spanAccountNoTitle);
paragraphAccountNo.Inlines.Add(spanAccountNoDetail);
 
TableCell cellAccountNo = new TableCell();
cellAccountNo.Background = Colors.LightGray;
cellAccountNo.Blocks.Add(paragraphAccountNo);
 
 
 
//Cheque
Span spanCheque = new Span("Cheque:");
spanCheque.StyleName = "styleTableContent14";
Paragraph paragraphCheque = new Paragraph();
paragraphCheque.Inlines.Add(spanCheque);
 
TableCell cellCheque = new TableCell();
cellCheque.Background = Colors.LightGray;
cellCheque.Blocks.Add(paragraphCheque);
 
 
//Cheque Made Payable To
Span spanChequeMadePayableTo = new Span("Made Payable To:");
spanChequeMadePayableTo.StyleName = "styleTableContent14";
Paragraph paragraphChequeMadePayableTo = new Paragraph();
paragraphChequeMadePayableTo.Inlines.Add(spanChequeMadePayableTo);
 
TableCell cellChequeMadePayableTo = new TableCell();
cellChequeMadePayableTo.Background = Colors.LightGray;
cellChequeMadePayableTo.Blocks.Add(paragraphChequeMadePayableTo);
 
 
//Cheque Details
Span spanChequeDetail = new Span("My Company Name");
spanChequeDetail.StyleName = "styleTableContent14";
Paragraph paragraphChequeDetail = new Paragraph();
paragraphChequeDetail.Inlines.Add(spanChequeDetail);
 
TableCell cellChequeDetail = new TableCell();
cellChequeDetail.Background = Colors.LightGray;
cellChequeDetail.Blocks.Add(paragraphChequeDetail);
 
 
 
 
//Add Cells To Table Row
TableRow rowTitle = new TableRow();
rowTitle.Cells.Add(cellPaymentDetails);
table.AddRow(rowTitle);
 
 
TableRow rowDetails = new TableRow();
rowDetails.Cells.Add(cellBACS);
rowDetails.Cells.Add(cellBank);
rowDetails.Cells.Add(cellAccountName);
rowDetails.Cells.Add(cellCheque);
rowDetails.Cells.Add(cellChequeMadePayableTo);
table.AddRow(rowDetails);
 
TableRow rowDetails2 = new TableRow();
rowDetails2.Cells.Add(new TableCell());
rowDetails2.Cells.Add(cellSortCode);
rowDetails2.Cells.Add(cellAccountNo);
rowDetails2.Cells.Add(new TableCell());
rowDetails2.Cells.Add(cellChequeDetail);
table.AddRow(rowDetails2);
 
//Change Cell Padding
table.CellPadding = new Padding(5, 3, 5, 3);
 
//Create Document & Apply Styles
RadDocument document = new RadDocument();
RadDocumentStyles.AddStylesToDocumentRepository(document);
 
Section section = new Section();
 
//Add Empty Paragraph
Paragraph paragraph = new Paragraph();
paragraph.StyleName = "paragraphMailMergeTable";
section.Blocks.Add(paragraph);
 
//Add Table
section.Blocks.Add(table);
 
//Add Empty Paragraph
Paragraph paragraph1 = new Paragraph();
paragraph1.StyleName = "paragraphMailMergeTable";
section.Blocks.Add(paragraph1);
 
//Add Section To Document
document.Sections.Add(section);
 
document.MeasureAndArrangeInDefaultSize();
 
return new DocumentFragment(document);


Thanks,

Rob

Robert
Top achievements
Rank 1
 answered on 12 Nov 2013
2 answers
133 views
Hi,

What's the best method to determine the current page number at the caret position or even a specified position?

I'm using library version 2013.1.220.40.

Thanks,

Rob
Robert
Top achievements
Rank 1
 answered on 12 Nov 2013
15 answers
906 views
Hi everyone,

I am developing a WPF application in which I use RadControls including RadDocking.
I want to execute code when a RadPane becomes docked or floating.
Is an event raised when a RadPane becomes docked or floating ?

Thank you in advance for your help
Pascal GUERY
Top achievements
Rank 1
 answered on 12 Nov 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?