Telerik Forums
UI for WPF Forum
0 answers
19 views
How is it possible to display main and secondary data records in a RadGridView not using the hierarchy options, but rather to design it in such a way that the main columns extend over the corresponding rows of the secondary data records via RowSpan, whereby both main and secondary data records have multiple columns?
Daniel
Top achievements
Rank 1
Iron
 asked on 25 Jun 2024
0 answers
13 views
I created a new WPF project in Visual Studio 2022 - opened the XAML, dropped a RadButton.  Nothing appeared.  Where did it go?  When I did the same steps in Visual Studio 2019 I see the button all right.
Marianne
Top achievements
Rank 1
Veteran
 asked on 24 Jun 2024
0 answers
15 views
I have an RTB control and I do not want horizontal scroll bar to ever show. When a user inserts or copies in an image, I would like the image to always only ever fill the width of the RTB and never exceed it. Increasing height, is fine, vertical scrolling is acceptable in this instance.

Is this a possibility? I am able to do it with tables.
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
 asked on 24 Jun 2024
0 answers
14 views
I have to react to the RadGridView's LostFocus event with a handler. Unfortunately, I discovered that the event is also triggered at unexpected times. What is particularly surprising is that scrolling with the scroll bar has no effect, but scrolling with the mouse wheel immediately calls the handler. And it does this without clicking the mouse and leaving the control. What could be the reason for this, or how can I get around it? The actual case that should be reacted to is when either another item of it is selected or the entire RadGridView loses focus by focusing on a control outside of it. Simply checking e.OriginalSource.GetType() == typeof(GridViewCell) doesn't help here either, as this is often the case when clicking on another control. And IsScrolling is also constantly false.Does anyone have any ideas?
Daniel
Top achievements
Rank 1
Iron
 updated question on 24 Jun 2024
0 answers
14 views

I created a class with CommunityToolkit.Mvvm package and use ObservableProperty to create properties for this class. But the PropertyGrid  control does not recognize properties created in this way. Are there any way PropertyGrid  can support ObservableProperty?


using CommunityToolkit.Mvvm.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace Test
{
    public partial class DrawingModel : ObservableObject
    {
        public string Name { get; set; }

        [ObservableProperty]
        public double _length;


        [ObservableProperty]
        public double _width;

        [ObservableProperty]
        public double _height;
    }
}

Jian
Top achievements
Rank 1
 asked on 24 Jun 2024
1 answer
16 views

Please see attached image. What could be the cause of this? Some Fonts missing?

I'm using StyleManager for Theming.

Stenly
Telerik team
 answered on 20 Jun 2024
2 answers
22 views
I have a XAMLDataProvider that is binding a string property to a RadRichTextBox.

I want to be able to bind the content of the RadRichTextBox to a string (which I have done) and then once a save button is pressed, I need to run some code similar to this.
Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.DocxFormatProvider provider = new Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.DocxFormatProvider();
RadDocument document = new RadDocument(string myXAMLString);
byte[] output = provider.Export(document);

Essentially I need to be able to bind a property from the ViewModel to RadRichTextBox..... which I am doing with XAML data provider.

Then after a save button is clicked, I take the property which is a string and I need to create a RadDocument from the string that represents that and export that document to a byte[].

Is there an easier and better way to be doing this?

Thanks!
Matt
Top achievements
Rank 1
Iron
 answered on 20 Jun 2024
1 answer
25 views
It is not in Telerik.Windows.Controls.dll for WPF70 2024.2.514.70
Dimitar
Telerik team
 answered on 20 Jun 2024
2 answers
16 views

Hi,

i found a sample:


    <Window.Resources>
        <local:DoubleToDateTimeLabelConverter x:Key="DoubleToDateTimeLabelConverter" />
    </Window.Resources>
    <Grid>
        <telerik:RadCartesianChart>
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:LinearAxis>
                    <telerik:LinearAxis.LabelTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding StringFormat='h:MM tt', Converter={StaticResource DoubleToDateTimeLabelConverter}}" />
                        </DataTemplate>
                    </telerik:LinearAxis.LabelTemplate>
                </telerik:LinearAxis>
            </telerik:RadCartesianChart.HorizontalAxis>
            
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:CategoricalAxis />
            </telerik:RadCartesianChart.VerticalAxis>
            
            <telerik:LineSeries CategoryBinding="City" ValueBinding="StartTimeOA" ItemsSource="{Binding}" />
        </telerik:RadCartesianChart>
    </Grid>


        public MainWindow()
        {
            InitializeComponent();

            var Items = new ObservableCollection<PlotItemViewModel>();
            var dateTime = DateTime.Now;
            Items.Add(new PlotItemViewModel() { City = "Atlanta", StartTime = dateTime.AddMinutes(5) });
            Items.Add(new PlotItemViewModel() { City = "Atlanta", StartTime = dateTime.AddMinutes(10), });
            Items.Add(new PlotItemViewModel() { City = "New York", StartTime = dateTime.AddMinutes(100), });
            Items.Add(new PlotItemViewModel() { City = "Miami", StartTime = dateTime.AddMinutes(120), });
            Items.Add(new PlotItemViewModel() { City = "Miami", StartTime = dateTime.AddMinutes(150), });
            Items.Add(new PlotItemViewModel() { City = "Savannah", StartTime = dateTime.AddMinutes(200), });
            Items.Add(new PlotItemViewModel() { City = "Birmingham", StartTime = dateTime.AddMinutes(250), });
            Items.Add(new PlotItemViewModel() { City = "New Orleans", StartTime = dateTime.AddMinutes(280), });

            this.DataContext = Items;
        }
    }

    public class PlotItemViewModel
    {
        public string City { get; set; }
        public DateTime StartTime { get; set; }
        public double StartTimeOA { get { return this.StartTime.ToOADate(); } }
    }

    public class DoubleToDateTimeLabelConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            double doubleValue = double.Parse(value.ToString());
            return DateTime.FromOADate(doubleValue);
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }

The Result is:

Here is the Dateformat "us-US" (10:05 AM / 4:06 PM) but i need German "de-DE" (10:05 / 16:06) !

Have anyone a idea how i can do this?

Best regards

Bernd

 

 

BerndR
Top achievements
Rank 1
Iron
 answered on 19 Jun 2024
1 answer
14 views
We have the similar problem on 2024.1.228.45
https://www.telerik.com/forums/gridview-celleditended-returns-null-data-properties-for-custom-column

Is there any solution to get NewData and OldData on OncellEditEnded for a custom column?
Martin Ivanov
Telerik team
 answered on 18 Jun 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Michael
Top achievements
Rank 2
Iron
Wilfred
Top achievements
Rank 1
Alexander
Top achievements
Rank 2
Iron
Iron
Matthew
Top achievements
Rank 1
Iron
ibra
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Michael
Top achievements
Rank 2
Iron
Wilfred
Top achievements
Rank 1
Alexander
Top achievements
Rank 2
Iron
Iron
Matthew
Top achievements
Rank 1
Iron
ibra
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?