Click here to Skip to main content
15,907,906 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: RoutedUICommands vs ICommand. When & Why Pin
SledgeHammer0126-Aug-11 10:09
SledgeHammer0126-Aug-11 10:09 
GeneralRe: RoutedUICommands vs ICommand. When & Why Pin
Vincent Beek26-Aug-11 21:38
Vincent Beek26-Aug-11 21:38 
QuestionProper way to manage c# wpf applications with multiple windows? Pin
hamzaAA25-Aug-11 13:41
hamzaAA25-Aug-11 13:41 
AnswerRe: Proper way to manage c# wpf applications with multiple windows? Pin
Mycroft Holmes25-Aug-11 14:46
professionalMycroft Holmes25-Aug-11 14:46 
AnswerRe: Proper way to manage c# wpf applications with multiple windows? Pin
_Maxxx_25-Aug-11 21:36
professional_Maxxx_25-Aug-11 21:36 
GeneralRe: Proper way to manage c# wpf applications with multiple windows? Pin
Mycroft Holmes26-Aug-11 13:08
professionalMycroft Holmes26-Aug-11 13:08 
QuestionCan I make a WPF DataGridRow unselectable? Pin
rj_odon24-Aug-11 21:46
rj_odon24-Aug-11 21:46 
AnswerRe: Can I make a WPF DataGridRow unselectable? Pin
Varsha Ramnani24-Aug-11 23:59
professionalVarsha Ramnani24-Aug-11 23:59 
You can try setting the IsHitTestVisibleProperty to false

<DataGrid.RowStyle>
    <Style TargetType="{x:Type DataGridRow}">
        <Style.Triggers>
            <DataTrigger Binding="{Binding DisableMe}" Value="True">
                <Setter Property="IsEnabled" Value="False" />
                <Setter Property="IsHitTestVisible" Value="False">
            </DataTrigger>
        </Style.Triggers>
    </Style>
</DataGrid.RowStyle>


But the problem is that the Hyperlink will also not work with this.
you can check the reference here[^]

The Second solution will be to use your style same way
But just change the Trigger of IsSelected to Multitrigger & Check for the IsEnabled for true like this

XML
<MultiTrigger>
       <MultiTrigger.Conditions>
          <Condition Property="IsSelected" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
       </MultiTrigger.Conditions>
       <Setter Property="Opacity" TargetName="BackgroundRectangle" Value="0.5"/>
</MultiTrigger>


this way the problem you stated that you can select it using SelectAll will be solved & Hyperlinks will also work.

But in both these solutions when you check the SelectedItems Collection it will contain that row as well with other rows.
Changing circumstances require changing attitudes.
"Challenges are what make life interesting ;
overcoming them is what makes life meaningful." Mark Twain
"Insanity is doing the same thing over and over again but expecting different results.” — Rita Mae Brown

QuestionVizualation of an object Pin
columbos1492724-Aug-11 9:39
columbos1492724-Aug-11 9:39 
AnswerRe: Vizualation of an object Pin
SledgeHammer0124-Aug-11 9:48
SledgeHammer0124-Aug-11 9:48 
QuestionCalendar MultipleRange (get selection) Pin
kurmanc24-Aug-11 5:43
kurmanc24-Aug-11 5:43 
AnswerRe: Calendar MultipleRange (get selection) Pin
SledgeHammer0124-Aug-11 6:27
SledgeHammer0124-Aug-11 6:27 
GeneralRe: Calendar MultipleRange (get selection) Pin
kurmanc24-Aug-11 6:41
kurmanc24-Aug-11 6:41 
QuestionWP7 using silverlight Pin
arkiboys23-Aug-11 23:18
arkiboys23-Aug-11 23:18 
AnswerRe: WP7 using silverlight Pin
Dan Mos24-Aug-11 0:08
Dan Mos24-Aug-11 0:08 
GeneralRe: WP7 using silverlight Pin
arkiboys24-Aug-11 0:30
arkiboys24-Aug-11 0:30 
GeneralRe: WP7 using silverlight Pin
Dan Mos24-Aug-11 0:48
Dan Mos24-Aug-11 0:48 
GeneralRe: WP7 using silverlight Pin
arkiboys24-Aug-11 1:40
arkiboys24-Aug-11 1:40 
Question"Embed" an external video clip Pin
McCombi23-Aug-11 22:18
McCombi23-Aug-11 22:18 
AnswerRe: "Embed" an external video clip Pin
Navin Pandit23-Aug-11 22:34
Navin Pandit23-Aug-11 22:34 
GeneralRe: "Embed" an external video clip Pin
McCombi23-Aug-11 22:49
McCombi23-Aug-11 22:49 
GeneralRe: "Embed" an external video clip Pin
Navin Pandit23-Aug-11 23:50
Navin Pandit23-Aug-11 23:50 
AnswerRe: "Embed" an external video clip Pin
McCombi24-Aug-11 3:07
McCombi24-Aug-11 3:07 
QuestionWPF help- how to access a textbox value from a different window Pin
steersteer22-Aug-11 11:17
steersteer22-Aug-11 11:17 
AnswerRe: WPF help- how to access a textbox value from a different window Pin
Mycroft Holmes22-Aug-11 13:09
professionalMycroft Holmes22-Aug-11 13:09 

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.