Click here to Skip to main content
14,297,353 members

Silverlight / WPF

 
QuestionWPF: Reading a document's bytes into a stream to store in a database table. Pin
holdorf31-Aug-16 10:47
memberholdorf31-Aug-16 10:47 
AnswerRe: WPF: Reading a document's bytes into a stream to store in a database table. Pin
Pete O'Hanlon31-Aug-16 11:16
protectorPete O'Hanlon31-Aug-16 11:16 
QuestionUWP. How to find out size of uwp Windows.Storage element? Pin
wind te26-Aug-16 22:42
memberwind te26-Aug-16 22:42 
AnswerRe: UWP. How to find out size of uwp Windows.Storage element? Pin
Pete O'Hanlon31-Aug-16 12:29
protectorPete O'Hanlon31-Aug-16 12:29 
QuestionClosing a static WPF Window from other Window instances. Pin
holdorf23-Aug-16 3:23
memberholdorf23-Aug-16 3:23 
AnswerRe: Closing a static WPF Window from other Window instances. Pin
holdorf23-Aug-16 4:09
memberholdorf23-Aug-16 4:09 
AnswerRe: Closing a static WPF Window from other Window instances. Pin
Richard Deeming23-Aug-16 4:27
mveRichard Deeming23-Aug-16 4:27 
QuestionCommunicating Between ViewModels Pin
JBHowl18-Aug-16 2:12
memberJBHowl18-Aug-16 2:12 
I'm new to WPF/MVVM and have been trying to come up with a solution for communicating between ViewModels. The best i've been able to come up with is below, it works, but it feels dirty and shameful. Any suggestions would be greatly appreciated.

public delegate void OnMessageReceivedEventHandler(object sender, object message);

   public static class Message
   {
       static List<OnMessageReceivedEventHandler> listeners = new List<OnMessageReceivedEventHandler>();

       public static void AddListener(OnMessageReceivedEventHandler onMsgReceived)
       {
           listeners.Add(onMsgReceived);
       }

       public static void RemoveListener(OnMessageReceivedEventHandler onMsgReceived)
       {
           listeners.Remove(onMsgReceived);
       }

       public static void SendMessage(object sender, object msg)
       {
           foreach (OnMessageReceivedEventHandler m in listeners)
               if (m != null)
                   m(sender, msg);
       }
   }

Nothing works better than just improving your product.

AnswerRe: Communicating Between ViewModels Pin
Pete O'Hanlon18-Aug-16 3:24
protectorPete O'Hanlon18-Aug-16 3:24 
SuggestionRe: Communicating Between ViewModels Pin
AlexaGrey8628-Aug-16 2:43
memberAlexaGrey8628-Aug-16 2:43 
AnswerRe: Communicating Between ViewModels Pin
Kenneth Haugland18-Aug-16 5:07
professionalKenneth Haugland18-Aug-16 5:07 
QuestionWPF / Prism: Design decision with different views for same region Pin
SutterA17-Aug-16 2:12
memberSutterA17-Aug-16 2:12 
AnswerRe: WPF / Prism: Design decision with different views for same region Pin
Gerry Schmitz17-Aug-16 6:22
mveGerry Schmitz17-Aug-16 6:22 
GeneralRe: WPF / Prism: Design decision with different views for same region Pin
SutterA18-Aug-16 20:05
memberSutterA18-Aug-16 20:05 
GeneralRe: WPF / Prism: Design decision with different views for same region Pin
Gerry Schmitz19-Aug-16 4:44
mveGerry Schmitz19-Aug-16 4:44 
AnswerRe: WPF / Prism: Design decision with different views for same region Pin
Mycroft Holmes17-Aug-16 14:31
memberMycroft Holmes17-Aug-16 14:31 
AnswerRe: WPF / Prism: Design decision with different views for same region Pin
Pete O'Hanlon19-Aug-16 0:31
protectorPete O'Hanlon19-Aug-16 0:31 
QuestionSignalR Project Problem Revisited Pin
Kevin Marois14-Aug-16 17:58
professionalKevin Marois14-Aug-16 17:58 
QuestionBasic WPF binding to collection in combobox. Pin
wind te10-Aug-16 11:48
memberwind te10-Aug-16 11:48 
AnswerRe: Basic WPF binding to collection in combobox. Pin
Pete O'Hanlon10-Aug-16 12:20
protectorPete O'Hanlon10-Aug-16 12:20 
GeneralRe: Basic WPF binding to collection in combobox. Pin
wind te10-Aug-16 18:41
memberwind te10-Aug-16 18:41 
GeneralRe: Basic WPF binding to collection in combobox. Pin
Pete O'Hanlon10-Aug-16 21:21
protectorPete O'Hanlon10-Aug-16 21:21 
AnswerMessage Closed Pin
10-Aug-16 16:19
professionalBeginner Luck10-Aug-16 16:19 
GeneralRe: Basic WPF binding to collection in combobox. Pin
Mycroft Holmes10-Aug-16 17:01
memberMycroft Holmes10-Aug-16 17:01 
Questionwpf gridview does not have a row selected event Pin
holdorf9-Aug-16 4:26
memberholdorf9-Aug-16 4:26 

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.