Telerik Forums
UI for WPF Forum
0 answers
267 views

Hi,

in my application we have an ui which displays transaction data in it's raw form (XML Data), it's optional exception and a further content control with some parsed datails.

The structure of the RadWindow the following:

<UserControl x:Class="TransactionXmlDataView"
             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">

    <telerik:RadBusyIndicator x:Name="BusyIndicator">
        <Grid HorizontalAlignment="Stretch"
              Height="Auto"
              Width="Auto">

            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="1*" />
            </Grid.RowDefinitions>

            <ContentControl x:Name="ParsedTransactionDataViewer"
                            Visibility="{Binding HasParsedTransactionData, Converter={StaticResource BoolToVisibilityConverter}}" />

            <TextBlock Text="{Binding DisplayName}"
                       HorizontalAlignment="Left"
                       Grid.Row="1"/>


            <telerik:RadLayoutControl Grid.Row="2">
                <ContentControl x:Name="XmlDocumentFileViewer" Width="{Binding XmlViewerWidth}"/>
                <telerik:LayoutControlSplitter Visibility="{Binding ExceptionViewerVisible, Converter={StaticResource BooleanToVisibleCollapsedConverter}}"/>
                <TextBox x:Name="ExceptionText"
                         TextWrapping="Wrap"
                         IsReadOnly="True"
                         VerticalContentAlignment="Top"
                         Visibility="{Binding ExceptionViewerVisible, Converter={StaticResource BooleanToVisibleCollapsedConverter}}"/>
            </telerik:RadLayoutControl>
        </Grid>
    </telerik:RadBusyIndicator>
</UserControl>

Not all parts of the UI are always shown:

  • The ParsedTransactionDataViewer is optionally shown in the first row of the grid. The whole row is collapsed if there is nothing to show
  • The LayoutControlSplitter and the Textbox "ExceptionText" within the third row are optionally shown. When there is no Excpetion to show the Splitter and Textbox shall be collapsed

Only the ContentControl XmlDocumentFileViewer is always displayed. This ContentControl is a UserControl with another ContenControl inside which Content is Binding to an RadSyntaxEditor in the Code.

<UserControl x:Class="XmlDocumentFileViewerView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <ContentControl Width="Auto"
                    Height="{Binding ContentHeight}"
                    Content="{Binding XmlRadSyntaxEditor}" />
</UserControl>
The UI works perfectly well with smaller XMLs but with bigger ones (tested with ~24MB) the entire window and application freezes.

In regard to this I have found the follwoing article: SyntaxEditor inside a LayoutControl which points out that my SyntaxEditor looses the ability to virtualize... Followingly I tried the approach with a surrounding Canvas but still the UI freezes.

Addtionally I tried to simplify the application even more and making the width and height of the Syntax Editor fixed and defining it directly within xaml.

<UserControl x:Class="TransactionXmlDataView"
             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">

    <telerik:RadBusyIndicator x:Name="BusyIndicator"
                              Style="{DynamicResource InputRadBusyIndicatorStyle}">
        <Grid HorizontalAlignment="Stretch"
              Margin="10"
              Height="Auto"
              Width="Auto">

            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="1*" />
            </Grid.RowDefinitions>

            <ContentControl x:Name="XmlDocumentFileViewer" Width="1000" Height="1000"/>

        </Grid>
    </telerik:RadBusyIndicator>
</UserControl>

<UserControl x:Class="XmlDocumentFileViewerView"
             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">

    <telerik:RadSyntaxEditor
        x:Name="XmlEditor"
        IsReadOnly="True"
        AllowScaling="False"
        VerticalScrollBarVisibility="Visible"
        HorizontalScrollBarVisibility="Visible"
        Height="1000"
        Width="1000"/>
</UserControl>

Even with this very simplified UI the whole UI freezes when trying to load a ~20MB xml file.

Is there any solution to this problem? Or are these files simply to big to display?

Thanks a lot in advance for your help! I'm looking forward to your suggestions!



Margret
Top achievements
Rank 1
 updated question on 23 Aug 2022
1 answer
224 views

Hi,

