Telerik Forums
UI for WPF Forum
3 answers
177 views

Hi,

I need to retrieve the recurrence pattern and set it to our custom object. I tried various methods. In all these cases, I am not able to retrieve DaysOfWeekMask which holds values like "Sunday" or "Monday|Tuesday|Wednesday" and cast it to our custom object DaysOfWeek which is also an enum.

1st Method

a) RecurrenceDays days = new RecurrenceDays();
days = days.AddDay(CurrentCreatedAppointment.RecurrenceRule.Pattern.DaysOfWeekMask);
var s = days.GetDaysOfWeek().Select(x => (DaysOfWeek)Enum.Parse(typeof(DaysOfWeek), x.ToString())).AsEnumerable();
viewModel.BackupArchiveSettings.ByDay = new ObservableCollection<DaysOfWeek>( s);
var k = s.GetEnumerator();

var k1 = k.Current;

 

2nd Method

 RecurrenceDays days = new RecurrenceDays();
days = days.AddDay(CurrentCreatedAppointment.RecurrenceRule.Pattern.DaysOfWeekMask);
var s = days.GetDaysOfWeek().Select(x => (DaysOfWeek)Enum.Parse(typeof(DaysOfWeek), x.ToString())).AsEnumerable();

newcol = new ObservableCollection<DaysOfWeek>();
foreach (var item in s.ToList())
{
 viewModel.BackupArchiveSettings.ByDay.Add(item);
}

 

Please help

 

Thanks,

Divya

Martin Ivanov
Telerik team
 answered on 01 Apr 2020
1 answer
105 views
Good day.

We have a problem with the RowEditEndedCommand event.

We have a GridView with GridViewCheckBoxColumn. Also there is a checkbox in the header of this column, which allows you to check/uncheck all checkboxes.

Usually everything works fine:
1. Edit the row.
2. Click to another control (for example, click on the button or select another tab).
3. The RowEditEndedCommand event was called.

But if we add an action with a checkbox in the header to the order of actions:
1. Edit the row.
2. Click on the checkbox in the grid header.
3. Click to another control.
4. The RowEditEndedCommand event was NOT called.

We need to always call this event, but we don’t know why it doesn’t work in this case.


I am attaching a small example. Use the button to change focus and get RowEditEnded event.
https://drive.google.com/file/d/1PlAq5s2uv905-wldi7jD1r8JZx28YUwO/view?usp=sharing
Dinko | Tech Support Engineer
Telerik team
 answered on 01 Apr 2020
5 answers
158 views

The Situation when I will drop and add a shape. before added shape drawing on the diagram, I want to execute Diagram.Align() method with all shapes.

In Detail, I will drop and add ContainerShape into another ContainerShape.

Another ContainerShape has a child, a shape.

After Dropped and Added, I try to Align ContainerShape's Childrens when Other ContainerShape calls "OnItemsCollectionChanged"

 

but, if i try to Align with dropped shape. it occurs to Empty Rect Error. 

"Empty Rect cannot modify this property"

 

e.StackTrace "   location: System.Windows.Rect.set_X(Double value)\r\n   location: Telerik.Windows.Diagrams.Core.GraphController.AlignShape(IShape shape, Point oldPosition, Point alignedPosition, Alignment alignment)\r\n   location: Telerik.Windows.Diagrams.Core.GraphController.AlignShapes(Alignment alignment, IEnumerable`1 shapes)\r\n   location: CloudRPA.Views.Diagram.DiagramContainerShape.ReArrangedItem(Boolean isAdd)"

 

Dinko | Tech Support Engineer
Telerik team
 answered on 31 Mar 2020
2 answers
128 views
 Hello everyone,

i'm working with RadOpenFileDialog  in a WPF Desktop application with Fluent Theme, due to project needs i had to set the font size for the whole application a bit bigger with this code : 

                                                      FluentPalette.Palette.FontSizeS = 18;

                                                      FluentPalette.Palette.FontSize = 20;
                                                      FluentPalette.Palette.FontSizeL = 22;
                                                      FluentPalette.Palette.FontSizeXL = 24;

