Hi,
I used a scheduleview with custom appointment and style.
I modified appointments in my viewmodel programmatically when I received message from Azure service bus. The problem is that the UI isn't updated. I have to scroll down and up to see changes in UI.
I tried this solution : https://www.telerik.com/forums/changing-appointment-start-end-not-reflected-on-ui but it didn't work.
Thanks for your advice
Véronique
Here's my code :
public class TimeSlot : Appointment
{
....
public void UpdateTimeSlot(TimeSlot source)
{
CopyFrom(source);
_truckId = source.TruckId;
TimeMarker = TimeSlotMarkerCollection.GetTimeSlotMarker(source.CurrentStatus);
OnPropertyChanged();
}
}
In my viewmodel :
public class DispatchBoardViewModel : ObservableObject
{
private void _listenerMessageService_MessageReceived(object sender, EventArgs e)
{
var dispatchList= ((MessageEventArgs)e)?.Message;
dispatchList?.TimeSlots.ForEach(d =>
{
var displayedTimeSlot = TimeSlots.FirstOrDefault(ts =>[where_clause])
);
displayedTimeSlot?.UpdateTimeSlot(timeSlot);
});
}
Hi,
Is there any way to change how the tabs are styled so that it's more obvious which tab is selected? What I'm looking for is for the active tab to 'hug' the tab content below it. Chrome and Visual Studio do something similar.
Please see the attached screenshots.
Hello,
I am using the RadGridView for displaying our list of data, but this data is getting bigger and bigger so to improve performance we added paging to our Api
(Data to the gridview is populated through the API not directly from the database).
My Concern is that we I apply paging on the API , I will lose the built in sorting and filtering in the grid as It will only sort the return data.
Is there a way to apply filtering and sorting as calls to the API and I will handle the request on my API.
any help would be appreciated.
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?