Click here to Skip to main content
15,305,508 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Clipping To Rounded Corners Pin
sivaddrahcir20-Apr-09 8:31
Membersivaddrahcir20-Apr-09 8:31 
QuestionOnRenderComplete like event for WPF controls Pin
Pankaj Chamria13-Apr-09 1:38
MemberPankaj Chamria13-Apr-09 1:38 
QuestionContext menu in Datatemplate Pin
mikla52111-Apr-09 5:39
Membermikla52111-Apr-09 5:39 
QuestionRe: Context menu in Datatemplate Pin
Mark Salsbery11-Apr-09 7:42
MemberMark Salsbery11-Apr-09 7:42 
AnswerRe: Context menu in Datatemplate [modified] Pin
mikla52111-Apr-09 19:54
Membermikla52111-Apr-09 19:54 
QuestionRe: Context menu in Datatemplate Pin
Mark Salsbery13-Apr-09 8:47
MemberMark Salsbery13-Apr-09 8:47 
AnswerRe: Context menu in Datatemplate Pin
mikla52113-Apr-09 21:11
Membermikla52113-Apr-09 21:11 
GeneralRe: Context menu in Datatemplate Pin
Mark Salsbery14-Apr-09 7:00
MemberMark Salsbery14-Apr-09 7:00 
You'll need an x:class set on your resource dictionary that references the
class containing the click handler.

For example:
<!-- Dictionary1.xaml -->

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

    <DataTemplate x:Key="TestDataListTemplate" DataType="{x:Type local:Item}">
        <Border BorderBrush="SteelBlue" BorderThickness="4" >
            <Grid Background="LightSteelBlue" Height="20" >
                <Grid.ContextMenu>
                    <ContextMenu>
                        <MenuItem Header="Delete" Click="MenuItem_Click" />
                    </ContextMenu>
                </Grid.ContextMenu>
            </Grid>
        </Border>
    </DataTemplate>

</ResourceDictionary>

// DictionaryHandlerClass.cs

using System;
using System.Windows;

namespace WPFTester
{
    public partial class DictionaryHandlerClass
    {
        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
        }
    }
}


Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Context menu in Datatemplate Pin
mikla52114-Apr-09 20:11
Membermikla52114-Apr-09 20:11 
GeneralRe: Context menu in Datatemplate Pin
Mark Salsbery14-Apr-09 20:23
MemberMark Salsbery14-Apr-09 20:23 
QuestionInheritence in XAML Pin
0x3c010-Apr-09 9:09
Member0x3c010-Apr-09 9:09 
AnswerRe: Inheritence in XAML Pin
0x3c010-Apr-09 9:24
Member0x3c010-Apr-09 9:24 
QuestionStyles - Where Do I Put them? Pin
#realJSOP10-Apr-09 8:57
mva#realJSOP10-Apr-09 8:57 
AnswerRe: Styles - Where Do I Put them? Pin
R2B210-Apr-09 9:15
MemberR2B210-Apr-09 9:15 
GeneralRe: Styles - Where Do I Put them? Pin
#realJSOP10-Apr-09 10:21
mva#realJSOP10-Apr-09 10:21 
GeneralRe: Styles - Where Do I Put them? Pin
R2B210-Apr-09 10:59
MemberR2B210-Apr-09 10:59 
AnswerRe: Styles - Where Do I Put them? Pin
Mark Salsbery10-Apr-09 9:31
MemberMark Salsbery10-Apr-09 9:31 
GeneralRe: Styles - Where Do I Put them? Pin
#realJSOP10-Apr-09 10:22
mva#realJSOP10-Apr-09 10:22 
AnswerRe: Styles - Where Do I Put them? Pin
Wes Aday10-Apr-09 19:42
professionalWes Aday10-Apr-09 19:42 
AnswerRe: Styles - Where Do I Put them? Pin
ctnightmare13-Apr-09 9:56
Memberctnightmare13-Apr-09 9:56 
AnswerRe: Styles - Where Do I Put them? Pin
Jammer14-Apr-09 8:09
MemberJammer14-Apr-09 8:09 
QuestionWPF Expander Control - Custom Header Pin
#realJSOP10-Apr-09 3:16
mva#realJSOP10-Apr-09 3:16 
AnswerRe: WPF Expander Control - Custom Header Pin
mikla52110-Apr-09 3:28
Membermikla52110-Apr-09 3:28 
AnswerRe: WPF Expander Control - Custom Header Pin
Insincere Dave10-Apr-09 3:28
MemberInsincere Dave10-Apr-09 3:28 
AnswerRe: WPF Expander Control - Custom Header Pin
Eslam Afifi10-Apr-09 3:35
MemberEslam Afifi10-Apr-09 3:35 

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.