I an using RadMaskedCurrencyInput control for taking number from input its work fine for using English Keyboard. The problem is when I change the system language to Japanese and enter number using NumPad, instead of new value replace with entered one, new value is concatenate with previous value. Like if 415 is already entered, I switch the Keyboard to Japanese  and select the previous entered value and type new number 325, Predication window is open and choose the number 325. After's electing value, our RadMaskedCurrencyInput  shows 325415 value instead of 325.
Please help me to resolve this.


Thanks in Advance.

Dilyan Traykov
Telerik team
 answered on 22 Aug 2022
1 answer
251 views

I've tried to combine the Telerik examples 'Dynamic RadMenu' with 'Switching themes at runtime'.
I've realized, that the subitems of the RadMenu do not change the theme (color) correctly.

I think that the ItemContainerStyle don't work correctly.

I've attached an example with two RadMenu.
First is created dynamically the second is static.

In the menu you can switch to different themes.
Please have look to the submenues (file). The color don't change.

I've also realized that also the size of the icons are displayed differently.

Stenly
Telerik team
 answered on 22 Aug 2022
0 answers
162 views

Hi,

I have created a RadGridView with a couple of columns (one of them being GridViewSelectColumn). I have also created a GroupDescriptor with GroupHeaderTemplate and I would like to add a GridViewCheckBox to the GroupHeaderTemplate, so I can select all items in a particular group by one click, however, the GridViewCheckBox is not enabled. I tried different properties on the control, but none of them works for me. 

If I add just a CheckBox then it works, but it does not have the style I need and I would not like to reproduce the Style already present on GridViewSelectColumn.

Can you advise how to enable the GridViewCheckBox ?

Thanks

            <telerik:RadGridView Grid.Row="1" ItemsSource="{Binding Collection}"
                                 AutoGenerateColumns="False"
                                 ShowGroupPanel="False"
                                 RowIndicatorVisibility="Collapsed"
                                 Padding="10"
                                 IsReadOnly="True"
                                 FrozenColumnsSplitterVisibility="Collapsed"
                                 IsFilteringAllowed="False"
                                 SelectionUnit="FullRow"
                                 SelectionMode="Extended">
                <telerik:RadGridView.GroupHeaderTemplate>

    <DataTemplate x:Key="SelectAllGroupHeaderTemplate">
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
            <telerik:GridViewCheckBox VerticalAlignment="Center" HorizontalAlignment="Center">

            </telerik:GridViewCheckBox>
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontWeight="DemiBold"
                       Margin="10 0 0 0"
                       Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor,
                                       AncestorType={x:Type telerik:GridViewGroupRow}},
                                       Path=Group.Key}" />
        </StackPanel>
    </DataTemplate>


                </telerik:RadGridView.GroupHeaderTemplate>
                <telerik:RadGridView.GroupDescriptors>
                    <telerik:GroupDescriptor Member="Id"
                                             SortDirection="Ascending" />
                </telerik:RadGridView.GroupDescriptors>
                <telerik:RadGridView.Columns>
                    <telerik:GridViewSelectColumn/>
                    <telerik:GridViewDataColumn Header="Date" MinWidth="150"
                                                DataMemberBinding="{Binding RollDate}" />
                    <telerik:GridViewDataColumn Header="ID" MinWidth="100"
                                                DataMemberBinding="{Binding Id}" />
                    <telerik:GridViewDataColumn Header="Name" MinWidth="220"
                                                DataMemberBinding="{Binding Name}" />
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>
        </Grid>

 

Lukasz
Top achievements
Rank 1
 updated question on 22 Aug 2022
0 answers
175 views

Hi,

I an using RadMaskedCurrencyInput control for taking number from input its work fine for using English Keyboard. The problem is when I change the system language to Japanese and enter number using NumPad , instead of new value replace with entered one, new value is concatenate with previous value. Like if 415 is already entered, I switch the Keyboard to Japanese  and select the previous entered value and type new number 325, Predication window is open and choose the number 325. After's electing value, our RadMaskedCurrencyInput  shows 325415 value instead of 325.
Please help me to resolve this.


Thanks in Advance.

Sajid
Top achievements
Rank 1
 asked on 22 Aug 2022
1 answer
253 views

Hi,

I use a RadGridView to display a collection of object. I use it for display only, no user input needed except for a button in the last column.

