Telerik Forums
UI for WPF Forum
7 answers
917 views
I have a grid view with editable text box and a button ("PRINT")  in it (with data binding).
When I edit a text in the text box and then press the button the text in the text box doesn't get updated , the text box doesn't lose focus on the button click...
So for example : when the form loaded the text box contains text "AAA". I click on the text box and start changing the text to "BBB", then (without diselecting the text box) I click "PRINT" button  - the printed value would be "AAA" and not "BBB"


<telerik:GridViewDataColumn  DataMemberBinding="{Binding LabelToPrint, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"   Header="label " IsReadOnlyBinding="{Binding IsLabelReadOnly}" EditTriggers="CellClick" >
                                </telerik:GridViewDataColumn>
                                <telerik:GridViewColumn Header="Print Label" FocusManager.FocusedElement="BagGridView">
                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <telerik:RadButton Content="Print Label"  Command="{Binding DataContext.PrintLabelCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadGridView}, AncestorLevel=2}}" CommandParameter="{Binding}"/>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                </telerik:GridViewColumn>
Martin Ivanov
Telerik team
 answered on 15 Aug 2019
1 answer
128 views

Hi,

 

I have created a plugin which contains a dialog which should host a RadRichTextBox. But the RichTextBox will not be displayed.

This plugin will be in registered via MEF.

 

I used your workaround which will be called by the contructor of the dialog:

 private void InitMEFCatalog()
        {
            RadCompositionInitializer.Catalog = new TypeCatalog(
            // format providers
            typeof(HtmlFormatProvider),
            typeof(RtfFormatProvider),
            typeof(DocxFormatProvider),
            typeof(PdfFormatProvider),
            typeof(HtmlFormatProvider),
            typeof(TxtFormatProvider),
            
            // mini toolbars
            typeof(SelectionMiniToolBar),
            typeof(ImageMiniToolBar),
            
            // context menu
            typeof(Telerik.Windows.Controls.RichTextBoxUI.ContextMenu),
            
            //// the default English spellchecking dictionary
            //typeof(RadEn_USDictionary),
            
            // dialogs
            typeof(AddNewBibliographicSourceDialog),
            typeof(ChangeEditingPermissionsDialog),
            typeof(EditCustomDictionaryDialog),
            typeof(FindReplaceDialog),
            typeof(FloatingBlockPropertiesDialog),
            typeof(FontPropertiesDialog),
            typeof(ImageEditorDialog),
            typeof(InsertCaptionDialog),
            typeof(InsertCrossReferenceWindow),
            typeof(InsertDateTimeDialog),
            typeof(InsertTableDialog),
            typeof(InsertTableOfContentsDialog),
            typeof(ManageBibliographicSourcesDialog),
            typeof(ManageBookmarksDialog),
            typeof(ManageStylesDialog),
            typeof(NotesDialog),
            typeof(ProtectDocumentDialog),
            typeof(RadInsertHyperlinkDialog),
            typeof(RadInsertSymbolDialog),
            typeof(RadParagraphPropertiesDialog),
            typeof(SetNumberingValueDialog),
            typeof(SpellCheckingDialog),
            typeof(StyleFormattingPropertiesDialog),
            typeof(TableBordersDialog),
            typeof(TablePropertiesDialog),
            typeof(TabStopsPropertiesDialog),
            typeof(UnprotectDocumentDialog),
            typeof(WatermarkSettingsDialog));
        }

 

My output window looks like that:

