Telerik Forums
UI for WPF Forum
1 answer
105 views

Hi,
We are trying to port the existing .net framework WPF application with Telerik packages to .net Core WPF application. And we are using the Telerik latest stable version for the .net framework. While checking for Portability analysis we found some of the assemblies are missing in .net Core.
  Telerik.Windows.Controls
  Telerik.Windows.Controls.Diagrams 
  Telerik.Windows.Controls.GridView 
  Telerik.Windows.Controls.Input 
  Telerik.Windows.Controls.Navigation
  Telerik.Windows.Controls.RibbonView 
  Telerik.Windows.Data
  Telerik.Windows.Diagrams.Core 
Kindly help us out in this issue.

 

Thank you

Vladimir Stoyanov
Telerik team
 answered on 04 Mar 2020
4 answers
848 views

Hi,

why is this working:

<telerik:RadRibbonWindow
    x:Class="N4W.App.GuiLayer.Modules.OperatingCostsModule.Views.ProceedTest"
    xmlns:local="clr-namespace:N4W.App.GuiLayer.Modules.OperatingCostsModule.Views"
    mc:Ignorable="d" Height="200" Width="400"
    d:DesignHeight="450" d:DesignWidth="800">
 
    <telerik:RadRibbonWindow.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <!--<ResourceDictionary>
                    <Style TargetType="local:ProceedTest" BasedOn="{StaticResource RadRibbonWindowStyle}" />
                </ResourceDictionary>-->                                          
 
                <ResourceDictionary Source="RibbonWindowStyle.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </telerik:RadRibbonWindow.Resources>
    <Grid>
        <TextBlock Text="Hallo" />
    </Grid>
</telerik:RadRibbonWindow>

where the content of RibbonWindowStyle.xaml is:

                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:N4W.App.GuiLayer.Modules.OperatingCostsModule.Views"
                    >
     
    <Style TargetType="local:ProceedTest" BasedOn="{StaticResource RadRibbonWindowStyle}" />
 
</ResourceDictionary>

pic RadWindow2.jpg

 

and this is not working:

<telerik:RadRibbonWindow
    x:Class="N4W.App.GuiLayer.Modules.OperatingCostsModule.Views.ProceedTest"
    xmlns:local="clr-namespace:N4W.App.GuiLayer.Modules.OperatingCostsModule.Views"
    mc:Ignorable="d" Height="200" Width="400"
    d:DesignHeight="450" d:DesignWidth="800">
 
    <telerik:RadRibbonWindow.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary>
                    <Style TargetType="local:ProceedTest" BasedOn="{StaticResource RadRibbonWindowStyle}" />
                </ResourceDictionary>                                          
 
                <!--<ResourceDictionary Source="RibbonWindowStyle.xaml" />-->
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </telerik:RadRibbonWindow.Resources>
    <Grid>
        <TextBlock Text="Hallo" />
    </Grid>
</telerik:RadRibbonWindow>

pic RadWindow1.jpg

 

For me both versions should end up in the same result, or what is the difference?!

 

BR Gert

 

 

 

 

 

Gert
Top achievements
Rank 1
 answered on 04 Mar 2020
8 answers
166 views

I am using the latest release. I have this code -- I even tried manually forcing the selection, but it didn't help any:

Workbook spreadsheetWorkbook = new XlsxFormatProvider( ).Import( result );
 
//I tried to force the active worksheet, but this doesn't help either!
spreadsheetWorkbook.ActiveWorksheet = spreadsheetWorkbook.Worksheets.FirstOrDefault( );
 
foreach ( var sheet in spreadsheetWorkbook.Worksheets )
{
    sheet.ViewState.IsSelected = false;
}
 
if ( spreadsheetWorkbook.ActiveWorksheet != null )
{
    spreadsheetWorkbook.ActiveWorksheet.ViewState.IsSelected = true;
}
 
spreadsheet.Workbook = spreadsheetWorkbook;

 

And the result is attached. 

 

Please advise...

Regards,

 

Dimitar
Telerik team
 answered on 04 Mar 2020
6 answers
1.0K+ views

Hi,

