Click here to Skip to main content
13,900,285 members

Silverlight / WPF

 
QuestionHave two controls fill the MainWindow and resize automatically Pin
Mc_Topaz16-Jan-19 4:14
memberMc_Topaz16-Jan-19 4:14 
AnswerRe: Have two controls fill the MainWindow and resize automatically Pin
Richard Deeming16-Jan-19 8:07
mveRichard Deeming16-Jan-19 8:07 
GeneralRe: Have two controls fill the MainWindow and resize automatically Pin
Mc_Topaz16-Jan-19 19:22
memberMc_Topaz16-Jan-19 19:22 
QuestionHyperlink Context Menu Pin
Kevin Marois9-Jan-19 15:30
professionalKevin Marois9-Jan-19 15:30 
AnswerRe: Hyperlink Context Menu Pin
Richard Deeming10-Jan-19 0:32
mveRichard Deeming10-Jan-19 0:32 
GeneralRe: Hyperlink Context Menu Pin
Kevin Marois10-Jan-19 4:32
professionalKevin Marois10-Jan-19 4:32 
GeneralRe: Hyperlink Context Menu Pin
Kevin Marois10-Jan-19 5:31
professionalKevin Marois10-Jan-19 5:31 
QuestionTreeView Item Show Button Using Trigger Pin
Kevin Marois1-Jan-19 11:41
professionalKevin Marois1-Jan-19 11:41 
I have a HierarchicalDataTemplate for a TreeViewItem that creates Hyperlinks for each item. When the mouse is over the treeview item, I want to show a button to the right.

The code below uses a trigger to show the button when the mouse is over the item, but when I move the mouse to the right off the link portion, the button dissapears.

What's the right way to create this trigger so that I can click on the button?
<HierarchicalDataTemplate DataType="{x:Type entities:NavigationGroupEntity}"

                            ItemsSource="{Binding NavigationItems}">

<pre>
<Grid>

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

    <TextBlock Grid.Column="0"

                HorizontalAlignment="Stretch">
        <Hyperlink Style="{StaticResource HyperlinkStyle}"

                    Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.NavHeaderLinkClickedCommand}"

                    CommandParameter="{Binding}">>
            <TextBlock Text="{Binding Caption}"/>
        </Hyperlink>
    </TextBlock>

    <Button Grid.Column="1"

            x:Name="button"

            Visibility="Hidden"

            VerticalAlignment="Center"

            Padding="0"

            Height="24"

            Width="24"

            Style="{StaticResource flatButtonStyle}">

        <TextBlock Text="+"

                    Foreground="SteelBlue"

                    VerticalAlignment="Top"

                    FontSize="18"/>

    </Button>

</Grid>

<HierarchicalDataTemplate.Triggers>
    <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="button" Property="Visibility" Value="Visible"/>
    </Trigger>
</HierarchicalDataTemplate.Triggers>



If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

AnswerRe: TreeView Item Show Button Using Trigger Pin
Gerry Schmitz5-Jan-19 7:22
mveGerry Schmitz5-Jan-19 7:22 
GeneralRe: TreeView Item Show Button Using Trigger Pin
Kevin Marois7-Jan-19 7:31
professionalKevin Marois7-Jan-19 7:31 
GeneralRe: TreeView Item Show Button Using Trigger Pin
Gerry Schmitz7-Jan-19 8:39
mveGerry Schmitz7-Jan-19 8:39 
GeneralRe: TreeView Item Show Button Using Trigger Pin
Kevin Marois7-Jan-19 9:18
professionalKevin Marois7-Jan-19 9:18 
GeneralRe: TreeView Item Show Button Using Trigger Pin
J. Calhoun14-Feb-19 4:37
memberJ. Calhoun14-Feb-19 4:37 
QuestionWPF Items Source get the visible items Pin
Paul M Gibson31-Dec-18 7:00
memberPaul M Gibson31-Dec-18 7:00 
AnswerRe: WPF Items Source get the visible items Pin
Gerry Schmitz1-Jan-19 6:42
mveGerry Schmitz1-Jan-19 6:42 
GeneralRe: WPF Items Source get the visible items Pin
Paul M Gibson2-Jan-19 6:22
memberPaul M Gibson2-Jan-19 6:22 
QuestionAd Control / monetization Pin
Super Lloyd18-Dec-18 13:02
memberSuper Lloyd18-Dec-18 13:02 
AnswerRe: Ad Control / monetization Pin
Pete O'Hanlon18-Dec-18 22:17
protectorPete O'Hanlon18-Dec-18 22:17 
GeneralRe: Ad Control / monetization Pin
Super Lloyd19-Dec-18 15:40
memberSuper Lloyd19-Dec-18 15:40 
AnswerRe: Ad Control / monetization Pin
Gerry Schmitz23-Dec-18 9:02
mveGerry Schmitz23-Dec-18 9:02 
GeneralRe: Ad Control / monetization Pin
Super Lloyd23-Dec-18 9:39
memberSuper Lloyd23-Dec-18 9:39 
GeneralRe: Ad Control / monetization Pin
Gerry Schmitz28-Dec-18 9:39
mveGerry Schmitz28-Dec-18 9:39 
QuestionValidation in WPF Pin
Kevin Marois18-Dec-18 6:59
professionalKevin Marois18-Dec-18 6:59 
AnswerRe: Validation in WPF Pin
Super Lloyd18-Dec-18 13:09
memberSuper Lloyd18-Dec-18 13:09 
AnswerRe: Validation in WPF Pin
Gerry Schmitz23-Dec-18 8:57
mveGerry Schmitz23-Dec-18 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.


Advertise | Privacy | Cookies | Terms of Service
Web03 | 2.8.190306.1 | Last Updated 11 Mar 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid