The built-in Hyperlink style is not applied to hyperlinks imported from HTML (<a> tag). As a result, the hyperlinks in the document do not have the blue underline.
Workaround: Subscribe for the SetupDocument event of the HtmlDataProvider and set the hyperlinks' style manually.
private void HtmlDataProvider_SetupDocument(object sender, Telerik.Windows.Documents.FormatProviders.SetupDocumentEventArgs e)
{
StyleDefinition hyperLinkStyle = e.Document.StyleRepository[RadDocumentDefaultStyles.HyperlinkStyleName];
hyperLinkStyle.SpanProperties.ForeColor = Colors.Green;//Color.FromRgb(0xff, 0x7a, 0xcc);
var hyperlinks = e.Document.EnumerateChildrenOfType<HyperlinkRangeStart>();
RadDocumentEditor editor = new RadDocumentEditor(e.Document);
editor.Document.History.IsEnabled = false;
foreach (HyperlinkRangeStart hyperlink in hyperlinks)
{
e.Document.Selection.SelectAnnotationRange(hyperlink);
editor.ChangeStyleName(RadDocumentDefaultStyles.HyperlinkStyleName);
}
e.Document.Selection.Clear();
editor.Document.History.IsEnabled = true;
}
When RadRichTextBox.DocumentInheritsDefaultStyleSettings is set to true, lists in the document are exported to HTML with Verdana font, instead of with the font applied in the UI.
Workaround: Use modification of the document default styles ("Normal") instead of setting DocumentInheritsDefaultStyleSettings to true, e.g.:
this.radRichTextBox.Document.StyleRepository["Normal"].SpanProperties.FontFamily = new FontFamily("Segoe UI");
The bug happens when we have two or more rows merged in the first column and programmatically, we make the rowDetails for the first row visible, the merged cells of the first column stay merged and are over of the rowDetails, hiding a part of the Row Details:
When RadSpreadsheet is placed inside a data template and the Workbook property is bound, the binding fails. In the Convert() method of the debug converter, the proper value is set. However, an empty workbook is displayed in the view.
When a DropDownList SDT form is saved in a XAML document and then imported with the XamlFormatProvider, an extra ListItem entry is added in the items collection of the DropDownList. The extra entry is the default "Choose an item".
To work this around, iterate all ComboBoxProperties and manually remove duplicates of the "Choose an item" entry.
var dropDownLists = radRichTextBox.Document.EnumerateChildrenOfType<SdtRangeStart>()
.Where(x => x.SdtProperties is ComboBoxProperties)
.Select(x => x.SdtProperties).OfType<ComboBoxProperties>();
var defaultItemString = LocalizationManager.GetString("Documents_ContentControlsGenerator_ListItem");
foreach (var item in dropDownLists)
{
if (item.Items.Count > 0 && item.Items.Any(x => x.Value != defaultItemString) && item.Items.Any(x => x.Value == defaultItemString))
{
var occurrence = item.Items.FirstOrDefault(x => x.Value == defaultItemString);
while (occurrence != null)
{
item.Items.Remove(occurrence);
occurrence = item.Items.FirstOrDefault(x => x.Value == defaultItemString);
}
}
}
If the document contains a simple field without run inside, the import process fails.
<w:fldSimple w:instr="page" w:dirty="true"/>
The same document with a run inside the field does not cause an error
<w:fldSimple w:instr="page" w:dirty="true">
<w:r>
<w:t>1</w:t>
</w:r>
</w:fldSimple>
RadSyntaxEditor, while inside of a virtualized RadGridView, stealings focus immediately upon loading. It appears to do this automatically and there is no configuration to disabling. Meaning when scrolling in a RadGridView with virtualized rows, when a row with the RadSyntaxEditor materializes it will automatically steal focus from other elements.
This can be worked around using custom behavior that discards the first preview keyboard focus event that it receives.
private void onPreviewGotKeyboardFocus(object s, KeyboardFocusChangedEventArgs e)
{
if (!this.SuppressAutoFocus || _wasFocusSuppressed)
{
return;
}
_wasFocusSuppressed = true;
e.Handled = true;
}The offending line of code is this in RadSyntaxEditor.InitActiveEditorPresenter:
if (flag)
{
base.Dispatcher.BeginInvoke((Action)delegate
{
Focus();
});
}Request: Add a dependency property to allow opting-out of this default behavior. The above workaround works, but is a bit hacky for something that should probably be built-in.
When using RadChat control and running the application, 2 binding errors appear in the Output Tab of Visual Studio.
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Telerik.Windows.Controls.RadPromptInput', AncestorLevel='1''. BindingExpression:Path=Padding; DataItem=null; target element is 'RadGlyph' (Name=''); target property is 'Margin' (type 'Thickness')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Telerik.Windows.Controls.RadPromptInput', AncestorLevel='1''. BindingExpression:Path=Padding; DataItem=null; target element is 'RadGlyph' (Name=''); target property is 'Margin' (type 'Thickness')
Some of the lines that should be dashed are rendered as continuous lines.