is it possible to change the full text search behavior from contains to start with?

The users whant e.g. to search vor zip codes and they do not want to see a lot of other results... pls see attached pic.

 

If it is possible is it also possible to switch the behavior at run time? Than I could provide a checkbox where the user can switch back to "contains-mode".

 

Thanks for help!!!

BR Gert

 

Vladimir Stoyanov
Telerik team
 answered on 04 Mar 2020
1 answer
308 views

Hello,

 

I have followed your WPF example: 

public class PlayerTypeConverter : TypeConverter
{
    public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
    {
        return true;
    }
 
    public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
    {
        return true;
    }
 
    public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
    {
 
        return new StandardValuesCollection(new string[] { "Mark Wright", "Ian Rush", "John Barnes",
               "Paul Ince", "Jamie Redknapp", "Sami Hyypia", "Steven Gerrard ", "Jordan Henderson" });
    }
}

and attached the converter to my property:

/// <summary>
/// Sets the algorithm that is available for the mode.
/// </summary>
[Category("Reconstruction")]
// [Editor(typeof(AlgorithmEditor), typeof(UITypeEditor))]
[Telerik.Windows.Controls.Data.PropertyGrid.Editor(typeof(ComboBox))]
[TypeConverter(typeof(AlgorithmConverter))]
[Description("Sets the algorithm that is available for the mode.")]
public string Algorithm
{
    get => GetProperty<string>();
    set => SetProperty(value);
}

 

 

 

Unfortunately when setting the property to the PropertyGrid the combobox does not show up.

The type converter is not even used. Originally I had the PropertyInspector which is still active until I have transitioned to the RadPropertyGrid, here the TypeConverter is used without any problems.

What could be the problem?

 

Thanks

Martin

Yoan
Telerik team
 answered on 03 Mar 2020
3 answers
150 views
Hi,

I would like to know if it's possible by code when using the FindAll methods to highlight all search results and navigate through them in the document?

Thank's
Alain
Tanya
Telerik team
 answered on 02 Mar 2020
6 answers
583 views

We got problem (or maybe an issue) in the RadListBox with enabled Drag&Drop. In our Project we simply want to Drag&Drop Customers from a RadListBox to a RadScheduleView. For displaying the customer business objects into the list we use a simple data-template.

If we compile the project without the line 33 into the MainWindow.xaml the items are shown into the listbox. If we use the line, the items disappear, but the listbox could be used as drop-target from the calendar.

The problem occurred with the telerik wpf version 2016.3.914.45.NoXaml (folder-name of the library linked to the project) and the office 2016 style. We found out, that the problem was not reproducible with an older telerik version or another theme.

Is there any workaround or fix? Thank you for your help.

 

I attached the demo-project with the problem as zip-file with a password, for making it possible for you to reproduce the problem I attached the whole telerik classes. Because this the file is password covered. If you want to unpack the file, please request the password per e-mail.

App.xaml

 

01.<Application x:Class="TestApp1.App"
03.             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
04.             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
05.             StartupUri="MainWindow.xaml">
06.    <Application.Resources>
07.        <ResourceDictionary>
08.            <ResourceDictionary.MergedDictionaries>
09.                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/System.Windows.xaml" />
10.                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.xaml" />
11.                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.Input.xaml" />
12.                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />
13.                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.RibbonView.xaml" />
14.                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.ScheduleView.xaml" />
15.            </ResourceDictionary.MergedDictionaries>
16.        </ResourceDictionary>
17.    </Application.Resources>
18.</Application>

 

MainWindow.xaml

 

