Telerik Forums
UI for WPF Forum
3 answers
156 views

Using latest version of UI for WPF R2 2020 SP.

I have a RadRichTextBox and RadRichTextBoxRibbonUI on a user control.

All of the buttons on the ribbon view are synced with the selected text on the rich text box, other than font size. Note that if I highlight text and select a new font size, it works as expected, except that the newly selected size is not displayed in the ribbon view (the combobox is empty after the selection).

Snippet of code attached to show that the Command binding is set correctly, or so I believe.

Any help greatly appreciated.

 

<telerik:RadRichTextBoxRibbonUI CollapseThresholdSize="50,50" VerticalAlignment="Top" DataContext="{Binding Commands, ElementName=radRichTextBox}" ApplicationButtonContent="File">

     .....

</telerik:RadRichTextBoxRibbonUI>

<telerik:DocumentRuler Grid.Row="1">
    <telerik:RadRichTextBox Name="radRichTextBox" LayoutMode="Paged" />
</telerik:DocumentRuler>
<telerik:RadRichTextBoxStatusBar Grid.Row="2"  AssociatedRichTextBox="{Binding ElementName=radRichTextBox, Mode=OneTime}" />

Tanya
Telerik team
 answered on 20 Jul 2020
3 answers
242 views

I have a strange new bug in Visual Studio XAML Editor when I place a RadGridView inside a DataTemplate. It is quite easy to reproduce:

  1. create a new WPF Core 3.1 project
  2. add Telerik.UI.for.Wpf.NetCore 2020.2.513 (as NuGet package)
  3. place the following code inside the Resource-part of the window:
01.<Window.Resources>
02.    <DataTemplate x:Key="testTemplate">
03.        <Grid>
04.            <telerik:RadGridView>
05.                <telerik:RadGridView.Columns>
06.                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Title}"></telerik:GridViewDataColumn>
07.                </telerik:RadGridView.Columns>
08.            </telerik:RadGridView>
09.        </Grid>
10.    </DataTemplate>
11.</Window.Resources>

 

It does not matter that there is no ItemsSource or which field you are binding the GridViewDataColumn to. As soon as I include the property DataMemberBinding="{...}" I get a warning from "Microsoft.CodeAnalysis.Xaml.Diagnostics.Analyzers.XamlDocumentDiagnosticAnalyzer" saying that there is a NullReferenceException. From there on there is no more Intellisense or Autocomplete inside my Xaml Editor.

Could someone at Telerik check if it is just my developer machine or is it a bug that I detected? Visual Studio 2019 is Version 16.6.0.

Thanks in advance!

Regards
Heiko

Doug
Top achievements
Rank 1
Veteran
 answered on 19 Jul 2020
0 answers
128 views

Good day.

How can I have a paginated GridView using SQL LIMIT/OFFSET.

I tried using DataPager and GridView but what i understand is the control loads the records in full. Is it possible to have the Pager or the GridView use something like LIMIT/OFFSET when retrieving the date from the database.

For example 1 have 100,000 records. I just want to load the first 1000 on my page load and navigate via pager(with 100 page indicator) to show the other records. And also have it affect the GridView column filter and other header controls which means when I filter/sort it will look on the full records list. 

 

Thank you very much.

gerardo
Top achievements
Rank 1
Veteran
 asked on 19 Jul 2020
2 answers
209 views

I have seen the following example in this forums.

-->  https://www.telerik.com/forums/geoserver-as-provider

 

 

 

i just change 

1. BaseUri="http://localhost:8080/geoserver/hc_test/wms"

2. TileUrlFormat = @"?SERVICE=WMS&REQUEST=GetMap&VERSION=1.1.1&FORMAT=PNG&WIDTH={1}&HEIGHT={2}&SRS=EPSG:42310&BBOX={0}&LAYERS=hc_test:N3A_G0100000";

3. XYZoomToBBox Function

 

my GetTile Function is  return url that "http://ocalhost:8080/geoserver/hc_test/wms?service=WMS&version=1.1.1&request=GetMap&layers=hc_test:N3A_G0100000&styles=&bbox=956779,1928520,1142111,2015940&width=1000&height=1000&srs=EPSG:42310&format=application/openlayers"
This url works well in the browser. However, the map is not visible in the radmap.

The rest of the code is the same as example code.

 

Can I get the latest examples or advice for working with geoserver?


 

MCanitez
Top achievements
Rank 1
 answered on 17 Jul 2020
3 answers
239 views

Hi,

I would like to style the search results that are displayed in HighlightTextBlock so that the found text is bold or underlined or similar. Any simple solution for that?

Regards
Heiko

Vicky
Telerik team
 answered on 17 Jul 2020
3 answers
402 views

Hello,

 

