Telerik Forums
UI for WPF Forum
3 answers
105 views

It looks like the AutoBindBehavior doesn't handle the case where custom PropertyDefinitions are used, a PropertySetMode of Union or Intersection is used and an IEnumerable is assigned to the PropertyGrid.Item. This results in a Linq exception: Sequence contains no elements with the following callstack:

   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at Telerik.Windows.Controls.Data.PropertyGrid.AutoBindBehavior.BindEditor(FrameworkElement editorElement, DependencyProperty property)
   at Telerik.Windows.Controls.Data.PropertyGrid.AutoBindBehavior.<>c__DisplayClass4.<OnUpdateBindingOnElementLoaded>b__0(Object s, RoutedEventArgs args)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   at MS.Internal.LoadedOrUnloadedOperation.DoWork()
   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()

Stefan
Telerik team
 answered on 29 Jun 2016
1 answer
338 views
Hello,

Due to project requirements for a big customer I need to bind entity framework 6 dbcontext directly to telerik controls, in this case to a radgridview control, so i need to use IQueryable instead of ObservableCollection also to perform filtering, sorting and so on.  

The point is that when I add, delete a customer from dbcontext, the radgridview don't refresh showing changes.  Also when I perform this operations directly in database, after refreshing dbcontext the radgridview not showing changes.

I tried to implement INotifyPropertyChanged and INotifyCollectionChanged in my view model but without success.  

Also I want to point out that due to mvvm pattern design I can't have code in mainwindow.xaml.cs.

Please, anyone can provide me a full example of how to achieve this? 

Thanks in advance.
Dilyan Traykov
Telerik team
 answered on 29 Jun 2016
10 answers
460 views
Hi, 
I have PDF files that contains of several pages but with only 2 MB more or less.
When the RadPdfViewer loads the document a OutOfMemoryException occured. 
CallStack: 

Insufficient memory to continue the execution of the program.

   at System.Windows.Media.Imaging.WriteableBitmap..ctor(Int32 pixelWidth, Int32 pixelHeight, Double dpiX, Double dpiY, PixelFormat pixelFormat, BitmapPalette palette)
   at Telerik.Windows.Media.Imaging.RadBitmap..ctor(Int32 width, Int32 height, Int32[] pixels)
   at Telerik.Windows.Documents.Fixed.UI.UIElementsHelper.CreateImageSource(ResourceKey key, ImageSource source)
   at Telerik.Windows.Documents.Fixed.UI.UIElementsHelper.ImageLoader_WorkCompleted(Object sender, WorkCompletedEventArgs e)
   at Telerik.Windows.Documents.Core.Utils.ResourceLoader.OnWorkCompleted(WorkCompletedEventArgs args)
   at Telerik.Windows.Documents.Core.Utils.ResourceLoader.Worker_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
   at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()
Tanya
Telerik team
 answered on 29 Jun 2016
3 answers
318 views

Hi everyone,

I want to make a control radDataGridView with toolbar not user control

In toolbar, buttons located like add/edit/delete/show group panel...etc.

how do i make it ?

thanks for your interest.

YoungKee
Top achievements
Rank 1
 answered on 29 Jun 2016
3 answers
108 views

hello,

I'm having a problem with my code

I wrote this code  in a userControl tag:

<UserControl

.

.

xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">

<Grid>

     <GridDefinitions>

         <RowDefinition Height="25" />

          <RowDefinition Height='*' />

       </GridDefinitions>

 

      <stackPannel Grid.Row="0">

         <lable/>

         <Button Content="Refresh" Command="{Binding RefreshCommand}"/>

       </StackPannel>

 

       <ScrollViewer Grid.Row="1">

          <StackPannel>

            <telerik:RadExpender IsExpender="True">

                  <telerik:RadGridView SelectionMode="Single" IsSyncrinizeWithCurrentItem="True" AutoGenerateColumns="True"  ItemsSource="{Binding SomeList1}"/>

            </telerik:RadExpender>

 

            <telerik:RadExpender IsExpender="True">
                  <telerik:RadGridView SelectionMode="Single" IsSyncrinizeWithCurrentItem="True" AutoGenerateColumns="True"  ItemsSource="{Binding SomeList2}"/>
            </telerik:RadExpender> 

 

            <telerik:RadExpender IsExpender="True">
                  <telerik:RadGridView SelectionMode="Single" IsSyncrinizeWithCurrentItem="True" AutoGenerateColumns="True"  ItemsSource="{Binding SomeList3}"/>
            </telerik:RadExpender> 

 

       </StackPannel>

      </ScrollViewer>

     </Grid>

  </UserControl>

 

