Click here to Skip to main content
15,888,733 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: remote access to application Pin
Mycroft Holmes27-Nov-11 21:37
professionalMycroft Holmes27-Nov-11 21:37 
GeneralRe: remote access to application Pin
arkiboys27-Nov-11 21:54
arkiboys27-Nov-11 21:54 
QuestionSetting an expiry date for WPF Theme DLL Pin
Prasoon Chaudhary26-Nov-11 0:58
Prasoon Chaudhary26-Nov-11 0:58 
AnswerRe: Setting an expiry date for WPF Theme DLL Pin
SledgeHammer0126-Nov-11 16:18
SledgeHammer0126-Nov-11 16:18 
GeneralRe: Setting an expiry date for WPF Theme DLL Pin
Prasoon Chaudhary27-Nov-11 4:30
Prasoon Chaudhary27-Nov-11 4:30 
GeneralRe: Setting an expiry date for WPF Theme DLL Pin
SledgeHammer0127-Nov-11 7:53
SledgeHammer0127-Nov-11 7:53 
GeneralRe: Setting an expiry date for WPF Theme DLL Pin
Prasoon Chaudhary27-Nov-11 18:09
Prasoon Chaudhary27-Nov-11 18:09 
QuestionWPF TreeView DataTemplate - Select Visual Parent Pin
Kevin Marois25-Nov-11 8:48
professionalKevin Marois25-Nov-11 8:48 
I have a DataTemplate that is applied to a treeview item. It adds a textbox and button to the tree node. The problem is, when the user click the button or the textbox gets the focus, the tree node is not selected. How can I select the tree node when the button or textbox gets the focus? This is necessesary so that I can get to the data bound to the tree node.

Here's my XAML:

<DataTemplate DataType="{x:Type models:PartModel}">
    <StackPanel Orientation="Vertical"
                Margin="0,1,0,1">
        <StackPanel Orientation="Horizontal">
            <Image Source="/Abtech.Spares.UI;component/Media/Graphics/motherboard_enabled_96x96.png"
                   Height="16"
                   Width="16"
                   Margin="0,0,3,0"/>
            <TextBlock Text="{Binding PartNumber}"></TextBlock>
            <TextBlock Text="-"
                       Margin="3,0,3,0"/>
            <TextBlock Text="{Binding PartDescription}"></TextBlock>
        </StackPanel>
        <StackPanel Orientation="Horizontal">
            <Label x:Name="lblTribal"
                   Content="Tribal"/>
            <TextBox x:Name="txtTribal"
                     Text="{Binding Tribal}"
                     Width="125"/>
            <Button x:Name="cmdTribal"
                    Command="{Binding ElementName=ThisView, Path=DataContext.SelectTribalCommand}">
                <Image Source="/Abtech.Spares.UI;component/Media/Graphics/Toolbar/search_16x16.png"
                            Margin="0,0,3,0"/>
            </Button>
        </StackPanel>
    </StackPanel>
</DataTemplate>

Everything makes sense in someone's mind

AnswerRe: WPF TreeView DataTemplate - Select Visual Parent Pin
SledgeHammer0126-Nov-11 10:12
SledgeHammer0126-Nov-11 10:12 
GeneralRe: WPF TreeView DataTemplate - Select Visual Parent Pin
Kevin Marois26-Nov-11 11:02
professionalKevin Marois26-Nov-11 11:02 
GeneralRe: WPF TreeView DataTemplate - Select Visual Parent Pin
Kevin Marois28-Nov-11 11:44
professionalKevin Marois28-Nov-11 11:44 
GeneralRe: WPF TreeView DataTemplate - Select Visual Parent Pin
SledgeHammer0128-Nov-11 12:02
SledgeHammer0128-Nov-11 12:02 
GeneralRe: WPF TreeView DataTemplate - Select Visual Parent Pin
Kevin Marois28-Nov-11 12:25
professionalKevin Marois28-Nov-11 12:25 
GeneralRe: WPF TreeView DataTemplate - Select Visual Parent Pin
SledgeHammer0128-Nov-11 12:36
SledgeHammer0128-Nov-11 12:36 
QuestionCross-field validation Pin
Geysser24-Nov-11 4:39
Geysser24-Nov-11 4:39 
AnswerRe: Cross-field validation Pin
Pete O'Hanlon24-Nov-11 10:24
mvePete O'Hanlon24-Nov-11 10:24 
GeneralRe: Cross-field validation Pin
Geysser24-Nov-11 17:58
Geysser24-Nov-11 17:58 
GeneralRe: Cross-field validation Pin
Wayne Gaylard24-Nov-11 18:41
professionalWayne Gaylard24-Nov-11 18:41 
GeneralRe: Cross-field validation Pin
Geysser24-Nov-11 20:24
Geysser24-Nov-11 20:24 
GeneralRe: Cross-field validation Pin
Pete O'Hanlon24-Nov-11 22:11
mvePete O'Hanlon24-Nov-11 22:11 
GeneralRe: Cross-field validation Pin
Geysser24-Nov-11 23:33
Geysser24-Nov-11 23:33 
QuestionDataTemplate Binding Question Pin
Kevin Marois23-Nov-11 7:02
professionalKevin Marois23-Nov-11 7:02 
AnswerRe: DataTemplate Binding Question Pin
SledgeHammer0123-Nov-11 11:30
SledgeHammer0123-Nov-11 11:30 
Questionsilverlight version Pin
arkiboys23-Nov-11 6:18
arkiboys23-Nov-11 6:18 
AnswerRe: silverlight version Pin
Mark Salsbery23-Nov-11 8:57
Mark Salsbery23-Nov-11 8:57 

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.