Why I use this control for such display and not a ListBox: a ListBox would require me to create an ItemTemplate but I need to keep constant columns width between my object properties so I can have a consistent alignment for all items. Also the columns should always be set to the largest control within it.

I remove most features that makes it look like a table: 

<telerik:RadGridView x:Name="radGridView"
                                 ItemsSource="{Binding Items}"
                                 ShowColumnHeaders="False" ShowGroupPanel="False"
                                 RowIndicatorVisibility="Collapsed"
                                 AlternateRowBackground="Transparent"
                                 AutoGenerateColumns="False"
                                 GridLinesVisibility="None"
                                 CanUserFreezeColumns="False" CanUserReorderColumns="False"
                                 CanUserSelectColumns="False">

I also set CanUserSelect="False" and  IsSynchronizedWithCurrentItem="False" but that didn't seem to work...

The last step would be to remove the selection and its display. I would like to remove the focus and color change when click on a row. I tried to set IsHitTestVisible = "False" but it prevent me to use my buttons in the last column.. 

                                

Any suggestions ?

Thank you for your help

Stenly
Telerik team
 answered on 19 Aug 2022
1 answer
403 views

Trying to upgrade my C# WPF application to the latest telerik version using the Upgrade Wizard,

It crash right after starting the upgrade with:

 

An error occurred while running the wizard.

Error executing custom action Telerik.Windows.WPF.VSX.Actions.MultiProjectUpdateReferencesAction: System.Runtime.InteropServices.COMException (0x80004005): This reference cannot be removed from the project because it is always referenced by the compiler.
   at VSLangProj.Reference.Remove()
   at Telerik.VSX.ProjectConfigurators.ApplicationReferenceManager.RemoveReferences()
   at Telerik.VSX.ProjectConfigurators.ApplicationReferenceManager.UpdateReferences()
   at Telerik.VSX.Actions.UpdateReferencesAction.UpdateReferences(IProjectWrapUIComponents projectWrap)
   at Telerik.VSX.Actions.MultiProjectActionBase`1.Execute(WizardContext wizardContext, IPropertyDataDictionary arguments)
   at Telerik.VSX.Actions.MultiProjectUpdateReferencesActionBase`1.Execute(WizardContext wizardContext, IPropertyDataDictionary arguments)
   at Telerik.VSX.WizardEngine.ActionManager.ExecActions()

 

Tried in VS2019 and VS2022, same results. Installed the latest Telerik extension from the VS Extension market.

Nikolay Mishev
Telerik team
 answered on 19 Aug 2022
1 answer
495 views

Hi,

I am unable to show the dynamic timer countdown in the GridView cell. 

can you please help me with the proper method. Refer to the attached video for more details.

 

Thank you

 

Stenly
Telerik team
 answered on 18 Aug 2022
0 answers
262 views

When I execute this code to open a window in the application, I see in the Diagnostic Tool that the window is cleaned

var dialog = new TestWindow();
dialog.Show();

<Window x:Class="BusinessModules.WfmModule.Views.TestWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        mc:Ignorable="d"
       Height="450" Width="800">
    <Grid/>
</Window>

public partial class TestWindow
{
    public TestWindow()
    {
        InitializeComponent();
    }
}

 

But if I change to RadWindow

 

<telerik:RadWindow x:Class="BusinessModules.WfmModule.Views.TestWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        mc:Ignorable="d"
       Height="450" Width="800">
    <Grid/>
</telerik:RadWindow>

I see that the window is not cleaned

This is after I opened it 18 times and of course closed all the windows

 

Would appreciate help

 

Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
 updated question on 18 Aug 2022
1 answer
166 views

When you use a MentionContext on a RadRichTextBox and you are on the last line of the text box, it does not pop open a Mention Context Menu when using the Context Character.  You have to hit a return to expand the box, and then move up a line, and then use the mention Character. 

Am I missing something or was this done by design? 

Is there a way to trick it into thinking it isn't the last line? 

Can it be fixed to possibly open upward instead of downward?  Since my example is only one line, an upward solution wouldn't work for me either.

 


Dimitar
Telerik team
 answered on 17 Aug 2022
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?