blink a wpf datagrid row - wpf

I am new to WPF. I have a requirement where I need to blink a data grid row If the value in the Date is column is less than current date. My Grid is like below.
Name Date
Test 12-02-2015.
Please help me with a complete example solution.
Thanks

What you need to do first of all is to read about:
MVVM
Styles
Triggers
ValueConverters
Ofcourse, you have to read msdn's articles about WPF.
Try to write something, and if something goes wrong, discribe your problems on Stack Overflow and we will help you. Have a nice coding!

Related

Set Full width row color for a parent group separor

We want to change the color for the parent row to have a certain color.
This way we can better see in which parent we are working in.
I got "something" working with a hover that looks like this (removed important information):
This is what we want to achieve but then for only the parent rows.
Is there any possibility to do this or are there any work arounds to become this effect ?
Many thanks for the help in advance for any unclarity or questions please ask!
Kind regards,
Joey Driessen
Unfortunately, it's not possible, but I can suggest coloring the names of the grouping tasks and/or change their font size. Please check this sample: https://playground.anychart.com/xuqwNO3f
And learn more about the labelsOverrider() method here: https://api.anychart.com/anychart.core.ui.DataGrid.Column#labelsOverrider
We have found a solution.
We have checked the source code for what you guys are doing for making a row selectable (and coloring the whole row).
Then we are using the .labelsOverrider function to get all the items in that column.
We check which ones are our grouping and on the grouping item we call the meta function like follows meta('selected', true) and that makes sure we set this row as selected and giving us the appropiate result.
Looks like follows:

WPFToolkit RichTextBox - Update text color on typing

I'm using the WPFToolkit RichTextBox in order to allow the user to view and edit text.
One of the things I need to support is the coloring of specific words as they are being typed, as well as when loading them from an pre-existing source.
For example if the user type the word - "Hello" it should be colored in blue.
Since I'm using MVVM I would like to avoid code behind as much as possible.
So far I've been trying handling this in the ViewModel with a custom TextFormatter however it helped only when the I update the source property and when I updated the RichTextBox directly it didn't color anything as the TextFormatter's SetText wasn't even called. Only SetText was called.
I hope you guys could help me out.
Thanks!
In the end I used the solution I found in here -
http://blogs.microsoft.co.il/blogs/tamir/archive/2006/12/14/RichTextBox-syntax-highlighting.aspx
It's doing its job, but it sometimes has minor hiccups when typing fast or when holding the backspace.
So for now its good enough since my RichTextBox is relatively small.
Though if anyone knows how to fix the hiccups, it would be really great!
EDIT: I found a way to really improve the hiccups. I used a DispatcherTimer and started it on the TextChanged event, that way only after a second/half a second, it would start the coloring logic. So far it works much faster, and I didn't notice any problems when typing quickly. So for my needs of a single row with colored words, it seems like it worked!

Silverlight - Highlight List<> of words/prhases within TextBox

I am new to Silverlight and have a requirement to highlight (or change font color) all words and phrases wtihin a TextBox that match a list of words/phrases. At first I though this would be easy, but the more I look into it, the more confused I get.
My goal is to write something reusable so I can also apply the logic to a RadGridView later. I've seen a few examples of stuff close to what I need, but it's beyond my Silverlight level at this point.
I want to write this myself to get a better understanding of how some of the Silverlight internals work. Can someone point me in the right direction of where to start on something like this? Should this be implemented in a control? Should I use a behavior? I'm using Silverlight 4.
Once I know where to start, I am sure I can get this done - with some help from you guys of course ;-)
Thanks,
-Scott
How about using the RadRichTextBox (I assume you have a licence for it as you mentionned the RadGridView)?
There's also a good sample project on Telerik forum that is doing exactly what you want to do.

Grouping datagrid in silverlight?

How we can grouping data-grid in silver-light with xaml?
(I used silver-light 4 )
Perhaps somebody wants to give you a hint, that you should provide some additional information so we can get an idea, what your intention is.
Is it a layout question or do you want to group data in a DataGrid?

WPF Style Trigger

I am trying to get a row in a datagrid to turn red if the value of a checkbox within the datagrid is true. Any ideas? Here is what I have so far. I am currently turning the columns red if the mouse rolls over the row.
Take a look at this blog post by Vincent Sibal. Sibal gives several code examples of what you're trying to do and he also provides a good sample project you can download to see the source.

Resources