Telerik Forums
UI for WPF Forum
1 answer
305 views

When I try to generate a PNG file Exporting RadPieChart it crash without any message. The files is generate with 0KB size. I don't need the graph in the screen I just need to export the PNG to programatically insert it in a RichTexBox.

            Telerik.Windows.Controls.RadPieChart gr1 = new Telerik.Windows.Controls.RadPieChart();
            gr1.Series.Add(new Telerik.Windows.Controls.ChartView.PieSeries());
            foreach (KeyValuePair<string, int> g in dt1)
            {
                Telerik.Charting.PieDataPoint pA = new Telerik.Charting.PieDataPoint();
                pA.Label = g.Key;
                pA.Value = g.Value;
                gr1.Series[0].DataPoints.Add(pA);
            }
            string filename1 = Path.GetTempFileName();
            using (Stream fileStream = File.Open(filename1, FileMode.OpenOrCreate))
            { Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(gr1, fileStream, new PngBitmapEncoder()); }

Any Advice will be welcome. Thanks in advance.

 

Stenly
Telerik team
 answered on 21 Jul 2021
0 answers
145 views

Hi, 

Is there a way to resolve this type of issue? The data are homogeneous.

Thanks and regards, 

Simone
Top achievements
Rank 1
 asked on 21 Jul 2021
2 answers
426 views

I am using data table for populating data through Radgridview control instead of direct collection and facing some issue with this control which is not able to get all the cell value from this control. In my project is using through code behind.
Current Telerik version : v4. 0. 30319

Thanks & Regards

Murugansilvers

Stenly
Telerik team
 answered on 20 Jul 2021
1 answer
402 views

We use long time RadGridView with ItemsSource  as  System.Data.DataTable.DefaultView

In newest update 2021.2.615 column names with Case sensitive difference (orig. [reg_dat]) make Binding error

 

<telerik:GridViewDataColumn Header="Reg.date"   DataMemberBinding="{Binding [Reg_dat]}" />

 

Cannot obtain IDataErrorInfo.Error[[Reg_dat]] from source of type System.Data.DataRowView - System.ArgumentException 'Column '[Reg_dat]' does not belong to table .' BindingExpression:Path=[Reg_dat]; DataItem='DataRowView' (HashCode=51788984); target element is 'GridViewCell' (Name=''); target property is 'ValueChangedListener' (type 'Object')

 

It is Telerik mistake?

Dinko | Tech Support Engineer
Telerik team
 answered on 20 Jul 2021
1 answer
213 views

Hi,

 

I want to set to one RadGridView's vertical scrollbar normal mode.

Something like that but targeting to only one scrollbar.

FluentPalette.Palette.ScrollBarsMode = Telerik.Windows.Controls.Theming.ScrollViewerScrollBarsMode.Normal;

How can I achieve that? Is that possible?

 

Regards!


 

Stenly
Telerik team
 answered on 19 Jul 2021
1 answer
433 views

I am receiving following error when opening specific pdf document. 

I followed article Value cannot be null. Parameter name - Pages But this article belongs to parameter 'pages' instead 'page'


