Telerik Forums
UI for WPF Forum
5 answers
323 views
This is a bit odd, as I would expect binding changes would be respected.  I'm not sure if it is a bug or not, but its definitely unexpected.

ZIndex is a DependencyProperty of the RadDiagramItem class.  Being read/write, I would expect that changes to the ZOrder would be reflected in the RadDiagram.  This is not the case.

If this is recognized as a bug, I have a repro project I can send along.

Given a type ModelItem with the following DependencyProperties:  Position, Width, Height, Color, and ZIndex (I'll omit that code as it is lengthy).

I have a custom graph which implements IGraphSource<ModelItem>, IObservableGraphSource (again, omitted for space) which I add three items to, which match the example found here.

public MainWindow()
{
    InitializeComponent();
    var graph = new TemplateGraph();
    graph.AddNode(new ModelItem
    {
        ZIndex = 3,
        Position = new Point(80, 120),
        Width = 150,
        Height = 150,
        Color = Colors.Red
    });
    graph.AddNode(new ModelItem
    {
        ZIndex = 2,
        Position = new Point(180, 120),
        Width = 150,
        Height = 150,
        Color = Colors.Green
    });
    graph.AddNode(new ModelItem
    {
        ZIndex = 1,
        Position = new Point(120, 20),
        Width = 150,
        Height = 150,
        Color = Colors.Blue
    });
    diagram.GraphSource = graph;
}

In the UI, I have a style which binds the relevant properties of each ModelItem to a RadDiagramShape.  

<Window.Resources>
    <Style
        TargetType="telerik:RadDiagramShape">
        <Setter
            Property="Position"
            Value="{Binding Position}" />
        <Setter
            Property="IsConnectorsManipulationEnabled"
            Value="False" />
        <Setter
            Property="Background">
            <Setter.Value>
                <SolidColorBrush
                    Color="{Binding Color}" />
            </Setter.Value>
        </Setter>
        <Setter
            Property="Geometry"
            Value="{telerik:CommonShape ShapeType=EllipseShape}" />
        <Setter
            Property="Width"
            Value="{Binding Width, Mode=TwoWay}" />
        <Setter
            Property="Height"
            Value="{Binding Height, Mode=TwoWay}" />
        <Setter
            Property="ZIndex"
            Value="{Binding ZIndex, Mode=TwoWay}" />
            <Setter
                Property="ContentTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <TextBlock
                            Text="{Binding ZIndex}" />
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
</Window.Resources>

Note that the shape's NormalContent displays the ZIndex.

Finally, I have a RadNumericUpDown that controls the ZIndex of the SelectedItem in the RadDiagram

<DockPanel>
    <telerik:RadNumericUpDown
        Value="{Binding SelectedItem.ZIndex, ElementName=diagram}" />
    <telerik:RadDiagram
        x:Name="diagram" />
</DockPanel>

I'll attach a screenshot that shows that, even though the ZIndex has changed, the order of shapes on the diagram has not.  In the screenshot, you can see that everything appears as it should be -- the ZIndexes of my models are correctly reflected in bindings of the RadDiagramShape, selection bindings work, and changes in the RadNumericUpDown are reflected in the bindings.

However,  changes to RadDiagramItem.ZIndex are completely ignored by the RadDiagram, both when initially added, and forever thereafter.  What's the point of the ZIndex property when it doesn't work?

If bug, you are hereby notified.  If not, you need this feature request.  Either way, I could use some help with a workaround.
Petar Mladenov
Telerik team
 answered on 06 Oct 2021
1 answer
270 views

Hey guys,

Some of my users want to print a GridView and write things in the printed Grid.
I know, dumb... 

The Export is currently done with this:

        public void PDFExport()
        {
            Telerik.Windows.Controls.GridView.IColumnFilterDescriptor tempFilter = ucEndtermintreueDaten.rgvEndtermintreueDaten.Columns["Ausblenden"].ColumnFilterDescriptor;
            tempFilter.DistinctFilter.AddDistinctValue(false);

            SaveFileDialog dialog = new SaveFileDialog();
            dialog.DefaultExt = ".pdf";
            dialog.Filter = string.Format("(*.{0})|*.{1}", "pdf", "pdf");
            dialog.FileName = "Endtermintreue " + MinDatum.ToString("dd.MM.yy") + "-" + MaxDatum.ToString("dd.MM.yy");

            var result = dialog.ShowDialog();
            if ((bool)result)
            {
                using (var stream = dialog.OpenFile())
                {
                    GridViewDocumentExportOptions options = new GridViewDocumentExportOptions()
                    {
                        ShowColumnHeaders = true,
                        AutoFitColumnsWidth = true
                    };
                    options.ExcludedColumns.Add(ucEndtermintreueDaten.rgvEndtermintreueDaten.Columns["Ausblenden"]);

                    ucEndtermintreueDaten.rgvEndtermintreueDaten.ExportToPdf(stream, options);
                }

                System.Diagnostics.Process.Start(dialog.FileName);
            }

            tempFilter.Clear();
        }

 

My problem is, that the rows are to small and the columns not wide enough to write something in it from hand if printed.
But I don't see any option to set the row height, and if I set AutoFitColumnsWidth to false it just cuts off the text in it.
Is it possible to set these options? 
Or maybe do I have to set the RowHeight and ColumnWidth in the element and revert it back to the original values after export?

Greetings Benedikt

Stenly
Telerik team
 answered on 05 Oct 2021
2 answers
198 views

Hi,

It seems that the scroll wheel is not working for first time. i can't scroll the mouse to move the scrollbar.

Andalso, how to make filter files working?

the problem is, after clear filter then scroll mouse work .. Am I missing something? 

2nd question:

Can I change this control width?

Vladimir Stoyanov
Telerik team
 answered on 05 Oct 2021
1 answer
263 views

When ShowGroupHeaderRowAggregates is left as True, the header aggregates are not appearing above the appropriate cells upon exporting to Excel (ExportToXlsx), but rather all scrunched together and an utterly useless mess. The RadGridView on the client looks correct as the following is set: ColumnAggregatesAlignment="NextToGroupKey" in the XAML.

What do we need to do to properly align the aggregate columns in the header for the Excel export functionality? Are there any solid examples of how to do this?

Thank you.

Dinko | Tech Support Engineer
Telerik team
 answered on 04 Oct 2021
1 answer
223 views

RadGridView has slow performance if grid with hierarchical data has huge children capacity (e.g. 2000 children for each node).
I'm waiting a lot of time for expand node, very slow scroll, application brings up a lot of memory.

Dinko | Tech Support Engineer
Telerik team
 answered on 04 Oct 2021
2 answers
296 views

Hi,

I am inserting watermark text in RadRichtextbox. Default behavior does not place watermark text in center of document. 

1. I want to place watermark text in center document and 45* rotation

2. In some situation, watermark is hidden by content. For example Picture, or any content that I insert in document hides watermark text. Is there anyway to keep watermark in front all the time.

Following my code to insert watermark, and attached behavior actual and what is expected.

 


WatermarkTextSettings textSettings = new WatermarkTextSettings();
 textSettings.Text =
@$"USER FULL NAME HERE
Designation Details
Current Organization
{DateTime.Now:MMMM dd\,yyyy HH:mm}";

            textSettings.RotateAngle = -45;
            textSettings.Opacity = .5;
            textSettings.ForegroundColor = Colors.Gray;
            textSettings.FontSize = 48;
            textSettings.FontFamily = new FontFamily("Bahnschrift");
           
            this.editor.SetWatermarkText(textSettings);

Kamran
Top achievements
Rank 3
Iron
Iron
Veteran
 answered on 01 Oct 2021
0 answers
152 views

Hello, we are using the RIchTextBox control and enabled the Caps Spell Checker. We are using PRISM MVVM pattern and using the PRISM  InteractionRequest to open dialog boxes.

We are using the version Telerik UI  for WPF 2021 _1_325

Please find the profiler memeory analysis, below.

This issue looks similar to the one identified in 2012, please see link below,

https://www.telerik.com/forums/spellchecker-not-releasing-memory

 

 

Ramesh
Top achievements
Rank 1
Iron
 asked on 01 Oct 2021
1 answer
255 views

Hello,

I'm trying to achieve the following result:

I'm creating my columns and column groups dynamically at runtime.

The thing is, say I'm creating columns in that order:

- Column0, GROUP0

- Column1, GROUP1

- Column2, GROUP0

- Column3, GROUP1

This will result in the following:

How to achieve the result shown in the first screen? (here column0 and column2 would be in GROUP0 and column1 and column3 in GROUP1)

I only want unique column groups, otherwise it doesn't quite make sense.

Thanks!

Martin Ivanov
Telerik team
 updated answer on 01 Oct 2021
1 answer
438 views

Hi Telerik Team,

I have used RAD:ListBox Control. I want to set the height of Listbox based on the height of the ListBoxItems of First 15items(Items Template I have used for Items Display). Any idea to implement this behavior.

Thanks,

Kishore Kumar

Dinko | Tech Support Engineer
Telerik team
 answered on 30 Sep 2021
1 answer
157 views

Hi 

I'm using the Fluent Theme and it causes a bit of problems with our Colorblind personel. 

Having the Red color together with the selected line gray color makes the text invisible for them. 

I therefore want to do a couple of things :

- Change the highlight color from Red to something else (Green maybe)

- Bold the Match highlight

I've managed to change the selectedline background but fail to figure out how i change the Match highlight. 

Can i get some help in that regards ?

I really suck at styling XAML and dont know how to do it other than i know i need to insert it into the APP.XAML file

Stenly
Telerik team
 answered on 29 Sep 2021
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?