Telerik Forums
UI for WPF Forum
1 answer
101 views
Does an implict theme apply to a System.Windows.Window? I'm setting a dark variant to my theme and the System.Windows.Window is all white.
Martin Ivanov
Telerik team
 answered on 13 Jan 2023
1 answer
103 views

I cannot see any documentation or examples of how to scroll into a view items in a RadPanelBar. Are you able to provide an example of how to do this?

I've found a way to auto expand an item using <Setter Property="IsExpanded" Value="{Binding IsExpanded}" /> but this can expand an item which is still not visible and needs to be manually scrolled to. The IsSelected is similar but just seems to highlight that item and not scroll into view.

How can I auto scroll an item in the RadPanelBar into view using MVVM? Typically there may be approx 200 items but only 10 can be seen in view at any one time.

Code:


<telerik:RadPanelBar x:Name="radPanelBar1" Grid.Row="1" Width="500"
           HorizontalAlignment="Left" VerticalAlignment="Top"
           ItemTemplate="{StaticResource PanelBarHeaderTemplate}"
           ItemsSource="{Binding PanelBar1Items}"
           ExpandMode="Multiple">
      <telerik:RadPanelBar.ItemContainerStyle>
          <Style TargetType="telerik:RadPanelBarItem" BasedOn="{StaticResource RadPanelBarItemStyle}">
              <Setter Property="IsExpanded" Value="{Binding IsExpanded}" />
          </Style>
      </telerik:RadPanelBar.ItemContainerStyle>
</telerik:RadPanelBar>

 

Martin Ivanov
Telerik team
 answered on 12 Jan 2023
1 answer
142 views

I'm currently reviewing the latest trial WPF <PackageReference Include="Telerik.UI.for.Wpf.70.Xaml.Trial" Version="2022.3.1109" />

I'm trying to create a button with rounded edges and a different colour border. The standard WPF <Button /> works fine but the <telerik:RadButton  /> creates a white inner border and also seems to clip the background on the border edges

See attached example:

The bottom Radbutton has green clipping inside the border edges and an additional white border.

How do make the RadButton appear similar to the standard WPF button (I want it to look like button at top but using RadButton)?

Code:

<Window x:Class="TelerikWpfApp2.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">
    <StackPanel>
        <Button Content="Button" Height="100" Width="100" FontWeight="Bold" FontSize="18"
                Foreground="White"
                Background="Green"
                BorderBrush="Red"
                BorderThickness="5">
            <Button.Resources>
                <Style TargetType="Border">
                    <Setter Property="CornerRadius" Value="5"/>
                </Style>
            </Button.Resources>
        </Button>
        <telerik:RadButton Content="Button" Height="100" Width="100" FontWeight="Bold" FontSize="18" CornerRadius="5"
                           Foreground="White"
                           Background="Green"
                           BorderThickness="5"
                           BorderBrush="#FFFF0505"/>
    </StackPanel>
</Window>

Stenly
Telerik team
 answered on 12 Jan 2023
1 answer
168 views

Hello!

I have a ragGridView setup roughly as follows:

modelBuilder.Entity<TblCustomers>(entity =>
{
    ...

    entity.Ignore(e => e.Errors);
});

public partial class TblCustomers
{
    ...

    [NotMapped]
    public string Errors { get; set; }
}

void SetupRGV()
{
    var options = new DbContextOptionsBuilder<Test_Context>();
    options.UseSqlServer(GlobalState.ConnectionString);

    TestContext = new Test_Context(options.Options);

    var view = new QueryableEntityCoreCollectionView<TblCustomers>(TestContext, TestContext.TblCustomers, new Collection<string>() { });
    rgvGrid.ItemsSource = view;
}

This works fine, loads and works as expected, and I can fill the unmapped "Errors" field as need be. However, when I click the top of the "Errors" column in the grid to sort, it throws an Exception (see below), tells me I should set up explicit client evaluation and points me at this Microsoft article: https://learn.microsoft.com/en-ca/ef/core/querying/client-eval. I get the following error:

