Subversion Repositories SoapBoxCore

Rev

Blame | Last modification | View Log | RSS feed

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:SoapBox.Core"
    x:Class="SoapBox.Core.ContextMenuWrapperView">

    <Style TargetType="{x:Type local:ContextMenuWrapper}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:ContextMenuWrapper}">

                    <ContentPresenter 
                        Content="{TemplateBinding Content}"
                        Margin="{TemplateBinding Padding}"
                        ContextMenuOpening="contentPresenter_ContextMenuOpening">
                        <ContentPresenter.ContextMenu>
                            <ContextMenu
                                ItemsSource="{Binding Path=(local:IContextMenu.ContextMenu)}"
                                IsEnabled="{Binding Path=(local:IContextMenu.ContextMenuEnabled)}"
                                ItemContainerStyle="{DynamicResource contextMenuStyle}"
                                />
                        </ContentPresenter.ContextMenu>
                    </ContentPresenter>

                </ControlTemplate>
            </Setter.Value>
        </Setter>

    </Style>

</ResourceDictionary>