or
<UserControl.Resources> |
<Style TargetType="{x:Type telerik:GridViewRow}"> |
<Setter Property="Background" Value="#00FF00"/> |
<Style.Triggers> |
<DataTrigger Binding="{Binding RelativeSource={RelativeSource DataContext}, |
Path=HighlightRow}" Value="True"> |
<DataTrigger.Setters> |
<Setter Property="Foreground" Value="#FF0000"/> |
<Setter Property="FontSize" Value="14"/> |
</DataTrigger.Setters> |
</DataTrigger> |
</Style.Triggers> |
</Style> |
</UserControl.Resources> |
int _selIndex = dataGrid.SelectedIndex; |
MyCollection _data1 = (MyCollection)dataGrid.Items[_selIndex - 1]; |
MyCollection _data2 = (MyCollection)dataGrid.Items[_selIndex]; |
MyCollection _data3 = (MyCollection)dataGrid.Items[_selIndex + 1]; |
<t:GridViewDataColumn DataMemberBinding="{Binding grade}" Header="Grade" EditTriggers="CellClick"> |
<t:GridViewDataColumn.CellEditTemplate> |
<DataTemplate> |
<ComboBox IsEditable="True" Text="{Binding grade, UpdateSourceTrigger=LostFocus, Mode=TwoWay}"/> |
</DataTemplate> |
</t:GridViewDataColumn.CellEditTemplate> |
</t:GridViewDataColumn> |
private void gridMain_MouseDoubleClick(object sender, MouseButtonEventArgs e) |
{ |
GridViewCell currentCell = (GridViewCell) gridMain.CurrentCell; |
if (currentCell.DataColumn.DisplayIndex > 17) |
{ |
if (currentCell.Foreground == Brushes.Red) |
{ |
currentCell.Foreground = Brushes.Black; |
currentCell.Value = currentCell.Value.ToString().Replace("*", ""); |
} |
else |
{ |
currentCell.Foreground = Brushes.Red; |
currentCell.Value = currentCell.Value.ToString() + "*"; |
} |
} |
} |
<
ReferenceControls:AnimatingExpanderControl InitialExpandedLength="180" Margin="0" Style="{StaticResource AnimatingExpanderControlStyle}" ExpandDirection="Up" Title="Patient Info" Background="White" Grid.Row="0" >
<!--<Viewbox Stretch="Uniform">-->
<StackPanel Orientation="Vertical" >
<ReferenceControls:PatientBanner x:Name="test"/>
</StackPanel>
<!--</Viewbox>-->
</ReferenceControls:AnimatingExpanderControl>