All work well but when i open a RadOpenFileDialog  window i have the line of address bar partially hided as showed in the screenshot in attachment.

What could be the cause of the problem ?

Thanks in advance.
Edgardo
Top achievements
Rank 1
 answered on 31 Mar 2020
1 answer
276 views

Hi guys,

 

I'm trying to capture the print event of a RadPDFViewer to not only print the PDF but also save it to a predifined location everytime it is printed.

Ithought about the Click event in the toolbar, but I also need to capture it if printed from contextmenu.

 

I have read something about inherit the print command, but I haven't gotten how to do that.

 

Greetings,

Benedikt

Dimitar
Telerik team
 answered on 30 Mar 2020
2 answers
119 views

Hi,

 

i need to save the content of the radrichtextbox as an image, i didn't find any method to implement this.

 

 

thanks in advance.

Maximiliano
Top achievements
Rank 1
Veteran
 answered on 30 Mar 2020
6 answers
629 views
<telerik:RadComboBox IsEditable="True" IsTextSearchCaseSensitive="False" Text="{Binding SchoolEducation}" ItemsSource="{Binding SchoolEducations}" />

 

Hi,

since Release 2020.1.218 the TextProperty-Binding does not refresh my property in my ViewModel.

I also tried the current internal version.

Best regards,
Ronny Glass

Ronny
Top achievements
Rank 1
 answered on 29 Mar 2020
0 answers
101 views
Hi! I am using your DragDrop example for Timeline in my application. I put a TimeLine in a DataGrid, but for some reason TimeLineItem doesn't move
Ratnikov
Top achievements
Rank 1
 asked on 29 Mar 2020
0 answers
112 views

Hello!

