Telerik Forums
UI for WPF Forum
3 answers
134 views

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);
            });

}

Martin Ivanov
Telerik team
 answered on 21 Jan 2019
6 answers
405 views

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.

Martin Ivanov
Telerik team
 answered on 21 Jan 2019
0 answers
128 views

     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.

moe
Top achievements
Rank 1
 asked on 21 Jan 2019
12 answers
1.8K+ views

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

 

Gianfranco
Top achievements
Rank 1
 answered on 18 Jan 2019
3 answers
293 views

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.


Vladimir Stoyanov
Telerik team
 answered on 18 Jan 2019
1 answer
123 views

     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?

Dinko | Tech Support Engineer
Telerik team
 answered on 18 Jan 2019
7 answers
502 views

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

 

Martin Ivanov
Telerik team
 answered on 18 Jan 2019
13 answers
717 views
Hi,
I've had a look at the Wpf-AutoDrag project which I found at this forum.
I've adjusted it to fit my wishes and all is find and dandy, BUT, how on
earth do I enable drag and drop for MULTIPLE rows? Right now I can
only move the rows one by one, which can be a tedious task if you need
to move like 50 rows every time. :(

I guess there's a simple solution to this issue, however I've still to find it, please help!

:)

//JaggenSWE
Martin Ivanov
Telerik team
 answered on 18 Jan 2019
4 answers
226 views

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.

  • When using the ContentTemplate property, the elements within the DataTemplate become logicial descendents of the ContentPresenter, so the inheritence of the Foreground property works.
  • When using the Content property, the logical parent of the topmost element that forms the content is not the ContentPresenter within the control's template, but the control (RadButton) itself. Therefore the foreground of the content will depend on the Foreground property of the control itself. The latter is not changed by the trigger, so it stays black, and so does the content's foreground.

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

Dilyan Traykov
Telerik team
 answered on 18 Jan 2019
2 answers
173 views

Hi

How can i change style close button in RadPaneGroup header?

Mahdi
Top achievements
Rank 1
 answered on 17 Jan 2019
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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?