Click here to Skip to main content
15,867,785 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: PredicateBuilder Question Pin
Richard Deeming16-Jul-18 8:19
mveRichard Deeming16-Jul-18 8:19 
AnswerRe: PredicateBuilder Question Pin
Gerry Schmitz16-Jul-18 10:15
mveGerry Schmitz16-Jul-18 10:15 
QuestionWPF HyperLink Binding To MainWindowViewMOdel Not Working Pin
Kevin Marois9-Jul-18 17:02
professionalKevin Marois9-Jul-18 17:02 
AnswerRe: WPF HyperLink Binding To MainWindowViewMOdel Not Working Pin
Pete O'Hanlon9-Jul-18 20:07
subeditorPete O'Hanlon9-Jul-18 20:07 
GeneralRe: WPF HyperLink Binding To MainWindowViewMOdel Not Working Pin
Kevin Marois10-Jul-18 6:53
professionalKevin Marois10-Jul-18 6:53 
QuestionBind TabItem ContexMenu Command To Window VM Pin
Kevin Marois8-Jul-18 12:03
professionalKevin Marois8-Jul-18 12:03 
AnswerRe: Bind TabItem ContexMenu Command To Window VM Pin
Richard Deeming9-Jul-18 8:35
mveRichard Deeming9-Jul-18 8:35 
GeneralRe: Bind TabItem ContexMenu Command To Window VM Pin
Kevin Marois9-Jul-18 16:23
professionalKevin Marois9-Jul-18 16:23 
Well that didn't work. I've tried a number of things. This is what I have now.
<Style TargetType="TabItem">

    <Setter Property="ContextMenu">
        <Setter.Value>
            <ContextMenu DataContext="{Binding DataContext, ElementName=Window}">

                <MenuItem Header="Close" 
                            Command="{Binding CloseTabCommand}"
                            CommandParameter="{Binding}"/>

                <MenuItem Header="Close All Tabs" 
                            Command="{Binding CloseAllTabsCommand}"
                            CommandParameter="{Binding}"/>

                <MenuItem Header="Close All But This" 
                            Command="{Binding CloseAllButThisTabCommand}"
                            CommandParameter="{Binding}"/>

            </ContextMenu>
        </Setter.Value>
    </Setter>

    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="TabItem">
                <Grid Name="Panel">
                    <ContentPresenter x:Name="ContentSite"
                                        VerticalAlignment="Center"
                                        HorizontalAlignment="Center"
                                        ContentSource="Header"
                                        Margin="10,2"/>
                </Grid>
                <ControlTemplate.Triggers>
                    <Trigger Property="IsSelected" Value="True">
                        <Setter TargetName="Panel" Property="Background" Value="LightSkyBlue" />
                    </Trigger>
                    <Trigger Property="IsSelected" Value="False">
                        <Setter TargetName="Panel" Property="Background" Value="White" />
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
        </Setter.Value>
    </Setter>

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

GeneralRe: Bind TabItem ContexMenu Command To Window VM Pin
Pete O'Hanlon10-Jul-18 7:08
subeditorPete O'Hanlon10-Jul-18 7:08 
GeneralRe: Bind TabItem ContexMenu Command To Window VM Pin
Kevin Marois10-Jul-18 7:38
professionalKevin Marois10-Jul-18 7:38 
GeneralRe: Bind TabItem ContexMenu Command To Window VM Pin
Pete O'Hanlon10-Jul-18 10:40
subeditorPete O'Hanlon10-Jul-18 10:40 
GeneralRe: Bind TabItem ContexMenu Command To Window VM Pin
Kevin Marois10-Jul-18 11:21
professionalKevin Marois10-Jul-18 11:21 
GeneralRe: Bind TabItem ContexMenu Command To Window VM Pin
Kevin Marois15-Jul-18 16:08
professionalKevin Marois15-Jul-18 16:08 
AnswerRe: Bind TabItem ContexMenu Command To Window VM Pin
NaBian18-Sep-18 5:11
NaBian18-Sep-18 5:11 
QuestionListBox of Hyperlinks - Selected Item Pin
Kevin Marois6-Jul-18 19:37
professionalKevin Marois6-Jul-18 19:37 
AnswerRe: ListBox of Hyperlinks - Selected Item Pin
Mycroft Holmes7-Jul-18 13:38
professionalMycroft Holmes7-Jul-18 13:38 
AnswerRe: ListBox of Hyperlinks - Selected Item Pin
Richard Deeming9-Jul-18 8:32
mveRichard Deeming9-Jul-18 8:32 
QuestionWhat is Silverlight / WPF??? Pin
Arnav12130-Jun-18 20:03
Arnav12130-Jun-18 20:03 
AnswerRe: What is Silverlight / WPF??? Pin
Richard MacCutchan30-Jun-18 20:50
mveRichard MacCutchan30-Jun-18 20:50 
QuestionNested Borders Mouse Over Pin
Kevin Marois14-Jun-18 7:44
professionalKevin Marois14-Jun-18 7:44 
AnswerRe: Nested Borders Mouse Over Pin
Richard Deeming14-Jun-18 9:35
mveRichard Deeming14-Jun-18 9:35 
GeneralRe: Nested Borders Mouse Over Pin
Kevin Marois14-Jun-18 10:51
professionalKevin Marois14-Jun-18 10:51 
QuestionWPF DataGrid uses a lot of memory, or is slow to scroll Pin
Leif Simon Goodwin14-Jun-18 5:16
Leif Simon Goodwin14-Jun-18 5:16 
AnswerRe: WPF DataGrid uses a lot of memory, or is slow to scroll Pin
Pete O'Hanlon14-Jun-18 5:21
subeditorPete O'Hanlon14-Jun-18 5:21 
GeneralRe: WPF DataGrid uses a lot of memory, or is slow to scroll Pin
Leif Simon Goodwin14-Jun-18 21:18
Leif Simon Goodwin14-Jun-18 21:18 

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.