"Configurator.exe" (CLR v4.0.30319: Configurator.exe): "C:\Users\Didi\Source\Repos\cc360main\Configurator\bin\Debug\Telerik.Windows.Documents.dll" geladen.
"Configurator.exe" (CLR v4.0.30319: Configurator.exe): "C:\Users\Didi\Source\Repos\cc360main\Configurator\bin\Debug\Telerik.Windows.Documents.Core.dll" geladen.
"Configurator.exe" (CLR v4.0.30319: Configurator.exe): "C:\Users\Didi\Source\Repos\cc360main\Configurator\bin\Debug\Telerik.Windows.Documents.Flow.dll" geladen.
"Configurator.exe" (CLR v4.0.30319: Configurator.exe): "C:\Users\Didi\Source\Repos\cc360main\Configurator\bin\Debug\Telerik.Windows.Documents.Flow.FormatProviders.Pdf.dll" geladen.
"Configurator.exe" (CLR v4.0.30319: Configurator.exe): "C:\Users\Didi\Source\Repos\cc360main\Configurator\bin\Debug\Telerik.Windows.Controls.RichTextBoxUI.dll" geladen.
"Configurator.exe" (CLR v4.0.30319: Configurator.exe): "C:\Users\Didi\Source\Repos\cc360main\Configurator\bin\Debug\Telerik.Windows.Controls.Navigation.dll" geladen.
"Configurator.exe" (CLR v4.0.30319: Configurator.exe): "C:\Users\Didi\Source\Repos\cc360main\Configurator\bin\Debug\Telerik.Windows.Controls.dll" geladen.
"Configurator.exe" (CLR v4.0.30319: Configurator.exe): "C:\Users\Didi\Source\Repos\cc360main\Configurator\bin\Debug\Telerik.Windows.Controls.RibbonView.dll" geladen.
"Configurator.exe" (CLR v4.0.30319: Configurator.exe): "C:\Users\Didi\Source\Repos\cc360main\Configurator\bin\Debug\Telerik.Windows.Controls.Input.dll" geladen.
"Configurator.exe" (CLR v4.0.30319: Configurator.exe): "C:\Users\Didi\Source\Repos\cc360main\Configurator\bin\Debug\de\Telerik.Windows.Controls.resources.dll" geladen. Das Modul wurde ohne Symbole erstellt.
"Configurator.exe" (CLR v4.0.30319: Configurator.exe): "C:\Users\Didi\Source\Repos\cc360main\Configurator\bin\Debug\Telerik.Windows.Documents.FormatProviders.OpenXml.dll" geladen.
"Configurator.exe" (CLR v4.0.30319: Configurator.exe): "C:\Users\Didi\Source\Repos\cc360main\Configurator\bin\Debug\Telerik.Windows.Zip.dll" geladen.

 

As you can see, there is no error.

 

My xaml code:

   <Grid Grid.Row="2">
            <telerik:RadRichTextBox
                x:Name="richTextBoxAdv"
                IsSpellCheckingEnabled="False"
                LayoutMode="Paged" />
        </Grid>

The height of Grid.Row 2 is *.

 

Any ideas?

Peshito
Telerik team
 answered on 15 Aug 2019
2 answers
232 views

Hi Team,

 

I want to change the RadRichTextBox content(remove some invalid characters) in LostFocus event. Initially, i have loaded the RadRichTextBox with some header and footer content. Then, i am entering some data(Paste data also) and tabout. While losing the focus, need to remove some invalid character and save in the same document. I have tried like below. 

 

           Telerik.Windows.Documents.FormatProviders.Txt.TxtFormatProvider provider = new Telerik.Windows.Documents.FormatProviders.Txt.TxtFormatProvider();
           string output = provider.Export(richtextbox.Document);   // getting textbox's text     
           string text = output;
                foreach (char letter in text)
                {                  
                            if (//Condition)
                            {  
                              // here remove some invalid characters based on some condition.
                                output = output.Remove(index, 1);                                
                            }                
                }                                      
              RadDocument document = new RadDocument();
              document = provider.Import(output);         

              radRichTextBox.Document = document;  // update the document .. It is an error

              object Docx = docprovider.Export(document); // DocxFormatProvider

 

After removing the some content, document's header and footer also removed. Can you please suggest how to edit the content of RadRichTextBox ?

 

Martin
Telerik team
 answered on 15 Aug 2019
7 answers
275 views
We are using the WPF RadCalendar to show two months side by side. We have ViewsHeaderVisibility set to Visible so that the individual month header is displayed on each calendar. The default header top bar is still displayed spanning both calendars with the first month as the title. What we want to do is hide the default header as it is confusing to have the month displayed twice. Is there an easy way to do this?
Dilyan Traykov
Telerik team
 answered on 15 Aug 2019
4 answers
1.1K+ views

Hi!

I'm using WPF RadComboBox in an application and run the application on a Lenovo ThinkPad. It has touch screen and runs Windows 10 Enterprise.

When I have many items in my RadComboBox and scroll through them on the touch screen, the scroll is much too fast - it scrolls too many items at the time.

I installed the WPF Controls Demo and got the same result, though not as apparent since the example doesn't contains as many items.

Have you experienced the same problem? Is there any way I can "slow down" the scroll?

If I use a regular WPF ComboBox instead of the RadComboBox, I don't have this problem. But I'd really prefer to use the RadComboBox if possible =)

Best Regards!

Stefan
Top achievements
Rank 1
 answered on 15 Aug 2019
7 answers
260 views

In reference to: https://www.telerik.com/blogs/how-to-boost-radgridview-performance-for-wpf-and-silverlight-using-lightweight-templates

 

I just discovered your new TELERIK COLOR THEME GENERATOR. (very cool by the way :-)

1) Are the "CHOOSE THEME" items the lightweight templates ?

2) If the answer to 1) is yes, will modifying anything in the tool increase the "weight" ?

3)The "Office2016Touch" template is almost a perfect match to our current color scheme, so we'd likely go with that...is it "lightweight" ?

 

Thanks in advance,