System.ArgumentNullException: Value cannot be null. (Parameter 'page')
   at Telerik.Windows.Documents.Utilities.Guard.ThrowExceptionIfNull[T](T param, String paramName)
   at Telerik.Windows.Documents.Fixed.Text.TextPosition..ctor(TextPage page, Int32 index)
   at Telerik.Windows.Documents.Fixed.Text.TextPosition..ctor(TextPage page)
   at Telerik.Windows.Documents.Fixed.Text.TextPosition..ctor(TextDocument document)
   at Telerik.Windows.Documents.Fixed.Model.RadFixedDocument.get_CaretPosition()
   at Telerik.Windows.Documents.UI.FixedDocumentPresenterBase.AttachToDocumentEvents(RadFixedDocument document)
   at Telerik.Windows.Documents.UI.FixedDocumentPresenterBase.DoOnDocumentChanged(RadFixedDocument oldDocument, RadFixedDocument newDocument)
   at Telerik.Windows.Controls.FixedDocumentViewerBase.OnDocumentChanged(RadFixedDocument oldValue, RadFixedDocument newValue)
   at Telerik.Windows.Controls.FixedDocumentViewerBase.<>c.<.cctor>b__14_1(DependencyObject s, DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.FixedDocumentViewerBase.set_Document(RadFixedDocument value)
   at Telerik.Windows.Controls.FixedDocumentViewerBase.<>c__DisplayClass90_0.<DocumentSource_Loaded>b__0()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

 

Following Pdf document specs might help you

 


3
 0 obj
[/CalRGB<</Gamma[2.2000000476837158 2.2000000476837158 2.2000000476837158]/Matrix[0.4124000072479248 0.2125999927520752 0.019300000742077827 0.35760000348091125 0.71520000696182251 0.11919999867677689 0.18050000071525574 0.072200000286102295 0.9505000114440918]/WhitePoint[0.9505000114440918 1. 1.0889999866485596]>>]
endobj

6
 0 obj
<</ProcSet[/PDF/Text/ImageB/ImageC/ImageI]/XObject<</Img1 5 0 R>>>>
endobj
7
 0 obj
<</Type/Page/Contents 4 0 R/MediaBox[0 0 595 842]/Resources 6 0 R/Parent 1 0 R>>
endobj


1 0 obj
<</Type/Pages/Count 1/Kids[7 0 R]>>
endobj

2 0 obj
<</Type/Catalog/Pages 1 0 R>>
endobj


xref
0 9
0000000000 65535 f 
0000063589 00000 n 
0000063641 00000 n 
0000000016 00000 n 
0000000350 00000 n 
0000000430 00000 n 
0000063406 00000 n 
0000063490 00000 n 
0000063687 00000 n 

trailer
<</Size 8/Root 2 0 R/Info 8 0 R/ID [<cf5c0accdc040b8a5fd298a765972d13><aab7ac8c45a677c67feb6c1e858ec7c9>]>>
startxref
63899
%%EOF

 

Martin
Telerik team
 answered on 19 Jul 2021
5 answers
291 views

Hi, I am trying to create simple HTML editor that will let user create html content limited to few options and the requirement here is to produce html with only <p> <u> <em> <strong> <font color="#XXXXXX"> without any spans, class or any other inline styles. I know how to limit it from UI so user can only use a few button to bold text, underscore, etc but I don't know how to get rig of these spans and other elements in export html.

Attached picture shows exported html when in RadRichTextBox I only added two texts, one is bold, second is italic.

I would like to have exported html like this: <p><strong>test</strong></p><p><i>test</i></p>

Any ideas?

 

Martin
Telerik team
 answered on 16 Jul 2021
1 answer
387 views

I have a WPF view that contains both watermark text boxes and multicolumn combo boxes. I would like to set their properties in the resources of the view. I am having an issue where the settings of the watermarktextbox are affecting the appearance of the multicolumncombobox. Below is my code for the settings (This is under the resources of the view)


        <Style TargetType="{x:Type telerik:RadWatermarkTextBox}">
            <Setter Property="Padding" Value="3" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="telerik:StyleManager.Theme" Value="Office2019" />
            <Setter Property="Height" Value="25" />
            <Setter Property="Margin" Value="5 5 5 0" />
        </Style>

        <Style TargetType="{x:Type telerik:RadMultiColumnComboBox}">
            <Setter Property="Height" Value="25" />
            <Setter Property="Margin" Value="5,5,5,0"/>
            <Setter Property="telerik:StyleManager.Theme" Value="Office2019" />
        </Style>

Below is a screenshot of the of the view - notice the drop down icon of the combobox is off it has the downarrow on the right but then also up and down arrows to the left of the drop down arrow - i think its a scroll bar

 

I can fix this in a couple ways but neither are ideal:
 1) I can set the height of the multi column combobox to 31 to get rid of those scroll bars. However, I would like all of my controls to be 25

2) I can remove the Height and Margin setters from the watermarktextbox but then I would have to go through and add those properties to each individual watermark textbox in my view

 

is there a setter property I can add to either the resources that would cancel out the values from the watermarktextbox or is there a way to cancel them out via a setting on each individual multicolumncombobox??

 

Thank you!

Dinko | Tech Support Engineer
Telerik team
 answered on 16 Jul 2021
1 answer
175 views

Hello.

 

I read this article.

https://www.telerik.com/forums/radcartesianchart-synchronize-scrolling

 

If I set to XAML, It's works.

But, I want to know how to set code behind Binding property. (Because, chart is making dynamic numbers)

I try to like below. But It doesn't work. 

Please check and help me.

 

RadCartesianChart chart = new RadCartesianChart();

RadCartesianChart chart1 = new RadCartesianChart();

chart.Name = "chart";

Binding bds = new Binding();
bds.ElementName = "chart";
bds.Mode = BindingMode.TwoWay;
bds.Path = new PropertyPath("VerticalZoomRangeStart");

Binding bde = new Binding();
bde.ElementName = "chart";
bde.Mode = BindingMode.TwoWay;
bde.Path = new PropertyPath("VerticalZoomRangeEnd");

BindingOperations.SetBinding(chart1, RadCartesianChart.VerticalZoomRangeStartProperty, bds);
BindingOperations.SetBinding(chart1, RadCartesianChart.VerticalZoomRangeEndProperty, bde);

 

Thanks.

Stenly
Telerik team
 answered on 15 Jul 2021
1 answer
192 views

The Week is started at the start of the month but not ended at end of the month.
Is it possible to do it? 

 

Code :

        <telerik:RadGanttView x:Name="ganttView" TasksSource="{Binding Tasks}" VisibleRange="{Binding VisibleRange}">
            <telerik:RadGanttView.TimeRulerLines>
                <telerik:GroupTickLine>
                    <telerik:TickInterval Interval="OneMonth" />
                </telerik:GroupTickLine>
                <telerik:GroupTickLine>
                    <local:WeekTickInterval Interval="OneWeek" />
                </telerik:GroupTickLine>
                <telerik:MajorTickLine>
                    <telerik:TickInterval Interval="OneDay"  />
                </telerik:MajorTickLine>
            </telerik:RadGanttView.TimeRulerLines>
            <telerik:RadGanttView.Columns>
                <telerik:TreeColumnDefinition Header="Project" Width="AutoHeaderAndContent" MinWidth="200"/>
            </telerik:RadGanttView.Columns>
        </telerik:RadGanttView>

Martin Ivanov
Telerik team
 answered on 15 Jul 2021
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
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
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?