01.<Window x:Class="TestApp1.MainWindow"
04.        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
05.        xmlns:local="clr-namespace:TestApp1"
06.        xmlns:drag="clr-namespace:Telerik.Windows.DragDrop.Behaviors;assembly=Telerik.Windows.Controls"
07.        Title="MainWindow" Height="350" Width="525">
08.
09.    <Window.Resources>
10.        <Style x:Key="DraggableListBoxItem" TargetType="telerik:RadListBoxItem">
11.            <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" />
12.            <Setter Property="telerik:DragDropManager.AllowDrag" Value="True" />
13.        </Style>
14.        <DataTemplate x:Key="CustomerItem">
15.            <TextBlock Foreground="Blue" Text="{Binding Name}" />
16.        </DataTemplate>
17.    </Window.Resources>
18.
19.    <Window.DataContext>
20.        <local:ViewModel/>
21.    </Window.DataContext>
22.
23.    <Grid>
24.        <Grid.ColumnDefinitions>
25.            <ColumnDefinition Width="5*"/>
26.            <ColumnDefinition Width="5*"/>
27.        </Grid.ColumnDefinitions>
28.        
29.        <telerik:RadListBox x:Name="ListBox"
30.                            AllowDrop="False"
31.                            ItemsSource="{Binding CustomersSource}"
32.                            ItemTemplate="{StaticResource CustomerItem}"
33.                            ItemContainerStyle="{StaticResource DraggableListBoxItem}">
34.            <telerik:RadListBox.DragVisualProvider>
35.                <telerik:ScreenshotDragVisualProvider />
36.            </telerik:RadListBox.DragVisualProvider>
37.            <telerik:RadListBox.DataConverter>
38.                <local:AppointmentToCustomerConverter />
39.            </telerik:RadListBox.DataConverter>
40.            <telerik:RadListBox.DragDropBehavior>
41.                <telerik:ListBoxDragDropBehavior AllowReorder="True" telerik:DragDropManager.TouchDragTrigger="TapAndHold" />
42.            </telerik:RadListBox.DragDropBehavior>
43.        </telerik:RadListBox>
44.
45.        <telerik:RadScheduleView x:Name="scheduleView"
46.                                 Grid.Column="1"
47.                                 AppointmentsSource="{Binding AppointmentsSource}">
48.            <telerik:RadScheduleView.ViewDefinitions>
49.                <telerik:WeekViewDefinition />
50.            </telerik:RadScheduleView.ViewDefinitions>
51.            <telerik:RadScheduleView.DragDropBehavior>
52.                <local:ScheduleViewDragDropBehavior />
53.            </telerik:RadScheduleView.DragDropBehavior>
54.        </telerik:RadScheduleView>
55.    </Grid>
56.</Window>

 

ViewModel.cs

 

01.using System;
02.using System.Collections;
03.using System.Collections.Generic;
04.using System.Collections.ObjectModel;
05.using System.Linq;
06.using System.Text;
07.using Telerik.Windows.Controls;
08.using Telerik.Windows.Controls.ScheduleView;
09.using Telerik.Windows.DragDrop.Behaviors;
10.
11.namespace TestApp1
12.{
13.    public class Customer
14.    {
15.        public string Name { get; set; }
16.    }
17.
18.    public class ViewModel : ViewModelBase
19.    {
20.        private ObservableCollection<Customer> customersSource;
21.        private ObservableCollection<Appointment> appointmentsSource;
22.
23.        public ViewModel()
24.        {
25.            this.CustomersSource = new ObservableCollection<Customer> {
26.                new Customer{ Name = "Customer 1" }, new Customer{ Name = "Customer 2" }, new Customer{ Name = "Customer 3" },
27.                new Customer{ Name = "Customer 4" }, new Customer{ Name = "Customer 5" }, new Customer{ Name = "Customer 6" },
28.                new Customer{ Name = "Customer 7" }, new Customer{ Name = "Customer 8" }, new Customer{ Name = "Customer 9" },
29.            };
30.            this.AppointmentsSource = new ObservableCollection<Appointment>();
31.        }
32.
33.        public ObservableCollection<Customer> CustomersSource
34.        {
35.            get { return customersSource; }
36.            set { customersSource = value; this.OnPropertyChanged("CustomersSource"); }
37.        }
38.
39.        public ObservableCollection<Appointment> AppointmentsSource
40.        {
41.            get { return appointmentsSource; }
42.            set { appointmentsSource = value; this.OnPropertyChanged("AppointmentsSource"); }
43.        }
44.    }
45.    public class ScheduleViewDragDropBehavior : Telerik.Windows.Controls.ScheduleViewDragDropBehavior
46.    {
47.        public object customers { get; set; }
48.        public override IEnumerable<IOccurrence> ConvertDraggedData(object data)
49.        {
50.            if (DataObjectHelper.GetDataPresent(data, typeof(Customer), false))
51.            {
52.                var customers = DataObjectHelper.GetData(data, typeof(Customer), true) as IEnumerable;
53.                if (customers != null)
54.                {
55.                    var newApp = customers.OfType<Customer>().Select(c => new Appointment { Subject = c.Name });
56.                    return newApp;
57.                }
58.            }
59.            return base.ConvertDraggedData(data);
60.        }
61.    }
62.    public class AppointmentToCustomerConverter : DataConverter
63.    {
64.        public override string[] GetConvertToFormats()
65.        {
66.            return new string[] { typeof(ScheduleViewDragDropPayload).FullName, typeof(Customer).FullName };
67.        }
68.        public override object ConvertTo(object data, string format)
69.        {
70.            var payload = DataObjectHelper.GetData(data, typeof(ScheduleViewDragDropPayload), false) as ScheduleViewDragDropPayload;
71.            if (payload != null)
72.            {
73.                var customers = payload.DraggedAppointments;
74.                return customers.OfType<Appointment>().Select(a => new Customer { Name = a.Subject });
75.            }
76.            return null;
77.        }
78.    }
79.}

 

