Telerik Forums
UI for WPF Forum
2 answers
111 views

Within my dategrid itemsource I have some properties that basically act as IValueConverters to lookup a string in a dictonary by using and int.

 Public ReadOnly Property ReifenIdHintenBezeichnung As String
            Get
                If Fahrzeug.ReifenIdHinten.HasValue Then
                    Return _reifenDict(Fahrzeug.ReifenIdHinten.Value)
                Else
                    Return String.Empty
                End If
            End Get
        End Property

these columns are bound to a datatemplate that acts as cellTemplate for a combobox like this:

<DataTemplate><TextBlock Text="{Binding ReifenIdHintenBezeichnung }" /></DataTemplate>

(the whole idea to use a value converter with a dictonary was inspired by this https://feedback.telerik.com/wpf/1352336-slow-scrolling-when-a-gridviewcomboboxcolumn-is-bound-to-a-large-dataset) but as I need to create columns dynamically, I ended up with this property (and for the truely dynamic part properties with a parameter - but that's not the issue).

I noticed that the property is called everytime I scroll down one row for the following row. so one row is cached but not the row afterwards. 

My question is if there is a way to use virtualization in such a way that say 20 rows and 10 columns are prefetched (async at best) to increase performance.

If you got any other suggestions on how to improve scolling performance with Comboboxes, i'm happy to read them. I already applied most tips mentioned here:https://docs.telerik.com/devtools/wpf/controls/radgridview/performance/tips-tricks

 

thanks for your help!

Jan

 

Jan
Top achievements
Rank 1
 answered on 27 Jun 2019
3 answers
616 views

Hello,
I have a RadGridView and I am filling it with data and styling it in the ViewModel of my wpf app.
I have the following code:

FontSizeConverter myFontSizeConverter = new FontSizeConverter();
Style headerStyle = new Style(typeof(GridViewHeaderCell));
headerStyle.Setters.Add(new Setter(HeaderedContentControl.HorizontalContentAlignmentProperty, System.Windows.HorizontalAlignment.Left));
headerStyle.Setters.Add(new Setter(HeaderedContentControl.BackgroundProperty, (Brush)(new BrushConverter().ConvertFrom("#546E7A"))));
headerStyle.Setters.Add(new Setter(HeaderedContentControl.ForegroundProperty, (Brush)(new BrushConverter().ConvertFrom("#ffffff"))));
headerStyle.Setters.Add(new Setter(HeaderedContentControl.FontWeightProperty, FontWeights.Bold));
headerStyle.Setters.Add(new Setter(HeaderedContentControl.FontSizeProperty, (Double)myFontSizeConverter.ConvertFromString("12")));

 

var headerIsMouseOverTrigger = new Trigger();
headerIsMouseOverTrigger.Property = UIElement.IsMouseOverProperty;
headerIsMouseOverTrigger.Value = true;

var headerIsMouseOverStyle = new Style(typeof(GridViewHeaderCell));
headerIsMouseOverStyle.Setters.Add(new Setter(HeaderedContentControl.HorizontalContentAlignmentProperty, System.Windows.HorizontalAlignment.Left));
headerIsMouseOverStyle.Setters.Add(new Setter(HeaderedContentControl.BackgroundProperty, (Brush)(new BrushConverter().ConvertFrom("#546E7A"))));
headerIsMouseOverStyle.Setters.Add(new Setter(HeaderedContentControl.ForegroundProperty, (Brush)(new BrushConverter().ConvertFrom("#ffffff"))));
headerIsMouseOverStyle.Setters.Add(new Setter(HeaderedContentControl.FontWeightProperty, FontWeights.Bold));
headerIsMouseOverStyle.Setters.Add(new Setter(HeaderedContentControl.FontSizeProperty, (Double)myFontSizeConverter.ConvertFromString("12")));

headerIsMouseOverTrigger.Setters.Add(new Setter(GridViewHeaderCell.StyleProperty, headerIsMouseOverStyle));
headerStyle.Triggers.Add(headerIsMouseOverTrigger);

 

var name = new GridViewDataColumn()
{
DataMemberBinding = new Binding("Name"),
IsReadOnly = true,
IsFilterable = false,
IsResizable = false,
Width = 210.0D,
Header = base.GetText(2615),
HeaderCellStyle = headerStyle,
Tag = "NotSelected"
};

What I am trying to accomplish is not to change the background of the column header  when the mouse is over it. Can you tell me what I am doing wrong and how to make the desired effect? Thank you :)



Vladimir Stoyanov
Telerik team
 answered on 27 Jun 2019
2 answers
121 views

Hi Telerik,

 

I'm using TreeListView and I want to know if the control is able to use ColumnGroup like is possible for a GridView ?

For each column, is possible to specify the ColumnGroupName property but it is not considered.

 

Thank you !

 

Valentin
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 27 Jun 2019
1 answer
117 views

Hi,

I'm using ObservableGraphSourceBase and NodeViewModelBase with a StyleSelector to render the shapes. Nice. But I want my shapes to have connectors in certain positions dependent on the view model. How can I do this?

In my case the shapes are rectangular with the left connectors being inputs and the right connectors being outputs. For a type 'A' NodeViewModel I want the shape to have 2 input connectors (left), no top or bottom connectors, and one right connector.