The right behavior for using panes in Docking is like that: we set/modify PanesSource property, Panes property is initialized by using PanesSource and DockingPanesFactory, panes are created or removed. But when set PanesSource,  try to load invalid layout and get an exception, Docking.Panes property is set to null and actual panes is not removed, because we don`t have them in Panes property. This behavior cause problems with resolving panes (because there are old panes in memory, that should have been removed). Can you suggest some sort of validation for layout or ways to clean old panes from memory?

Andrew
Top achievements
Rank 1
 asked on 26 Mar 2020
1 answer
432 views

Hello,

 

yesterday I installed  the latest Visual Studio 2019 update and now I'm getting in the line

var dllStream = currentAssembly.GetManifestResourceStream(fullDllName);

a value of null (called in CurrentDomain_AssemblyResolve()). It was working good all the time.

 

I'm using the code posted here:

https://www.telerik.com/forums/how-to-display-controls-(like-radwindow)-at-design-time-when-noxaml-is-used-and-implicit-style-resources-are-in-a-custom-dll#Pz5cUcqhtk-t3EQHJuJYHg

 

   public class TelerikThemeUtilities{
 
        static TelerikThemeUtilities() {
            AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
        }
 
        public static void Initialize() {
        }
 
        public static bool GetDesignTime(DependencyObject obj) {
            return (bool)obj.GetValue(DesignTimeProperty);
        }
 
        public static void SetDesignTime(DependencyObject obj, bool value) {
            obj.SetValue(DesignTimeProperty, value);
        }
 
        public static readonly DependencyProperty DesignTimeProperty = DependencyProperty.RegisterAttached(
            "DesignTime",
            typeof(bool),
            typeof(TelerikThemeUtilities),
            new PropertyMetadata(false, DesignTimeChanged));
 
        private static void DesignTimeChanged(DependencyObject target, DependencyPropertyChangedEventArgs args) {
            if (((bool)args.NewValue) && System.ComponentModel.DesignerProperties.GetIsInDesignMode(target)) {
                FrameworkElement element = target as FrameworkElement;
                LoadTelerikTheme(element.Resources, "Crystal");
            }
        }
 
        public static void LoadTelerikTheme(string themeName) {
            Application.Current.Resources.Clear();
            LoadTelerikTheme(Application.Current.Resources, themeName);
        }
 
        private static void LoadTelerikTheme(ResourceDictionary resources, string themeName) {
            resources.MergedDictionaries.Add(new ResourceDictionary() {
                Source = new Uri("/Telerik.Windows.Themes." + themeName + ";component/Themes/Telerik.Windows.Controls.xaml", UriKind.RelativeOrAbsolute)
            });
            resources.MergedDictionaries.Add(new ResourceDictionary() {
                Source = new Uri("/Telerik.Windows.Themes." + themeName + ";component/Themes/Telerik.Windows.Controls.Input.xaml", UriKind.RelativeOrAbsolute)
            });
            resources.MergedDictionaries.Add(new ResourceDictionary() {
                Source = new Uri("/Telerik.Windows.Themes." + themeName + ";component/Themes/Telerik.Windows.Controls.Navigation.xaml", UriKind.RelativeOrAbsolute)
            });
            resources.MergedDictionaries.Add(new ResourceDictionary() {
                Source = new Uri("/Telerik.Windows.Themes." + themeName + ";component/Themes/Telerik.Windows.Controls.GridView.xaml", UriKind.RelativeOrAbsolute)
            });
            resources.MergedDictionaries.Add(new ResourceDictionary() {
                Source = new Uri("/Telerik.Windows.Themes." + themeName + ";component/Themes/Telerik.Windows.Documents.xaml", UriKind.RelativeOrAbsolute)
            });
        }
 
        private static System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) {
            var dllName = args.Name.Substring(0, args.Name.IndexOf(',')) + ".dll";
            if (dllName.Contains("Telerik")) {
                var currentAssembly = System.Reflection.Assembly.GetExecutingAssembly();
                var fullDllName = currentAssembly.GetName().Name + ".lib." + dllName;
                var dllStream = currentAssembly.GetManifestResourceStream(fullDllName);
                var streamBytes = new byte[dllStream.Length];
                dllStream.Read(streamBytes, 0, streamBytes.Length);
                var requestedAssembly = System.Reflection.Assembly.Load(streamBytes);
 
                return requestedAssembly;
            }
            else {
                return null;
            }
        }
    }
}

 

-       $exception  {"Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt."}    System.NullReferenceException
+       Data    {System.Collections.ListDictionaryInternal} System.Collections.IDictionary {System.Collections.ListDictionaryInternal}
        HResult -2147467261 int
        HelpLink    null    string
+       InnerException  null    System.Exception
        Message "Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt."  string
        Source  "PsShell"   string
        StackTrace  "   bei PsShell.TelerikThemeUtilities.CurrentDomain_AssemblyResolve(Object sender, ResolveEventArgs args) in C:\\Projects\\PSV\\PSV-Client\\source\\PsShell\\TelerikThemeUtilities.cs: Zeile64" string
+       TargetSite  {System.Reflection.Assembly CurrentDomain_AssemblyResolve(System.Object, System.ResolveEventArgs)}  System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo}
+       Statische Member       
+       Nicht öffentliche Member       
+       sender  {Name:PsShell.exe
Keine Kontextrichtlinien vorhanden.
}   object {System.AppDomain}
+       args    {System.ResolveEventArgs}   System.ResolveEventArgs
        dllName "Telerik.Windows.Controls.resources.dll"    string
+       currentAssembly {PsShell, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null}    System.Reflection.Assembly {System.Reflection.RuntimeAssembly}
        fullDllName "PsShell.lib.Telerik.Windows.Controls.resources.dll"    string
+       dllStream   null    System.IO.Stream
        streamBytes null    byte[]
        requestedAssembly   null    System.Reflection.Assembly

 

 

Any ideas?

 

Best Regards,

Raul

Raul
Top achievements
Rank 1
 answered on 26 Mar 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
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?