Click here to Skip to main content
15,898,746 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Obtain Child from a Grid by clicking Button Pin
Gideon Engelberth11-Jul-08 14:10
Gideon Engelberth11-Jul-08 14:10 
GeneralRe: Obtain Child from a Grid by clicking Button Pin
ezazazel13-Jul-08 23:54
ezazazel13-Jul-08 23:54 
QuestionHow to Bold a Particular field in a list view Pin
Aslesh10-Jul-08 3:49
Aslesh10-Jul-08 3:49 
AnswerRe: How to Bold a Particular field in a list view Pin
Yajnesh Narayan Behera10-Jul-08 4:45
Yajnesh Narayan Behera10-Jul-08 4:45 
GeneralRe: How to Bold a Particular field in a list view Pin
Aslesh10-Jul-08 4:52
Aslesh10-Jul-08 4:52 
GeneralRe: How to Bold a Particular field in a list view Pin
Yajnesh Narayan Behera13-Jul-08 22:03
Yajnesh Narayan Behera13-Jul-08 22:03 
GeneralRe: How to Bold a Particular field in a list view Pin
Aslesh14-Jul-08 2:37
Aslesh14-Jul-08 2:37 
GeneralRe: How to Bold a Particular field in a list view Pin
Yajnesh Narayan Behera14-Jul-08 23:46
Yajnesh Narayan Behera14-Jul-08 23:46 
Now let us have a XAML file, where there is a listview where Employee data such as FirstName,LastName & EmployeeNumber is being populated. I assume you are retrieving data from you database when a specify condition is beieng satisfied such as when FirstName matches the condition. In this case you want to heighlight those cells.

In this case your XAML file looks like:

<ListView.View> Big Grin | :-D
<GridView AllowsColumnReorder="true" ColumnHeaderToolTip="Employee Information">

<GridViewColumn Header="First Name" Width="100" >
<GridViewColumn.CellTemplate>
<DataTemplate>
<l:EditBox Height="25" Value="{Binding Path=FirstName}" Loaded="EditBox_Loaded"/>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>

<GridViewColumn Header="Last Name" Width="100" >
<GridViewColumn.CellTemplate>
<DataTemplate>
<l:EditBox Height="25" Value="{Binding Path=LastName}" Loaded="EditBox_Loaded"/>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>

<GridViewColumn Header="ID" Width="50" >
<GridViewColumn.CellTemplate>
<DataTemplate>
<l:EditBox Height="25" Value="{Binding Path=EmployeeNumber}" Loaded="EditBox_Loaded"/>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>

Now in your cs class

private void EditBox_Loaded(object sender, RoutedEventArgs e)
{
EditBox edtBox = sender as EditBox;

if (edtBox.Value.ToString() == "Yajnesh")
{
edtBox.FontSize = edtBox.FontSize + 4;
}
}

I have tried to paint the background, but it is not straight forward as you have to use the concept dependency property.
GeneralRe: How to Bold a Particular field in a list view Pin
Yajnesh Narayan Behera15-Jul-08 0:08
Yajnesh Narayan Behera15-Jul-08 0:08 
GeneralRe: How to Bold a Particular field in a list view Pin
Aslesh15-Jul-08 3:57
Aslesh15-Jul-08 3:57 
GeneralRe: How to Bold a Particular field in a list view Pin
Yajnesh Narayan Behera15-Jul-08 23:21
Yajnesh Narayan Behera15-Jul-08 23:21 
GeneralRe: How to Bold a Particular field in a list view Pin
Aslesh16-Jul-08 4:38
Aslesh16-Jul-08 4:38 
GeneralRe: How to Bold a Particular field in a list view Pin
Yajnesh Narayan Behera16-Jul-08 23:48
Yajnesh Narayan Behera16-Jul-08 23:48 
GeneralRe: How to Bold a Particular field in a list view Pin
Yajnesh Narayan Behera17-Jul-08 0:28
Yajnesh Narayan Behera17-Jul-08 0:28 
GeneralRe: How to Bold a Particular field in a list view Pin
Aslesh17-Jul-08 4:13
Aslesh17-Jul-08 4:13 
QuestionHow to trigger a method after some time span Pin
Aslesh9-Jul-08 8:38
Aslesh9-Jul-08 8:38 
AnswerRe: How to trigger a method after some time span Pin
Christian Graus9-Jul-08 8:42
protectorChristian Graus9-Jul-08 8:42 
GeneralRe: How to trigger a method after some time span Pin
Aslesh10-Jul-08 4:53
Aslesh10-Jul-08 4:53 
QuestionError in capturing Images and Video in same form Pin
Manch Manj8-Jul-08 20:12
Manch Manj8-Jul-08 20:12 
AnswerRe: Error in capturing Images and Video in same form Pin
Pete O'Hanlon8-Jul-08 22:07
mvePete O'Hanlon8-Jul-08 22:07 
GeneralRe: Error in capturing Images and Video in same form Pin
Manch Manj9-Jul-08 20:31
Manch Manj9-Jul-08 20:31 
QuestionShow 3d-mediatype in wpf [modified] Pin
hmshmsm8-Jul-08 1:41
hmshmsm8-Jul-08 1:41 
Questionwpf command parameters Pin
cechode7-Jul-08 9:34
cechode7-Jul-08 9:34 
AnswerRe: wpf command parameters Pin
Gideon Engelberth9-Jul-08 5:06
Gideon Engelberth9-Jul-08 5:06 
QuestionBind Objects to ListView / Grid where Objects hold their Position in Grid [modified] Pin
ezazazel7-Jul-08 4:33
ezazazel7-Jul-08 4:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.