Barry

Martin Ivanov
Telerik team
 answered on 14 Aug 2019
2 answers
706 views

Hi,

I'm running into some problems applying new style & template settings to AutoCompleteBox.

I've read this article: https://docs.telerik.com/devtools/wpf/styling-and-appearance/styling-apperance-editing-control-templates,and I've created a simple default Telerik application that has only an AutoCompleteBox defined:

<Window x:Class="TelerikWpfApp1.MainWindow"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                Title="MainWindow" Height="350" Width="525">
        <Grid>
            <telerik:RadAutoCompleteBox />   
        </Grid>
</Window>

If I use VS to generate a copy of the required template (i.e. right-click the RadAutoCompleteBox, Edit Template ->Edit a Copy..., etc., I get this error message:

InvalidCastException: [A]Telerik.Windows.Controls.RadListBox cannot be cast to [B]Telerik.Windows.Controls.RadListBox. Type A originates from 'Telerik.Windows.Controls, Version=2019.2.618.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' in the context 'LoadNeither' at location 'C:\Users\WWill\AppData\Local\Microsoft\VisualStudio\16.0_789bb273\Designer\ShadowCache\gmfvgqnw.h3w\4sct5rze.jm2\Telerik.Windows.Controls.dll'. Type B originates from 'Telerik.Windows.Controls, Version=2019.2.618.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' in the context 'LoadFrom' at location 'C:\Program Files (x86)\Progress\Telerik UI for WPF R2 2019\Binaries\WPFRadF45\Telerik.Windows.Controls.dll'.

If, instead, I open the Telerik.Windows.Controls.Input.xaml file and copy the relevant RadAutoCompleteBox styles/templates into a resource dictionary in my application, I find a great many dependencies on other definitions in that file, which triggers a lot of "not found" reference errors.

So, I copied the entire ResourceDictionary from that file into my test app. Not too happy about copying 7,500 lines of code anywhere, but, hey, I'll try anything once. Unfortunately, I'm still getting errors, this time 28 of them in the form:

Severity Code Description Project File Line Suppression State
Error XDG0044 The local property "Columns" can only be applied to types that are derived from "RadUniformGrid". TelerikWpfApp1 App.xaml 5334 

As these did not stop me from building/running my app, I proceeded to modify my RadAutoCompleteBox definition as follows:

<telerik:RadAutoCompleteBox TextBoxStyle="{DynamicResource RadAutoCompleteTextBoxStyle}"/> 

This resulted in the following message:

InvalidOperationException: 'RadWatermarkTextBox' TargetType does not match type of element 'RadWatermarkTextBox'.

Again, this error doesn't stop me from compiling/running the app, but I thought I'd mention it in case it's an indicator

Finally, despite all the aforementioned errors, I am able to tweak the appearance of my RadAutoCompleteBox control, but I'm not feeling too good about it, as it seems like a very inelegant way to achieve a few visual tweaks.

Any advice for a newbie?

Wayne

 

 

n/a
Top achievements
Rank 1
 answered on 14 Aug 2019
4 answers
375 views

Hi!

I couldn't find any information about selecting which camera I want to use in RadWebCam. Any sample? Or is it not possible?

Also there should be a way to save and load the settings of a camera.Any hints?

Thanks

Rémi
Top achievements
Rank 1
 answered on 14 Aug 2019
2 answers
170 views

Why is performance so good for this control? I'm loading 23,000 search items into an ObservableCollection, and search response is almost instantaneous.

This may seem like an odd question, but in preparing to work with this control, I found a few online complaints about performance and a suggestion to trigger virtualization by setting the MaxHeight property of the inner ListBox, as follows:

<Style x:Key="AutoCompleteBoxStyle" TargetType="{x:Type toolkit:AutoCompleteBox}">
    <Style.Resources>
        <Style TargetType="{x:Type ListBox}">
            <Setter Property="MaxHeight" Value="200" />
        </Style>
    </Style.Resources>
</Style>

I found that this wasn't necessary, and as I hate mysteries, I'm wondering if Telerik has taken care of all performance issues (say by automatically triggering virtualization) since the time of the complaints.

If this isn't the case, and I can expect to run into performance problems with a larger number of search items, are there any standard techniques to address such eventual problems?

Wayne

n/a
Top achievements
Rank 1
 answered on 14 Aug 2019
3 answers
284 views
Hi.

I wonder two thing.

1. I want to set BarWidth.

In case of PointSeries, < Setter Property="PointSize" Value=.../>

But I don't look for that.

2. I want to set Color of BarSeries & PointSeries.

The color is 'Stroke' in LineSeries.

------------------------------------------------------------------------------------------

I want that setting is available property.
Martin Ivanov
Telerik team
 answered on 14 Aug 2019
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?