The LINQ expression 'DbSet<TblCustomers>()
    .OrderBy(t => t.Errors)' could not be translated.

Additional information: Translation of member 'Errors' on entity type 'TblCustomers' failed. This commonly occurs when the specified member is unmapped. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'.

I did try that, and tried to unmap/ignore the field outright so that it wouldn't be sent to the server, but my problem persists.

I can intercept the sorting event and just cancel it when the Errors column is touched, but I'd really prefer to be able to sort by an unmapped field. Could I intercept the filtering event instead?

Is this something that a RadGridView can do for me using that approach I'm taking, or am I simply out of my depth? If I'm just on the wrong track entirely, just let me know and I'll continue researching - no need to provide a custom solution just for this.

Thanks!

Lee

Dilyan Traykov
Telerik team
 answered on 11 Jan 2023
1 answer
181 views

When using the OpenFileDialog to browse for image files using large icons, the images are not displayed with their thumbnail previews, but rather the generic image placeholder.  Is there a way to show the thumbnail previews like Windows file explorer?

Martin Ivanov
Telerik team
 answered on 10 Jan 2023
0 answers
225 views

Hi, I have a RadTabControl with 5 tabs and one RadGridView on each tab.

When I switch the tab  it takes1-2 seconds to show the grid on first time. After that, the tab switch is fast and the grid is shown accordingly.

I configured row and column virtualization, set widh and height to all the elements and followed your Tip and Tricks guide.

I was wondering how can I speed up the render on first time or, force the rendering on application startup.

If the grid is draw on background, I suppose that the first time I will switch a tab, it will be faster.

Then I can move the code to an attached property called RenderOnStartup.

 

Thank you.

alex
Top achievements
Rank 2
Bronze
Iron
Iron
 updated question on 10 Jan 2023
2 answers
126 views

I have a MapPinPoint, and I want to insert it inside an Ellipse dynamically

How can this be done?

Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
 answered on 08 Jan 2023
1 answer
106 views
I have found what I believe is a bug in the PDF Processing library in which the resulting PDF does not "match" the contents of the PDFs imported into it. I have created a very simple example in which I attempt to import a single PDF document into another PDF using the PdfStreamWriter class and associated classes. I also tried using the PdfFormatProvider and receive the same results.

A few things to note regarding the original PDF being used: it was generated from a Telerik Report using the ReportProcessor's RenderReport method. So, this PDF was created entirely through Telerik libraries and I would expect that it should be able to be imported into another PDF document unaltered using the Telerik PDF Processing library.

But, in the example provided, if you click the First button, the application will open the PDF being used so you can see what it should look like. Notice the table on the first page is completely filled in. Clicking the second button attempts to import the original source PDF into a temporary file and displays that result: notice in this case, the table on the first page is missing some of the data that appears in the original.

As I have tried both the PdfStreamWriter and PdfFormatProvider classes with the exact same results, I am at a loss as to what is wrong. I would expect that the results should be the exact same since everything was created using Telerik libraries...
Martin
Telerik team
 answered on 06 Jan 2023
1 answer
89 views

Hi, 

I can't find events such as cellClick cellDoubleClick in GridView for wpf, is there anyway subcribing them WinForm style? thanks

 

PS: I think its better if I discribe more details

1.I'm work on  a file managing system, these is a GridView displaying all the files

2.different context menu should appear depending on where right click happens,  so I have to know if the user right click on a row or on a empty space. But I can't find events like cellClick, there is a event named MouseDown in RadGridView but I don't know what's under the cursor.

Martin Ivanov
Telerik team
 answered on 05 Jan 2023
1 answer
122 views

Hi everybody,

I'd like to  to display the correlation between filters in FilterControl. I managed it by path and resources and customizing it although I can't make it more clear since some properties in FilterViewModel are internal and don't have access to children and parent in some scenarios.

The picture is attached

Is there any smooth solution to do that?

Thanks

Martin Ivanov
Telerik team
 answered on 04 Jan 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?