Implementing a custom tagger for SyntaxEditor control for DAX code and want to implement the MultilineTags for comments /* */.
Below is my custom tagger, how would I implement MultilineTags for this?
public class DAXTagger : WordTaggerBase
{
private static readonly string[] Keywords = new string[]
{
"APPROXIMATEDISTINCTCOUNT","AVERAGE","AVERAGEA","AVERAGEX","COUNT","COUNTA","COUNTAX","COUNTBLANK","COUNTROWS",
"COUNTX","DISTINCTCOUNT","DISTINCTCOUNTNOBLANK","MAX","MAXA","MAXX","MIN","MINA","MINX","PRODUCT","PRODUCTX","SUM","SUMX",
"CALENDAR","CALENDARAUTO","DATE","DATEDIFF","DATEVALUE","DAY","EDATE","EOMONTH","HOUR","MINUTE","MONTH","NOW","QUARTER",
"SECOND","TIME","TIMEVALUE","TODAY","UTCNOW","UTCTODAY","WEEKDAY","WEEKNUM","YEAR","YEARFRAC",
"ALL","ALLCROSSFILTERED","ALLEXCEPT","ALLNOBLANKROW","ALLSELECTED","CALCULATE","CALCULATETABLE","EARLIER","EARLIEST",
"FILTER","KEEPFILTERS","LOOKUPVALUE","REMOVEFILTERS","SELECTEDVALUE","ACCRINT","ACCRINTM","AMORDEGRC","AMORLINC","COUPDAYBS",
"COUPDAYS","COUPDAYSNC","COUPNCD","COUPNUM","COUPPCD","CUMIPMT","CUMPRINC","DB","DDB","DISC","DOLLARDE","DOLLARFR",
"DURATION","EFFECT","FV","INTRATE","IPMT","ISPMT","MDURATION","NOMINAL","NPER","ODDFPRICE","ODDFYIELD","ODDLPRICE",
"ODDLYIELD","PDURATION","PMT","PPMT","PRICE","PRICEDISC","PRICEMAT","PV","RATE","RECEIVED","RRI","SLN","SYD","TBILLEQ",
"TBILLPRICE","TBILLYIELD","VDB","XIRR","XNPV","YIELD","YIELDDISC","YIELDMAT","CONTAINS","CONTAINSROW","CONTAINSSTRING",
"CONTAINSSTRINGEXACT","CUSTOMDATA","HASONEFILTER","HASONEVALUE","ISAFTER","ISBLANK","ISCROSSFILTERED","ISEMPTY","ISERROR",
"ISEVEN","ISFILTERED","ISINSCOPE","ISLOGICAL","ISNONTEXT","ISNUMBER","ISODD","ISONORAFTER","ISSELECTEDMEASURE","ISSUBTOTAL",
"ISTEXT","NONVISUAL","SELECTEDMEASURE","SELECTEDMEASUREFORMATSTRING","SELECTEDMEASURENAME","USERNAME","USEROBJECTID",
"USERPRINCIPALNAME","AND","BITAND","BITLSHIFT","BITOR","BITRSHIFT","BITXOR","COALESCE","FALSE","IF","IF.EAGER","IFERROR",
"NOT","OR","SWITCH","TRUE","ABS","ACOS","ACOSH","ACOT","ACOTH","ASIN","ASINH","ATAN","ATANH","CEILING","CONVERT","COS",
"COSH","COT","COTH","DEGREES","DIVIDE","EVEN","EXP","FACT","FLOOR","GCD","INT","ISO.CEILING","LCM","LN","LOG",
"LOG10","MROUND","ODD","PI","POWER","QUOTIENT","RADIANS","RAND","RANDBETWEEN","ROUND","ROUNDDOWN","ROUNDUP","SIGN","SIN",
"SINH","SQRT","SQRTPI","TAN","TANH","TRUNC","BLANK","ERROR","PATH","PATHCONTAINS","PATHITEM","PATHITEMREVERSE","PATHLENGTH",
"CROSSFILTER","RELATED","RELATEDTABLE","USERELATIONSHIP","BETA.DIST","BETA.INV","CHISQ.DIST","CHISQ.DIST.RT","CHISQ.INV",
"CHISQ.INV.RT","COMBIN","COMBINA","CONFIDENCE.NORM","CONFIDENCE.T","EXPON.DIST","GEOMEAN","GEOMEANX","MEDIAN","MEDIANX",
"NORM.DIST","NORM.INV","NORM.S.DIST","NORM.S.INV","PERCENTILE.EXC","PERCENTILE.INC","PERCENTILEX.EXC","PERCENTILEX.INC",
"PERMUT","POISSON.DIST","RANK.EQ","RANKX","SAMPLE","STDEV.P","STDEV.S","STDEVX.P","STDEVX.S","T.DIST","T.DIST.2T",
"T.DIST.RT","T.INV","T.INV.2t","VAR.P","VAR.S","VARX.P","VARX.S","ADDCOLUMNS","ADDMISSINGITEMS","CROSSJOIN","CURRENTGROUP",
"DETAILROWS","DISTINCT column","DISTINCT table","EXCEPT","FILTERS","GENERATE","GENERATEALL","GENERATESERIES",
"GROUPBY","IGNORE","INTERSECT","NATURALINNERJOIN","NATURALLEFTOUTERJOIN","ROLLUP","ROLLUPADDISSUBTOTAL","ROLLUPISSUBTOTAL",
"ROLLUPGROUP","ROW","SELECTCOLUMNS","SUBSTITUTEWITHINDEX","SUMMARIZE","SUMMARIZECOLUMNS","Table Constructor","TOPN",
"TREATAS","UNION","VALUES","COMBINEVALUES","CONCATENATE","CONCATENATEX","EXACT","FIND","FIXED","FORMAT","LEFT","LEN",
"LOWER","MID","REPLACE","REPT","RIGHT","SEARCH","SUBSTITUTE","TRIM","UNICHAR","UNICODE","UPPER","VALUE",
"CLOSINGBALANCEMONTH","CLOSINGBALANCEQUARTER","CLOSINGBALANCEYEAR","DATEADD","DATESBETWEEN","DATESINPERIOD","DATESMTD",
"DATESQTD","DATESYTD","ENDOFMONTH","ENDOFQUARTER","ENDOFYEAR","FIRSTDATE","FIRSTNONBLANK","LASTDATE","LASTNONBLANK",
"NEXTDAY","NEXTMONTH","NEXTQUARTER","NEXTYEAR","OPENINGBALANCEMONTH","OPENINGBALANCEQUARTER","OPENINGBALANCEYEAR",
"PARALLELPERIOD","PREVIOUSDAY","PREVIOUSMONTH","PREVIOUSQUARTER","PREVIOUSYEAR","SAMEPERIODLASTYEAR","STARTOFMONTH",
"STARTOFQUARTER","STARTOFYEAR","TOTALMTD","TOTALQTD","TOTALYTD",
"BOOLEAN","CURRENCY","DATETIME","DOUBLE","INTEGER","STRING"
};
private static readonly string[] Comments = new string[]
{
"//", "--", "/*", "*/"
};
private static readonly string[] Operators = new string[]
{
"+", "-", "*", "/", "^", "&", "|", "&&", "||"
};
public static readonly ClassificationType Keywords1ClassificationType = new ClassificationType("Keywords1");
private static readonly string[] Keywords1 = new string[]
{
"VAR", "RETURN", "DATATABLE"
};
private static readonly Dictionary<string, ClassificationType> WordsToClassificationType = new Dictionary<string, ClassificationType>();
static DAXTagger()
{
WordsToClassificationType = new Dictionary<string, ClassificationType>();
foreach (var keyword in Keywords)
{
WordsToClassificationType.Add(keyword, ClassificationTypes.Keyword);
}
foreach (var preprocessor in Operators)
{
WordsToClassificationType.Add(preprocessor, ClassificationTypes.Operator);
}
foreach (var comment in Comments)
{
WordsToClassificationType.Add(comment, ClassificationTypes.Comment);
}
foreach (var comment in Keywords1)
{
WordsToClassificationType.Add(comment, Keywords1ClassificationType);
}
}
public DAXTagger(Telerik.Windows.Controls.RadSyntaxEditor editor)
: base(editor)
{
}
protected override Dictionary<string, ClassificationType> GetWordsToClassificationTypes()
{
return DAXTagger.WordsToClassificationType;
}
protected override bool TryGetClassificationType(string word, out ClassificationType classificationType)
{
int number;
if (int.TryParse(word, out number))
{
classificationType = ClassificationTypes.NumberLiteral;
return true;
}
return base.TryGetClassificationType(word, out classificationType);
}
protected override IList<string> SplitIntoWords(string value)
{
List<string> words = new List<string>();
string word;
int lastCharType = -1;
int startIndex = 0;
for (int i = 0; i < value.Length; i++)
{
int charType = GetCharType(value[i]);
if (charType != lastCharType)
{
word = value.Substring(startIndex, i - startIndex);
words.Add(word);
startIndex = i;
lastCharType = charType;
}
else if (value[i] == '#' && value[i - 1] == '#')
{
word = value.Substring(startIndex, i - startIndex);
words.Add(word);
startIndex = i;
lastCharType = charType;
}
}
word = value.Substring(startIndex, value.Length - startIndex);
words.Add(word);
return words;
}
internal static int GetCharType(char c)
{
if (c == '#' || c == '_')
{
return 3;
}
if (char.IsWhiteSpace(c))
{
return 1;
}
if (char.IsPunctuation(c) || char.IsSymbol(c))
{
return 2;
}
return 0;
}
}
}I was using telerik controls with version 2020.2.617.45 and everything works fine, but when I updated Telerik.Windows.Data, Telerik.Windows.Controls and Telerik.Windows.controls.Data dll`s to version 2022.1.222.45 I got error in my custom behaviour at this row:
private void AssociatedObject_GotFocus(object sender, RoutedEventArgs e)
{
RadGridView gridView = sender as RadGridView;
if (gridView != null && gridView.CurrentCell != null && !gridView.CurrentCell.IsInEditMode && !gridView.CurrentCell.Column.IsReadOnly)
gridView.CurrentCell.BeginEdit();
}
when I call gridView.CurrentCell.BeginEdit(); and I got error :System.MissingFieldException: 'Field not found: 'Telerik.Windows.Controls.ThemeManager.DefaultThemeName'.'
The problem occured after update.
I am inserting text in Richtextbox control from word document. Richtextbox load document correctly and formatting is valid as per MS word document.
Then save document as html and reopen document in Richtextbox. I noticed that Table content is overflowed in paged layout i.e. Columns are clipped or not showing in document area. And also print incomplete document. As I stated when load document, formatting is correct, but exporting document to html and reloading html generated document, this issue happened.
Moreover there is some formatting issue as I highlighted in attached sample image.
This issue can be reproduced in Telerik UI for WPF demos. Following steps to reproduce issue.
I am using Telerik UI for WPF R1 2022
Hello,
i'm currently working with some hierarchical data that i wanted to present using a RadGridView with its ChildTable feature.
Unfortunately i'm running in quite severe performance issues once i try to auto expand the child tables (waiting between 15 to 25 seconds to see my data).
I've read that placing the RadGridView in a container with infinite height (like ScrollViewer, Grid with height 'Auto', etc) could lead to such performance issues, but i didn't place it in such containers.
I prepared and attached a little demo project to reproduce my problem.
It would be great if someone got some tips for me on how to improve the performance when expanding multiple levels of hierarchies in a RadGridView.
Greetings,
Josh
Hi,
We wish to auto open the settings pane whenever the user selects a particular shape. What is the standard way of achieving this?
We have added a event handler for the selection changed event, just need the method to trigger the settings pane open.
Thank you.
Hi
I have a checkbox as a cell in one of my gridviews. if you double click it, the chech box will hides.
how can I disable double click , to prevent hiding the checkbox?
I tried:
setting e.handled to true in "PreviewMouseDoubleClick" but did not work(still hides)
<telerik:GridViewDataColumn>
<telerik:GridViewColumn.CellTemplate>
<DataTemplate>
<CheckBox>
#close tags#

Hi,
We are having an issue with the settings pane of the diagram control wherein if we add a shape to the diagram, edit its text, and click on the settings pane directly, the content (text) of the control is not reflected in the settings pane text tab. Also, any change that you make, say to text or fonts etc. is not immediately reflected on the control. This is causing a great deal of confusion to our users.
How do we force the settings pane to pick up the latest value from the control and make sure it applies changes immediately (so they are visible to the user as they make them)?
I have attached a video demonstrating this issue: https://somup.com/c3ffh2O1kO
Please help.
Hi,
In my WPF MVVM solution, I'm using Telerik RadMap control with the free ArcGIS Provider to show maps,
I also use Telerik InformationLayer control to show extra data coming from my ViewModel, and it's all working well.
Now I have a paid account at ESRI, and after I log in to my account I can see and use on the ESRI website some extra Feature Layers like "Electric Dataset" and more.
I see ESRI does have an API for .NET to be able to display a map and add a feature layer, and they also show an example of how to do it by using their own WPF esri:MapView control.
But the problem is that I don't want to replace my current RadMap control with another new control because I'm worried about all my existing InformationLayers complexity, and I probably would need to code them again especially to match the new control.
My question is, Is there is a way I could combine using RadMap control with a paid ESRI ArcGIS provider?
Thanks in advance for your answers
Efi
I want to create a overview where all my 200+ tasks can be seen at one view. To do this, I wanted to make my row height to 5 pixels. So I added this code to my usercontrol:
<system:Double x:Key="RowHeight">5</system:Double><Style TargetType="telerik:EventContainer" BasedOn="{StaticResource EventContainerStyle}">
<Setter Property="MaxHeight" Value="{StaticResource RowHeight}" />
<Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
</Style><Style TargetType="telerik:MilestoneContainer" BasedOn="{StaticResource MilestoneContainerStyle}">
<Setter Property="MaxHeight" Value="{StaticResource RowHeight}" />
<Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
</Style><Style TargetType="telerik:SimpleCellContainer" BasedOn="{StaticResource SimpleCellContainerStyle}">
<Setter Property="MaxHeight" Value="{StaticResource RowHeight}" />
<Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
</Style><Style TargetType="telerik:CellContainer" BasedOn="{StaticResource CellContainerStyle}">
<Setter Property="MaxHeight" Value="{StaticResource RowHeight}" />
<Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
<Setter Property="Padding" Value="0" />
</Style><Style TargetType="telerik:CellEditingContainer" BasedOn="{StaticResource CellEditingContainerStyle}">
<Setter Property="MaxHeight" Value="{StaticResource RowHeight}" />
<Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
</Style><Style TargetType="telerik:SimpleTreeCellContainer" BasedOn="{StaticResource SimpleTreeCellContainerStyle}">
<Setter Property="MaxHeight" Value="{StaticResource RowHeight}" />
<Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
</Style><Style TargetType="telerik:DragResizeSlotHighlightContainer" BasedOn="{StaticResource DragResizeSlotHighlightContainerStyle}">
<Setter Property="MaxHeight" Value="{StaticResource RowHeight}" />
<Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
</Style><Style TargetType="telerik:CellHighlightContainer" BasedOn="{StaticResource CellHighlightContainerStyle}">
<Setter Property="MaxHeight" Value="{StaticResource RowHeight}" />
<Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
</Style><Style TargetType="telerik:TreeCellHighlightContainer" BasedOn="{StaticResource TreeCellHighlightContainerStyle}">
<Setter Property="MaxHeight" Value="{StaticResource RowHeight}" />
<Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
</Style><Style TargetType="telerik:TreeCellEditingContainer" BasedOn="{StaticResource TreeCellEditingContainerStyle}">
<Setter Property="MaxHeight" Value="{StaticResource RowHeight}" />
<Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
</Style><Style TargetType="telerik:TreeCellContainer" BasedOn="{StaticResource TreeCellContainerStyle}">
<Setter Property="MaxHeight" Value="{StaticResource RowHeight}" />
<Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
</Style>
But the height is only changed on the EventContainer, not the full row:
How can I change the full row height?
Thanks.
Regards, Marco