Goodmorning everyone
I have a really difficult problem to solve for myself, as well as a series of questions to cover a series of doubts.
Accordingly:
app wpf for windows 10 developed with visual studio 2017
.Net Framework 4.5.2
important:
the anomaly I am about to describe does not occur in the development environment, but only with .exe compiled.(debug or release)
my app reads several bytes per second via UTP coming from a microprocessor.
For the reception I created a separate thread.
to view the data received in the xlm graphical interface I followed instructions inside the reception thread as, for example:
Dispatcher.BeginInvoke ((Action) (() => lblPercWorkPhaseInProcessDone.Content = percTotalDone.ToString () + "%"));
where lblPercWorkPhaseInProcessDone is a label.
at each microprocessor event, a table SQL is also stored where I store the historical events of the industrial plant.
therefore, always at each event (data received by the microprocessor in the separate thread) refresh (every about a second) the datagrid containing the events table, with the following instruction:
Dispatcher.BeginInvoke ((Action) (() => RadGridViewWorkPhaseInProgressOnDashBoard.ItemsSource = workPhaseInProgressService.GetByWorkPhaseForOrderId (workPhaseForOrderIdInProcess)));
where
GetByWorkPhaseForOrderId is a method of its class with entity framework:
public List <WorkPhaseInProgress> GetByWorkPhaseForOrderId (int id)
{
try {
using (WIPDBContext db = new WIPDBContext ())
{
var Attachment = db.WorkPhasesInProgress.Where (x => x.WorkPhaseForOrderId == id) .OrderByDescending (x => x.WorkPhaseInProgressId) .ToList ();
return Attachment;
}
}
catch (Exception x)
{
throw x;
}
}
after about 5 or 6 hours of operation the program comes out generating an error in the windows log:
EventData
Application: WIP.exe Framework version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception information: System.OutOfMemoryException in WIP.Service.WorkPhaseInProgressService.GetByWorkPhaseForOrderId (Int32) in WIP.MainWindow. <RefreshGridWorkInProgress> b__188_0 () in System.Windows.Threading.ExceptionWrapper.InternalRealCall (System.Delegate, System.Object, Int32 ) in System.Windows.Threading.ExceptionWrapper.TryCatchWhen (System.Object, System.Delegate, System.Object, Int32, System.Delegate) in System.Windows.Threading.DispatcherOperation.InvokeImpl () in System.Windows.Threading.DispatcherOperation .InvokeInSecurityContext (System.Object) in System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) in System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext, System .Threading.ContextCallback, System.Object, Boolean) in System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) in MS.Internal.CulturePreservingEx ecutionContext.Run (MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object) in System.Windows.Threading.DispatcherOperation.Invoke () in System.Windows.Threading.Dispatcher.ProcessQueue () in System.Windows.Threading .Dispatcher.WndProcHook (IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) in MS.Win32.HwndWrapper.WndProc (IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) in MS.Win32.HwndSubclass.DispatcherCallbackOperation (System.Object) in System.Windows.Threading.ExceptionWrapper.InternalRealCall (System.Delegate, System.Object, Int32) in System.Windows.Threading.ExceptionWrapper.TryCatchWhen (System.Object, System.Delegate, System.Object, Int32, System.Delegate) in System.Windows.Threading.Dispatcher.LegacyInvokeImpl (System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32) in MS.Win32.HwndSubclass.SubclassWndProc (IntPtr, Int32, IntPtr, IntPtr) in MS.Win32.UnsafeNativeMethods.DispatchMessage (System.Windows.Interop.M SG ByRef) in System.Windows.Threading.Dispatcher.PushFrameImpl (System.Windows.Threading.DispatcherFrame) in System.Windows.Threading.Dispatcher.PushFrame (System.Windows.Threading.DispatcherFrame) in System.Windows.Application.RunDispatcher ( System.Object) in System.Windows.Application.RunInternal (System.Windows.Window) in System.Windows.Application.Run (System.Windows.Window) in System.Windows.Application.Run () in WIP.App.Main ()
the records in the table are about 10,000, for now, but will be destined to increase a lot.
my questions are:
It is correct to display my data from a separate thread with the method Dispatcher.BeginInvoke ?
why does not this happen in the development environment?
I hope I have explained the scenario well.
How can I solve?
thank you in advance
This is probably just me not knowing how to implement two ListBox ScrollViewer synchronization?The practice in wpf is seting VerticalOffset or HorizontalOffset in ScrollViewer.ScrollChanged event.But,telerik ScrollViewer 's VerticalOffset or HorizontalOffset Property setter is private.How do I implement this?
Any help would be appreciated.

