Calling "function" on control
Posted
by Sascha
on Stack Overflow
See other posts from Stack Overflow
or by Sascha
Published on 2010-04-04T20:58:11Z
Indexed on
2010/04/04
21:03 UTC
Read the original article
Hit count: 491
Hi,
I'm using MVVM in my WPF project. Now I want to display a subwindow when someone presses a button. To achieve this classically I would call the Show() method. What I want now, to keep my application clear, is to bind the button to the Show() function of the subwindow.
As the button click (menu click, whatever) is not always allowed I wrote a custom command that evaluates if the command can be executed. However, I did not found a clue how to call the function of that control in a clean way. Is this the point to do some classic style (code in the frontend)?
-sa
© Stack Overflow or respective owner