Dinko | Tech Support Engineer
Telerik team
 answered on 02 Mar 2020
1 answer
136 views

Hello everybody,

We need to create own implementation of RadGrid server filtering and sorting without using OData Web Services.

So, if the user choose filter from GridView, we want to create query to our custom Web Service. Web Service will return filtered and sorted data.

RadGrid shouldn't filter data by self.

We've try to write own implementation of QueryableCollectionView and use it as grid ItemsSource. Our collection implements ICollectionView, IQueryableCollectionView.
Unfortunately doesn't work. RadGrid is still filtering data in memory.

Please help.

Ivan Petrov
Telerik team
 answered on 28 Feb 2020
1 answer
108 views

I've like to start with a blank LayoutControl and allow a user to drop UI Elements onto it.  Are there any examples on how this could be done?

Thanks

 

Vladimir Stoyanov
Telerik team
 answered on 28 Feb 2020
4 answers
239 views

Hi,

I have a sample project that uses the RadRichTextBox and RadRichTextBoxRibbonUI controls.  I'm using the Office2016 theme with NoXaml binaries.  I was referencing the assemblies directly in the install directory:

  C:\Program Files (x86)\Progress\Telerik UI for WPF R2 2019\Binaries.NoXaml\WPF45\Telerik.Windows.Themes.Office2016.dll

...and this all worked fine .  I've since run the upgrade wizard to bump up to R1 2020 and this moved everything locally in the lib folder.  Everything works as before with the exception of the RichTextBox, which does not render (the ribbon and other controls all render fine).  If you check Mole you can see the top level element for the RichTextBox but it has no children and the control does not render.

One thing I notice, looking at the R1 2020 version of Office2016.dll in JustDecompile, is that the baml for richtextboxui seems to produce a parser exception:

Current member / type: themes/telerik.windows.controls.richtextboxui.baml
File path: C:\Program Files (x86)\Progress\Telerik UI for WPF R1 2020\Binaries.NoXaml\WPF45\Telerik.Windows.Themes.Office2016.dll

Product version: 2019.1.118.0
Character '0' was unexpected in string '0'.  Invalid XAML type name.
at MS.Internal.Xaml.Parser.MeScanner.ResolveTypeName(String longName)
at MS.Internal.Xaml.Parser.MeScanner.Read()
at MS.Internal.Xaml.Parser.MePullParser.<P_MarkupExtension>d__9.MoveNext()
at MS.Internal.Xaml.Parser.MePullParser.<P_Value>d__13.MoveNext()

This is not the case for the same baml file in the equivalent R2 2019 assembly, which displays the xaml you'd expect.

Is this a known issue, or am I missing something else?

Many thanks

John

Tanya
Telerik team
 answered on 28 Feb 2020
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?