Click here to Skip to main content

WCF

    RSS: RSS Feed

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page  Show 
  Refresh
GeneralRe: Operator overloading in WCF Pinmembersris 4260:23 24 Nov '09  
AnswerRe: Operator overloading in WCF Pinmember d@nish 1:28 24 Nov '09  
GeneralRe: Operator overloading in WCF Pinmembersris 4262:41 24 Nov '09  
GeneralRe: Operator overloading in WCF Pinmember d@nish 3:53 24 Nov '09  
QuestionCollectionView CustomSort on another thread? Pinmemberdaniel radford1:31 20 Nov '09  
QuestionAccessing a named element in within a container element inside a resource dictionary PinmemberfjparisIII17:42 18 Nov '09  
AnswerRe: Accessing a named element in within a container element inside a resource dictionary [modified] PinmemberEslam Afifi12:19 19 Nov '09  
If I understood what you want correctly, you just want a local event handler to that object (you don't want to access the event from the Window or Control that will host the document). Add a a partial class for the dictionary. Write your event handler in that class. Link to that class from the dictionary XAML using x:Class
Here is a sample code,
// Dictionary1.xaml
<ResourceDictionary x:Class="ResourcesDemo.Dictionary1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <FlowDocument x:Key="doc">
        <FlowDocument.Blocks>
            <Paragraph>
                <Hyperlink Click="Hyperlink_click">Say hello</Hyperlink>
            </Paragraph>
        </FlowDocument.Blocks>
    </FlowDocument>
</ResourceDictionary>
 
// Dictionary1.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
 
namespace ResourcesDemo
{
    public partial class Dictionary1
    {
        private void Hyperlink_click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("Hello, world!");
        }
    }
}

 
Eslam Afifi
modified on Thursday, November 19, 2009 5:47 PM

GeneralRe: Accessing a named element in within a container element inside a resource dictionary PinmemberfjparisIII9:53 20 Nov '09  
GeneralRe: Accessing a named element in within a container element inside a resource dictionary PinmemberEslam Afifi11:06 22 Nov '09  
QuestionDigest Validation Failed PinmemberMember 23947000:10 18 Nov '09  
AnswerRe: Digest Validation Failed PinmemberMREcoolio8:44 19 Nov '09  
QuestionWhy DataMember attribute is applying on class fields rather than Properties in WCF, I am using the Serialization Pinmemberkalyan_vb0:00 18 Nov '09  
AnswerRe: Why DataMember attribute is applying on class fields rather than Properties in WCF, I am using the Serialization PinmemberEslam Afifi14:58 19 Nov '09  
AnswerRe: Why DataMember attribute is applying on class fields rather than Properties in WCF, I am using the Serialization PinmvpMark Salsbery9:15 22 Nov '09  
GeneralBlend 2 vs Blend 3 PinmemberBRShroyer10:31 17 Nov '09  
GeneralRe: Blend 2 vs Blend 3 PinmvpMark Salsbery13:19 17 Nov '09  
QuestionSetting PerformanceCounters in code/c# PinmemberJan-Erik Romøren4:42 17 Nov '09  
QuestionReturning stream from a WCF Service to the client Pinmemberramz_g20:59 16 Nov '09  
AnswerRe: Returning stream from a WCF Service to the client PinmemberMREcoolio8:45 19 Nov '09  
GeneralRe: Returning stream from a WCF Service to the client Pinmemberramzg5:23 23 Nov '09  
QuestionExpression Blend Samples ? PinmemberMohammad Dayyan1:45 14 Nov '09  
AnswerRe: Expression Blend Samples ? PinmvpMark Salsbery11:40 14 Nov '09  
QuestionConverting a WCF project from C# to VB Pinmemberbubk4:49 13 Nov '09  
JokeRe: Converting a WCF project from C# to VB PinsupporterMark Nischalke7:37 13 Nov '09  
GeneralRe: Converting a WCF project from C# to VB Pinmemberbubk8:00 13 Nov '09  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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 | Mobile
Web04 | 2.5.120210.1 | Last Updated 9 Feb 2012
Copyright © CodeProject, 1999-2012
All Rights Reserved. Terms of Use
Layout: fixed | fluid