I was wondering if there is a way to export data from my RadGrid to an Excel File Template.  I am currently using Microsoft.Office.Interop.Excel and looping through my list to input each record in its according row and column but I am noticing it is running very slow now with the amount of records I have.   I believe this was a question asked in 2012 (http://www.telerik.com/forums/export-to-a-template-excel-file) and I am hoping it may now be supported.

 

Thank you

 

Derrick

Martin Ivanov
Telerik team
 answered on 16 Jul 2020
9 answers
315 views

Hello,

I have Windows 10 in English, but the date display in Swiss French.

In the save dialog (not checked the other ones, but it should be the same), the date and time are displayed in the US format, with AM/PM).

You must use the Windows settings to display the date and time correctly.

Dinko | Tech Support Engineer
Telerik team
 answered on 15 Jul 2020
4 answers
158 views

Hello,

I am trying to give my CodeBlocks inside a RichTextBox.Document a certain style.

Every character inside the CodeBlock should have the same FontFamily and FontSize.

To do this I am going the following way:

1.) Clear all existing styles inside the RichTextBox.CodeFormatter.

2.) Add my own styles.

The code looks like this:

            StyleDefinition styleWhite = new StyleDefinition(cl.GetCodeLanguage.Name + "StyleWhite", StyleType.Character);
            styleWhite.SpanProperties.ForeColor = Colors.White;
            styleWhite.SpanProperties.FontFamily = Wpf.Fonts.Fonts.GetFont(eFont.Consolas);
            styleWhite.SpanProperties.FontSize = Unit.PointToDip(fontSize);


            StyleDefinition styleKeyWord = new StyleDefinition(cl.GetCodeLanguage.Name + "StyleKeyword", StyleType.Character);
            styleKeyWord.SpanProperties.ForeColor  = colorKeyWord;
            styleKeyWord.SpanProperties.FontFamily = Wpf.Fonts.Fonts.GetFont(eFont.Consolas);
            styleKeyWord.SpanProperties.FontSize   = Unit.PointToDip(fontSize);

            StyleDefinition styleString = new StyleDefinition(cl.GetCodeLanguage.Name + "StyleString", StyleType.Character);
            styleString.SpanProperties.ForeColor = colorKeyWord;
            styleString.SpanProperties.FontFamily = Wpf.Fonts.Fonts.GetFont(eFont.Consolas);
            styleString.SpanProperties.FontSize = Unit.PointToDip(fontSize);

            StyleDefinition styleMethod = new StyleDefinition(cl.GetCodeLanguage.Name + "styleMethod", StyleType.Character);
            styleMethod.SpanProperties.ForeColor = colorKeyWord;
            styleMethod.SpanProperties.FontFamily = Wpf.Fonts.Fonts.GetFont(eFont.Consolas);
            styleMethod.SpanProperties.FontSize = Unit.PointToDip(fontSize);

            StyleDefinition styleComment = new StyleDefinition(cl.GetCodeLanguage.Name + "StyleComment", StyleType.Character);
            styleComment.SpanProperties.ForeColor = colorKeyWord;
            styleComment.SpanProperties.FontFamily = Wpf.Fonts.Fonts.GetFont(eFont.Consolas);
            styleComment.SpanProperties.FontSize = Unit.PointToDip(fontSize);



            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Comment);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Keyword);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Method);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.StringLiteral);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Attributes);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.CharacterLiteral);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Constants);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Data);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.ExcludedCode);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Identifier);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.NumberLiteral);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Operator);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.PreprocessorKeyword);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Variable);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.WhiteSpace);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Literal);

 

            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Comment, styleComment);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Keyword,  styleKeyWord);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Method,  styleMethod);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.StringLiteral,  styleString);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Attributes,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.CharacterLiteral,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Constants,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Data,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.ExcludedCode,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Identifier,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.NumberLiteral,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Operator,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.PreprocessorKeyword,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Variable,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.WhiteSpace,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Literal,  styleWhite);

 

The result of this code is, that I get different FontSizes inside the CodeBlock. See attached *.gif.

So my question is: Which styles do I need to change or add, to give CodeBlocks a consitent look?

Max
Top achievements
Rank 1
 answered on 15 Jul 2020
9 answers
469 views

Hello,

In the file dialogs, there is no shortcut for the controls. For example Alt+N to go to the "File name:" text box.

Martin Ivanov
Telerik team
 answered on 14 Jul 2020
4 answers
782 views

I updated my DLLs to the newest version  Telerik_UI_for_WPF_2020_2_617_Dev_Hotfix and now I get a reference conflict:

Severity    Code    Description    Project    File    Line    Suppression State
Warning        Could not resolve this reference. Could not locate the assembly "Telerik.Pivot.Core, Version=2019.2.618.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.            

Please refer to the attached image files for more details.

ClausDC
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 13 Jul 2020
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?