Hi,
I want to change One item angle. because my program use 6 items in radialmenu but it already splite as if use 8 items (One Item Degree = 45). then i use 6 items. i want to change 60 degree of one item.
im korean 20 developer so, im do not think my english grammar is well.
if you look difficult my grammar. im sorry and thank you for response.
정말 감사합니다.(= thank you so much)
I want Export a chart in pdf file and image file. I use MVVM. I define a cartesian chart in view model and export that. but is some problem in export.
My chart is like "Ui.png" and in xaml that work correct.
* But in pdf file ("Export.pdf"):
1- label of Axis overwrite on corner.
2- some of curve have dasharray (you can see in "Ui.png") but dosen't set.
3- I define a Plot band Annotation (you can see in "Ui.png") but dosen't set.
* And in png file ("Export.png") only show Axis label.
My code for export
--------------------------------------------------------------------------------------------------------
RadFixedDocument document = new RadFixedDocument();
Chart = CreateChart();
document.Pages.Add(CreateChartPdfPart());
PdfFormatProvider provider = new PdfFormatProvider();
provider.Export(document, fileStream);
--------------------------------------------------------------------------------------------------------
public RadCartesianChart CreateChart()
{
RadCartesianChart Chart = new RadCartesianChart();
DoubleCollection dashArray = new DoubleCollection { 10, 1, 1, 1 };
FontFamily fontFamily = new FontFamily(Properties.Settings.Default.FontFamily);
Chart.BeginInit();
DateTimeContinuousAxis AxisX = new DateTimeContinuousAxis();
AxisX.PlotMode = AxisPlotMode.OnTicks;
AxisX.LabelFitMode = AxisLabelFitMode.Rotate;
AxisX.ShowLabels = true;
Chart.HorizontalAxis = AxisX;
LinearAxis LengthAxis = new LinearAxis();
LengthAxis.HorizontalLocation = AxisHorizontalLocation.Right;
LengthAxis.LineDashArray = dashArray;
TextBlock txt = new TextBlock();
var RotateLabel = new Style(typeof(TextBlock));
Setter setter = new Setter(TextBlock.RenderTransformProperty, new RotateTransform() { Angle = 180, CenterX = 50, CenterY = 50 });
RotateLabel.Setters.Add(setter);
txt.Style = RotateLabel;
txt.Text = string.Format(CultureInfo.CreateSpecificCulture("en-US"), "Difference (cm)");
LengthAxis.Title = txt.Text;
var ColorLabel = new Style(typeof(TextBlock));
Setter sett = new Setter(TextBlock.ForegroundProperty, new SolidColorBrush(Colors.Black));
LengthAxis.LabelStyle = ColorLabel;
LengthAxis.ShowLabels = true;
LinearAxis PercentageAxis = new LinearAxis();
PercentageAxis.HorizontalLocation = AxisHorizontalLocation.Left;
PercentageAxis.Title = string.Format(CultureInfo.CreateSpecificCulture("en-US"), ""); //"Difference (%)"
PercentageAxis.ShowLabels = true;
Chart.VerticalAxis = PercentageAxis;
Chart.Width = sizeA4.Width - 40;
Chart.Height = (sizeA4.Width - 40) * (2.0 / 3.0);
CartesianPlotBandAnnotation BandAnnotation = new CartesianPlotBandAnnotation();
BandAnnotation.Axis = PercentageAxis;
BandAnnotation.From = DownWarn;
BandAnnotation.To = UpWarn;
BandAnnotation.BorderBrush = new SolidColorBrush(Colors.Green);
BandAnnotation.Fill = new SolidColorBrush(Colors.Green);
Chart.Annotations.Add(BandAnnotation);
CartesianGridLineAnnotation GridLineAnnotationMinFail = new CartesianGridLineAnnotation();
GridLineAnnotationMinFail.Axis = PercentageAxis;
GridLineAnnotationMinFail.Value = DownFailure;
GridLineAnnotationMinFail.Stroke = new SolidColorBrush(Colors.Red);
GridLineAnnotationMinFail.DashArray = new DoubleCollection { 5, 5 };
GridLineAnnotationMinFail.StrokeThickness = 0.5;
Chart.Annotations.Add(GridLineAnnotationMinFail);
CartesianGridLineAnnotation GridLineAnnotationMaxFail = new CartesianGridLineAnnotation();
GridLineAnnotationMaxFail.Axis = PercentageAxis;
GridLineAnnotationMaxFail.Value = UpFailure;
GridLineAnnotationMaxFail.Stroke = new SolidColorBrush(Colors.Red);
GridLineAnnotationMaxFail.DashArray = new DoubleCollection { 5, 5 };
GridLineAnnotationMaxFail.StrokeThickness = 0.5;
Chart.Annotations.Add(GridLineAnnotationMaxFail);
CartesianChartGrid ChartGrid = new CartesianChartGrid();
ChartGrid.MajorLinesVisibility = GridLineVisibility.X;
ChartGrid.StripLinesVisibility = GridLineVisibility.Y;
ChartGrid.IsTabStop = false;
ChartGrid.YStripeBrushes.Add(new SolidColorBrush(Colors.Gray));
Chart.Grid = ChartGrid;
int i = 0;
foreach (var data in Data)
{
LineSeries lineSeries;
if (chekboxSeries[i])
{
if (i == 0 || i == 1 || i == 2 || i == 7 || i == 8)
{
lineSeries = new LineSeries
{
Stroke = new SolidColorBrush(newColor[i]),
StrokeThickness = 0.5,
DashArray = dashArray
};
}
else
{
lineSeries = new LineSeries
{
Stroke = new SolidColorBrush(newColor[i]),
VerticalAxis = LengthAxis,
DashArray = dashArray,
StrokeThickness = 0.5
};
}
foreach (var item in data.Items)
{
lineSeries.DataPoints.Add(new CategoricalDataPoint { Category = item.Date, Value = item.Value });
}
Chart.Series.Add(lineSeries);
}
i++;
}
Chart.EndInit();
Chart.Measure(new Size(Chart.Width, Chart.Height));
Chart.Arrange(new Rect(new Point(0, 0), Chart.DesiredSize));
return Chart;
}
--------------------------------------------------------------------------------------------------------
private RadFixedPage CreateChartPdfPart()
{
int margin = 20;
var page = new RadFixedPage();
page.Size = sizeA4;
var editor = new FixedContentEditor(page, Telerik.Windows.Documents.Fixed.Model.Data.MatrixPosition.Default);
using (editor.SavePosition())
{
editor.Position.Translate(margin, margin);
ExportUIElement.ExportHelper.ExportToPdf(Chart, editor);
}
return page;
}
--------------------------------------------------------------------------------------------------------
private void ExportPNGToImage(FrameworkElement element, Stream stream)
{
Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(element, stream, new PngBitmapEncoder());
}
What is wrong?
Our application has a form with multiple wide WatermarkTextboxes (and other textbox-like controls, e.g. MaskedDateTimeInput) in a grid layout. Most of them are single-line but some might become multiline, if the user enters long texts. The attached screenshot shows the form region where the problem becomes the most apparent.
Since each textbox, by default, has its own ScrollViewer that swallows all incoming scroll events, scrolling the main form via mouse wheel becomes pretty much impossible.
Browsers, such as Firefox, circumvent this issue by bubbling scroll events to the parent, whenever the child scrollviewer reaches its end. We could add this kind of workaround via an attached behavior but as our form is quite large, this would become ugly really soon. Is there any better solution and if not, would this be something that can be made possible in a future release?
Good Day.
Is there a way the have the WatermarkTextBox accept multi line text including next lines? I dont want to use the RadRichTextBox as it looks much complicated the what I needed. I just need a simple multi line textbox.
Also, I noticed that with WatermarkTextBox, It does not set the caret to the end of the text when I input a long text. As a result, it only displays the first part of the long text when typing. I already set the property SelectionOnFocus to CaretToEnd.
It only shows the expected behavior when I navigate to the end of the text then type again
Hello,
I'm using: Telerik 2019.1.116.45
1. I'm looking to display code in a read only view. I have found the RichTextBox API for insert code block and I like the formatting and key word coloring for the CSharp setting. I am wondering how can I interact with the Codeblock through MVVM, instead of calling the insert code api.
2. I have found that it takes a bit of time to load when the code is perhaps around 60-70 lines. Any way/settings I can set to increase the speed?
Hello
I am trying to migrate a WPF app to PRISM 7.
The MainWindow (Shell) is a RadRibbonWindow, hence it doe not migrate as it seems it is not of type Window.
I followed the instructions highlighted here (https://docs.telerik.com/devtools/wpf/knowledge-base/kb-radwindow-prismapplication-createshell), but I am missing a critical piece of information.
- Where do I find the "TelerikShell" type? Which dll, out of the many Telerik dlls that comes with WPF?
Also, if you have a working sample application that used PRISM 7 that you can sher would appreciate it.
Thanks
Herald