Hello,
In my database I have stored procedure which returns me the clients list. I'm binding it to AutoCompleteBox like below:
var y = DC.ClientGetAll();
ClientList.ItemsSource = new ObservableCollection<ClientGetAllResult>(y);
In XAML:
<telerik:RadAutoCompleteBox x:Name="ClientList" ItemsSource="{Binding}"
TextSearchMode="Contains"
DisplayMemberPath="Name"
AutoCompleteMode="SuggestAppend"
SelectionMode="Single" Margin="107,72,16,0"
VerticalAlignment="Top"
SelectedItem="{Binding}"
/>
And everything is OK.
But now I want, to create edit form for my users and after open form, AutoCompleteBox should show selected item (by ID).
I was tried everything, but without result.
Can you help me?

Hi All,
I am attempting to code a RadCartesianChart Bar series with two linear axes - similar to a scatter plot where there would be an X and Y coordinate, but instead of scatter points, I'd use a bar series; is anyone familiar with doing this?
In a nutshell I want to have time as the x axis - so I can plot a couple of data points where they would fall at any time from 0 to max, instead of having a Categorical axis where increment on the axis represents on category/value . I want them to be plotted freely on this axis, and at times overlap. (see attached radchartview-series-barseries - mine)
The y-axis would be a linear (dependent? ) axis as well, allowing me to plot my data point against a scale of kilo Joules 0 to the max.
Right now I am using C# WPF and just painting the points on a canvas and I had to paint grid lines and calculate the squares/scaling lines - very tedious. And telerik has some great pan, zoom and data point summary info on item click capabilities.
Please help
Many thanks
Kevin


Hi,
I noticed that the Office 2016 theme is the only theme where the RadButton foreground and background colors get inverted on mouse hover.
Unfortunately, if I do this, the text stays black even on mouse hover:
<telerik:RadButton> <TextBlock Text="Test" /></telerik:RadButton>
The following 2 versions work:
<telerik:RadButton Content="Test" /><telerik:RadButton> <telerik:RadButton.ContentTemplate> <DataTemplate> <TextBlock Text="Test" /> </DataTemplate> </telerik:RadButton.ContentTemplate></telerik:RadButton>
But I cannot use the first because in reality the content I want to put in the button is more complex (TextBlock containing Run objects).
And the second would be a workaround which I would like to avoid as it is not the optimal way.
The reason it does not work is because the IsMouseOver trigger in the template does this:
<Setter TargetName="Content" Property="TextElement.Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
By setting TextElement.Foreground on the ContentPresenter inside the control's template, only children that consider the ContentPresenter as their logical parent will inherit from its Foreground property.
The seemingly obvious fix would be to change the template trigger's setter to this:
<Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
If you feel like this is an appropriate fix, please include it in future versions so that we do not have to customize your template just for that.
If not, and you have advice, you're welcome share it.
Best regards
Hi
How can i change style close button in RadPaneGroup header?
Hi,
I'm trying to change the names of the shapes I show inside the image editor tool but I can not get my head arround it how to do it.
I want to change the text of the shape rectangle and ellipse.
How to approach this problem?
Best regards.

I am currently implementing RadCartesianChart3D to display some data. Everything seemed to be working perfectly fine, and I was mostly able to follow the examples provided by Telerik. However, it seems I am unable to set the Behaviors property of the RadCartesianChart3D.
<telerik:RadCartesianChart3D.Behaviors> <telerikcv:Chart3DCameraBehavior /></telerik:RadCartesianChart3D.Behaviors>The above code block (set inside a RadCartesianChart3D) yields "The member Behaviors is not recognized or accessible".
References are set as follows:
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Chart"xmlns:telerikcv="clr-namespace:Telerik.Windows.Controls.ChartView;assembly=Telerik.Windows.Controls.Chart" 