the result is that my scroll view fill only about half of the screen instead of the whole screen, there is no problem with its width only its height is wrong.

funny thing that happen: at run time if I click on the first exdpender's button in order to set IsExpended to false

the scroll view suddenly get the right height and fill the whole area.

what is wrong with this code?

I tried change stackPannel to DouckPannel,Grid, set the height... 

how can I make the scrollview know it's height if I do not know the length of the ItemSource on each radexpender

thank you

 

Kiril Vandov
Telerik team
 answered on 29 Jun 2016
1 answer
91 views
Hi,

At the moment the appointment window is a dialog box, is it possible to have it be a window so it's not locking down the UI? Something like when editing a recurring appointment, it's not a dialog window. 
Kalin
Telerik team
 answered on 29 Jun 2016
1 answer
174 views
Hi,

I try to have a button disabled when there is no text in my RadRichTextBox by using MVVM. The output I need is HTML and I used to have a HtmlFormatProvider and a TxtDataProvider. I noticed with this that my typing was really slow. The datasource was not updated when I pressed enter (or send, for a chat-like application), this resulted in missing letters in mails or chats.

I wanted to try it without the TxtDataProvider, because I do not need the plain text (only for checking empty). Only thing is the disabled button, I can't check if the HTML is empty, because there always is HTML. I found a way to check if the value of the Document is empty. On DocumentChanged I can check: RadRichTextBox.Document.IsEmpty. But this can't be binded in my ViewModel because Document is not a dependencyproperty. 

It would be nice to just bind IsEnabled to a property for the RadRichTextBox, is there a way to do this? Binding to a viewmodel will also resolve the issue. Or is there a way to speed up my RadRichTextBox and the providers?

Thanks,
Rob
Todor
Telerik team
 answered on 29 Jun 2016
2 answers
254 views

Hello

I'm dealing with the worksheetPageSetup in order to print my worksheet on only one page like it could be done in C# with excel interop like this

PageSetup.Zoom = false;
    PageSetup.FitToPagesWide = 1;
    PageSetup.FitToPagesTall = 1;
    PageSetup.Orientation = Microsoft.Office.Interop.Excel.XlPageOrientation.xlLandscape;

I found

worksheet.WorksheetPageSetup.PageOrientation = PageOrientation.Landscape

but I can't find how to do

PageSetup.Zoom = false;
PageSetup.FitToPagesWide = 1;
PageSetup.FitToPagesTall = 1;

with spreadsheet

Do you know how can I have the same issue with spreadsheet ?

thanks

regards

J-Christophe EICHENBERGER

JC
Top achievements
Rank 1
 answered on 29 Jun 2016
1 answer
67 views

Hi,

     I am trying to export the appointment using ScheduleView AppointmentCalendarExporter.Export() in wpf. Appointment body text always showing as plain text it is not showing as HTML. When we see the ICS file  "X-ALT-DESC;FMTTYPE"  is missing and appointmen body text showing in DESCRIPTION property. Please provide the work around for it.

 

Thanks

Sekar

     

Kalin
Telerik team
 answered on 29 Jun 2016
1 answer
119 views

Hi,

I am trying to export the Appointment as ICS using SheduleView.AppointmentCalendarExporter.Export() in WPF application. Appointment body text always showing as plain text not HTML in outlook.When we see the ICS file it is not having  "X-ALT-DESC;FMTTYPE=text/html"  property and body text appended with DESCRIPTION property. We have to show appointment body as HTML . Please provide the solution to fix this issue.

Thanks
Sekar
Kalin
Telerik team
 answered on 29 Jun 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?