Telerik Forums
UI for WPF Forum
0 answers
82 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
84 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
83 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
122 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
64 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
116 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
335 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
76 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
100 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
0 answers
54 views
I have a button which inserts a table.


myRichTextBox.InsertTable(2,4)

I want to modify some properties on the table after it is inserted.

I want to set fontsize, fontfamily, change border and cell color to RED and make it so that the table will always fill the available width. Is this a possibility? Or do I have to manually build out the entire table and insert at cursor location?
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
 asked on 17 Jun 2024
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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?