I can add/remove connectors on a drag and drop or edit event ... but how do I create the shape, via a style, with the connectors defined by the NodeViewModel?

Thanks

Martin Ivanov
Telerik team
 answered on 26 Jun 2019
3 answers
138 views

 

I have 4 machines 2 Dev with VS / Telerik and 2 Test both are clean Win 10 machines. When I run the project below in Dev it works perfectly but in Test the theme get's all screwed up and goes mostly transparent.

 

I have tried this with couple of other themes and it works fine and I have tried it with the Tab Control rather than the TabbedWindow and that also works. It looks like a combination of Fluent and TabbedWindow breaks.

 

To recreate, make a simple 1 page App, add the TabbedWindow and some content, then set the Fluent Theme in the code behind. 

You have to test this on a "clean" machine, without VS or Telerik installed for it to break.

 <Grid>
  <telerik:RadTabbedWindow >
     <telerik:RadTabbedWindow.Items>
          <telerik:RadTabItem Header="Test Tab">
                <telerik:RadGridView />
          </telerik:RadTabItem>
      </telerik:RadTabbedWindow.Items>
   </telerik:RadTabbedWindow >
 </Grid>

 

public MainWindow()
        {
            StyleManager.ApplicationTheme = new FluentTheme();
            InitializeComponent();
        }

 

Dinko | Tech Support Engineer
Telerik team
 answered on 26 Jun 2019
1 answer
101 views

Hey,

currently I'm trying to implement the RadExpressionEditor for creating custom Grid view groups. Everything is working fine besides the ExpressionChanged event of the RadExpressionEditor. The event is not called every time the expression changed. If I enter the following expression:

"Sample: " + GetFormattedField("1282", "N2")

Expression changed is called.

if I remove the last bracket ExpressionChanged gets fired and the expression is invalid (this behaviour is correct). If I add the bracket again, ExpressionChanged IS NOT fired. This behaviour occurse in different scenarios. This makes it difficult to trust the system, because we have a lot of invalid expressions, even a valid expression is entered.

Thank you!

Ivan Petrov
Telerik team
 answered on 26 Jun 2019
0 answers
130 views

As image attached ,when item is dragged for reorder,drag indicator is cover whole column(as red box shown) but not specific column and row(as green box shown).Is there are some workaround to fix that? 

<Window.Resources>
        <Style x:Key="DraggableListBoxItem" TargetType="telerik:RadListBoxItem">
            <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True"/>
        </Style>
    </Window.Resources>
 
<telerik:RadListBox x:Name="scanList" KeyboardNavigation.DirectionalNavigation="None" KeyboardNavigation.AcceptsReturn="False" ItemsSource="{Binding Path=Scans,Mode=TwoWay}" SelectionMode="Multiple"  ScrollViewer.VerticalScrollBarVisibility="Hidden" ScrollViewer.HorizontalScrollBarVisibility="Disabled" CanKeyboardNavigationSelectItems="False" ItemContainerStyle="{StaticResource DraggableListBoxItem}">
        <telerik:RadListBox.DragDropBehavior>
            <telerik:ListBoxDragDropBehavior telerik:TouchManager.DragStartTrigger="TouchMove"/>
        </telerik:RadListBox.DragDropBehavior>
        <telerik:RadListBox.ItemsPanel>
            <ItemsPanelTemplate>
                <telerik:VirtualizingWrapPanel/>
            </ItemsPanelTemplate>
        </telerik:RadListBox.ItemsPanel>
        <telerik:RadListBox.ItemTemplate>
            <DataTemplate>
                <Grid>
                    <Image Source="test.jpg" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    <Image HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="48" Height="48" Opacity="0.15" Source="/ePresort;component/Icon/edit.png" />
                    <Label Content="{Binding Path=ScanId,Mode=TwoWay}"/>
                </Grid>
            </DataTemplate>
        </telerik:RadListBox.ItemTemplate>
    </telerik:RadListBox>

PS: ItemHeight and ItemWidth of VirtualizingWrapPanel is set by C# code

     

David Yeung
Top achievements
Rank 1
 asked on 26 Jun 2019
5 answers
174 views
When drop the item into Expander-listbox, the indicator will show at the first row, however the item is insert into last row. Please have a look at the attached screenshot
Vladimir Stoyanov
Telerik team
 answered on 25 Jun 2019
1 answer
151 views

Hi. Not sure if this is the place to ask this.

I have a WPF scheduler app built around this scheduleview.

If I want to migrate it to .net core (asp.net), is there a migration path? 

Are the features equivalent? How can I find out how difficult could this be?

Thanks in advance.

Dinko | Tech Support Engineer
Telerik team
 answered on 25 Jun 2019
6 answers
186 views

Hello all,

How can I replace contents using RadRichTextBox/RadDocumentEditor without moving the RadDocument.Selection to the range I want to change?

Moving and restoring the selection seems to work will scroll the document to the new selection position, which is undesired.

After going through similar posts, I found that I can insert content at an arbitrary location using the InsertFragment(DocumentFragment, DocumentPosition) method, but no way to replace a whole range (e.g. defined by two DocumentPosition instances) or even delete the contents of an such a range.

Yiannis
Top achievements
Rank 1
 answered on 24 Jun 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?