Click here to Skip to main content
14,693,634 members
Home » Discussions » Silverlight / WPF
   

Silverlight / WPF

 
AnswerRe: PredicateBuilder Question Pin
Richard Deeming16-Jul-18 9:19
mveRichard Deeming16-Jul-18 9:19 
AnswerRe: PredicateBuilder Question Pin
Gerry Schmitz16-Jul-18 11:15
mveGerry Schmitz16-Jul-18 11:15 
QuestionWPF HyperLink Binding To MainWindowViewMOdel Not Working Pin
Kevin Marois9-Jul-18 18:02
professionalKevin Marois9-Jul-18 18:02 
AnswerRe: WPF HyperLink Binding To MainWindowViewMOdel Not Working Pin
Pete O'Hanlon9-Jul-18 21:07
subeditorPete O'Hanlon9-Jul-18 21:07 
GeneralRe: WPF HyperLink Binding To MainWindowViewMOdel Not Working Pin
Kevin Marois10-Jul-18 7:53
professionalKevin Marois10-Jul-18 7:53 
QuestionBind TabItem ContexMenu Command To Window VM Pin
Kevin Marois8-Jul-18 13:03
professionalKevin Marois8-Jul-18 13:03 
AnswerRe: Bind TabItem ContexMenu Command To Window VM Pin
Richard Deeming9-Jul-18 9:35
mveRichard Deeming9-Jul-18 9:35 
GeneralRe: Bind TabItem ContexMenu Command To Window VM Pin
Kevin Marois9-Jul-18 17:23
professionalKevin Marois9-Jul-18 17: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 8:08
subeditorPete O'Hanlon10-Jul-18 8:08 
GeneralRe: Bind TabItem ContexMenu Command To Window VM Pin
Kevin Marois10-Jul-18 8:38
professionalKevin Marois10-Jul-18 8:38 
GeneralRe: Bind TabItem ContexMenu Command To Window VM Pin
Pete O'Hanlon10-Jul-18 11:40
subeditorPete O'Hanlon10-Jul-18 11:40 
GeneralRe: Bind TabItem ContexMenu Command To Window VM Pin
Kevin Marois10-Jul-18 12:21
professionalKevin Marois10-Jul-18 12:21 
GeneralRe: Bind TabItem ContexMenu Command To Window VM Pin
Kevin Marois15-Jul-18 17:08
professionalKevin Marois15-Jul-18 17:08 
AnswerRe: Bind TabItem ContexMenu Command To Window VM Pin
NaBian18-Sep-18 6:11
MemberNaBian18-Sep-18 6:11 
QuestionListBox of Hyperlinks - Selected Item Pin
Kevin Marois6-Jul-18 20:37
professionalKevin Marois6-Jul-18 20:37 
AnswerRe: ListBox of Hyperlinks - Selected Item Pin
Mycroft Holmes7-Jul-18 14:38
professionalMycroft Holmes7-Jul-18 14:38 
AnswerRe: ListBox of Hyperlinks - Selected Item Pin
Richard Deeming9-Jul-18 9:32
mveRichard Deeming9-Jul-18 9:32 
QuestionWhat is Silverlight / WPF??? Pin
Arnav12130-Jun-18 21:03
MemberArnav12130-Jun-18 21:03 
AnswerRe: What is Silverlight / WPF??? Pin
Richard MacCutchan30-Jun-18 21:50
mveRichard MacCutchan30-Jun-18 21:50 
QuestionNested Borders Mouse Over Pin
Kevin Marois14-Jun-18 8:44
professionalKevin Marois14-Jun-18 8:44 
AnswerRe: Nested Borders Mouse Over Pin
Richard Deeming14-Jun-18 10:35
mveRichard Deeming14-Jun-18 10:35 
GeneralRe: Nested Borders Mouse Over Pin
Kevin Marois14-Jun-18 11:51
professionalKevin Marois14-Jun-18 11:51 
QuestionWPF DataGrid uses a lot of memory, or is slow to scroll Pin
Leif Simon Goodwin14-Jun-18 6:16
mvaLeif Simon Goodwin14-Jun-18 6:16 
AnswerRe: WPF DataGrid uses a lot of memory, or is slow to scroll Pin
Pete O'Hanlon14-Jun-18 6:21
subeditorPete O'Hanlon14-Jun-18 6:21 
GeneralRe: WPF DataGrid uses a lot of memory, or is slow to scroll Pin
Leif Simon Goodwin14-Jun-18 22:18
mvaLeif Simon Goodwin14-Jun-18 22: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.