Telerik Forums
UI for WPF Forum
1 answer
77 views

There is some display error in the png,but someother UI display right Chinese.

What would be the cause?

Thanks。

Martin Ivanov
Telerik team
 answered on 08 Mar 2018
1 answer
78 views
Hi, RichTextBox is not the list of supported controls for CodedUI, can we expect the support in future, if yes? What could be the
Tanya
Telerik team
 answered on 08 Mar 2018
1 answer
87 views

Hello!

I accidentally click the release button so that "https://www.telerik.com/forums/ribbonwindow-no-transparent", I want to help delete it.

 

I use the Material theme in my RibbonWindow.

When I Producing my program.The window has a White border.

I compare it to demo,It seems to be a shadow, but it's no transparent.

I tried to modify the transparency of the window. The window was not transparent, and all the colors were white.

I think the problem is that transparency is replaced by white, what should I do to correct this problem

 

Martin Ivanov
Telerik team
 answered on 07 Mar 2018
1 answer
107 views

When the PDFViewer is using FixedDocumentPagesPresenter it tends to change position (it jumps to different pages) when a page is rotated and the same thing can also occur when zooming in/out.

To see this, simply open any PDF with more than a few pages - the one I'm currently testing with has 18 pages, move away from the first few pages (e.g. go to page 12), and rotate the page. The position jumps several pages and is restored if you rotate 360 degs.  In my test doc, it jumps to page 16 when rotated 90 / 270 degrees and back to page 12 when rotated 0 / 180 degrees.

There's a similar problem when zooming in, but I think you need a document with a few hundred pages to see this.

It all seems to be fine when using FixedDocumentSinglePageViewPresenter.

Any chance you can fix this?

Thanks.

Deyan
Telerik team
 answered on 07 Mar 2018
3 answers
724 views
I would like to determine how many distinct values are shown in a grid column after filtering is applied.

The filter parameter (true) in grid.GetDistinctValues(column, true, null) considers the other columns (but not the specified column).  So this method returns every distinct value for the considered column and is not restricted to just those distinct values that are actually shown in the column as a result of the filtering currently applied to that column as well as to the other columns.

So this method doesn't suit my purpose.

I would like to know the number of distinct values actually shown in a column to support the following two scenarios.  (1) If there are zero distinct values displayed in a column, then the last filtering operation over-constrained the result set and can be undone (with user notification).  (2) If there is only one distinct value, then the column can be hidden and the column-header/single-unique-value pair can be transferred to a "common values" grid.

This approach works well with our datasets.  As the user applies filtering operations, an 8000 row, 65 column datasource typically gets reduced to about 20 rows and 5 to 10 columns each containing more than one distinct value.  All other single-valued columns are displayed in an adjacent common-values grid.

In the grid.FilterDescriptors.CollectionChanged event, I invoke the method which consolidates the common-values.  For this method, I need to know if there is only one distinct value.

Many thanks!
jamsheer
Top achievements
Rank 1
Veteran
 answered on 07 Mar 2018
0 answers
127 views
I Have a WindowsService project.In this service when I render any UserControl, the png file is empty.

for test i write the following code to export a TextBlock but result is an empty png file.

protected override void OnCustomCommand(int command)
{
    Export();

    base.OnCustomCommand(command);
}

private void Export()
{
    var thread = new Thread(() =>
    {

        var grid = new Grid();
        grid.Children.Add(new TextBlock() { Text = "ExportTest", FontSize = 60, Background = Brushes.Red, Foreground = Brushes.Blue });
        double widthg = grid.Width > 0 ? grid.Width : 1024;
        double heightg = grid.Height > 0 ? grid.Height : 768;
        grid.Measure(Size.Empty);
        grid.Measure(new Size(widthg, heightg));
        grid.Arrange(new Rect(0, 0, widthg, heightg));
        grid.UpdateLayout();

        var bitmap = new PngBitmapEncoder();
        ExportExtensions.ExportToImage(grid, @"..\ExportTest.png", bitmap);
    });

    thread.SetApartmentState(ApartmentState.STA);
    thread.Start();
    thread.Join();
}

Note: when I run the export function in wpf project, it works perfect.

there is my project:
http://www.mediafire.com/file/aij5sg4zx80yc73/ExportProject.rar
any body can help me?
Ahmad
Top achievements
Rank 1
 asked on 06 Mar 2018
2 answers
71 views

It seems like there's a limitation to Cluster locations and a bug regarding its Bounds. I noticed that the location of a Cluster is always at the location of the first item added to it. I would expect that it actually would be at the center of all added items. Looking at the ClusterData.Add method it seems like it would be easy to update the Cluster-location there since the bounds are updated each time a new item is added. I tried solving it by overriding the DefaultClusterGenerator like the code below, but then I noticed that the calculation for the Bounds are actually wrong in the ClusterData.Add method. The last Math.Min should be a Math.Max. In the end I had to calculate the Bounds myself, and then update the Cluster Location.

 

public class ClusterGenerator : DefaultClusterGenerator
 
{
    public override ClusterData CreateCluster(Location center, object item)
    {
        var clusterData = base.CreateCluster(center, item);
        clusterData.AutoCalculateBounds = true;
 
        clusterData.PropertyChanged += this.ClusterDataOnPropertyChanged;
        return clusterData;
    }
    private void ClusterDataOnPropertyChanged(object sender, PropertyChangedEventArgs args)
    {
        // Check if an item has been added or removed
        if (args.PropertyName == nameof(ClusterData.Count))
        {
            var clusterData = sender as ClusterData;
            if (!clusterData.Bounds.IsEmpty)
            {
                clusterData.Location = clusterData.Bounds.Center;
            }
        }
    }
}
Petar Mladenov
Telerik team
 answered on 06 Mar 2018
10 answers
116 views

Your Q1 2016 example references the "MyFilterDescriptorBindingBehavior" in the "Example.xaml" file of the "DataFilter.Default Filter Editors" example.  However, that is nowhere to be found.

I need to add a FilterDescriptor using code that is displayed in the control for the user to interact with.  This seems like the example that would cover the scenario but the documentation is incomplete.  Can you help me with this?

 Joel

Stefan
Telerik team
 answered on 06 Mar 2018
1 answer
91 views
I want to have a slightly different edit behavior depending on what the edit trigger is, e.g. F2/click vs just typing. Is there anyway to determine this information with the objects and events available?
Vladimir Stoyanov
Telerik team
 answered on 06 Mar 2018
1 answer
106 views

I have a RadTreeView built using Hierarchical self-referenced data, positioned within a popup. There is an EventToCommandBehaviour built within the Tree exactly as:https://www.telerik.com/forums/doubleclick-in-mvvm-databound-treeview

I am getting no response at all from the event, if I change the control to a ListBox then the event triggers?

Can anyone shed any light on what could be happening.

I have tried various EventName's [Selected, MouseLeftButtonUp, ItemClick, ItemDoubleClick...] nothing triggers it on the RadTreeView

Positioning the Tree directly onto the Page, outside of the Popup - there is still no response to the Event.

 

Martin Ivanov
Telerik team
 answered on 06 Mar 2018
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?