Click here to Skip to main content
16,009,318 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Virtual classroom using silverlight Pin
Pete O'Hanlon4-Sep-13 5:45
mvePete O'Hanlon4-Sep-13 5:45 
QuestionWPF TreeView on a Windows 8 Tablet Pin
Kevin Marois3-Sep-13 6:56
professionalKevin Marois3-Sep-13 6:56 
AnswerRe: WPF TreeView on a Windows 8 Tablet Pin
Pete O'Hanlon3-Sep-13 10:12
mvePete O'Hanlon3-Sep-13 10:12 
GeneralRe: WPF TreeView on a Windows 8 Tablet Pin
Kevin Marois3-Sep-13 10:37
professionalKevin Marois3-Sep-13 10:37 
Ok, it sort of works. Here's my HierarchicalDataTemplate:

<Style x:Key="{x:Type TreeViewItem}" TargetType="{x:Type TreeViewItem}">
    <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
    <Style.Triggers>
        <Trigger Property="IsMouseCaptureWithin" Value="True">
            <Setter Property="IsSelected" Value="True" />
        </Trigger>
        <Trigger Property="IsKeyboardFocusWithin" Value="True">
            <Setter Property="IsSelected" Value="True" />
        </Trigger>
    </Style.Triggers>
</Style>

<HierarchicalDataTemplate DataType="{x:Type models:JobSummaryModel}"
                          ItemsSource="{Binding Path=Nodes}">
    <Grid Margin="2">

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>

        <Image Source="/FMG.UI.WPF.Shared;component/Media/Images/job_72.png"
               Grid.Column="0"
               Height="16"
               Width="16"
               Margin="0,0,3,0"/>

        <TextBlock Grid.Column="1"
                   Text="{Binding Caption}"
                   IsManipulationEnabled="True"/>
    </Grid>
</HierarchicalDataTemplate>


and then my TreeView:

<controls:TreeViewEx BorderThickness="0"
                                  ItemsSource="{Binding Nodes}"
                                  SelectedItemEx="{Binding SelectedTreeNode, Mode=TwoWay}"
                                  IsManipulationEnabled ="True">

                 <TreeView.ItemContainerStyle>
                     <Style TargetType="{x:Type TreeViewItem}">
                         <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
                     </Style>
                 </TreeView.ItemContainerStyle>

             </controls:TreeViewEx>


The tree is one to many, meaning each parent can have one or more children. Sometimes when I click a parent node it is selected. The VM sets the IsExpanded to true if a parent node is selected.

But I have to touch all over the node area many times to actually get it to select. And sometimes it never does.
If it's not broken, fix it until it is

QuestionHow to avoid repeating dynamic tabitem at runtime? Pin
LAPEC2-Sep-13 15:07
LAPEC2-Sep-13 15:07 
AnswerRe: How to avoid repeating dynamic tabitem at runtime? Pin
Pete O'Hanlon2-Sep-13 19:25
mvePete O'Hanlon2-Sep-13 19:25 
GeneralRe: How to avoid repeating dynamic tabitem at runtime? Pin
LAPEC3-Sep-13 1:46
LAPEC3-Sep-13 1:46 
GeneralRe: How to avoid repeating dynamic tabitem at runtime? Pin
Pete O'Hanlon3-Sep-13 2:02
mvePete O'Hanlon3-Sep-13 2:02 
GeneralRe: How to avoid repeating dynamic tabitem at runtime? Pin
LAPEC3-Sep-13 3:12
LAPEC3-Sep-13 3:12 
GeneralRe: How to avoid repeating dynamic tabitem at runtime? Pin
Pete O'Hanlon3-Sep-13 3:59
mvePete O'Hanlon3-Sep-13 3:59 
QuestionMVVM pattern Pin
columbos1492731-Aug-13 18:46
columbos1492731-Aug-13 18:46 
AnswerRe: MVVM pattern Pin
SledgeHammer013-Sep-13 9:56
SledgeHammer013-Sep-13 9:56 
GeneralRe: Prism Quick Starts Pin
NotPolitcallyCorrect30-Aug-13 4:29
NotPolitcallyCorrect30-Aug-13 4:29 
QuestionHow to force refresh of images being cached in Silverlight Deep Zoom app? Pin
Member 297027028-Aug-13 6:04
Member 297027028-Aug-13 6:04 
AnswerRe: How to force refresh of images being cached in Silverlight Deep Zoom app? Pin
Jason Gleim28-Aug-13 7:49
professionalJason Gleim28-Aug-13 7:49 
GeneralRe: How to force refresh of images being cached in Silverlight Deep Zoom app? Pin
Member 297027028-Aug-13 8:14
Member 297027028-Aug-13 8:14 
GeneralRe: How to force refresh of images being cached in Silverlight Deep Zoom app? Pin
Jason Gleim28-Aug-13 8:18
professionalJason Gleim28-Aug-13 8:18 
GeneralRe: How to force refresh of images being cached in Silverlight Deep Zoom app? Pin
Member 297027028-Aug-13 8:44
Member 297027028-Aug-13 8:44 
GeneralRe: How to force refresh of images being cached in Silverlight Deep Zoom app? Pin
Jason Gleim28-Aug-13 8:54
professionalJason Gleim28-Aug-13 8:54 
QuestionCan someone explain this PRISM concept? Pin
SledgeHammer0127-Aug-13 8:39
SledgeHammer0127-Aug-13 8:39 
QuestionAssign a null value to DateTime property Pin
maxRazar26-Aug-13 21:00
maxRazar26-Aug-13 21:00 
AnswerRe: Assign a null value to DateTime property Pin
Pete O'Hanlon26-Aug-13 23:02
mvePete O'Hanlon26-Aug-13 23:02 
GeneralRe: Assign a null value to DateTime property Pin
maxRazar28-Aug-13 5:57
maxRazar28-Aug-13 5:57 
GeneralRe: Assign a null value to DateTime property Pin
Pete O'Hanlon28-Aug-13 21:56
mvePete O'Hanlon28-Aug-13 21:56 
AnswerRe: Assign a null value to DateTime property Pin
Jason Gleim27-Aug-13 5:30
professionalJason Gleim27-Aug-13 5:30 

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.