|
Have you considered using TRIGGERS in a STYLE applied to the controls.
Then you don't have to write any code.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Hi, I'm developing a WPF application that seems to work fine, but after an long inactivity period, when the user clicks something it freezes for a while then it runs normally. This is the only application running in that computer, so I don't know what could be causing this.
In my application I need to check the time between user clicks so I'm intercepting Windows messages like this:
void Window_Loaded(object sender, RoutedEventArgs e)<br />
{<br />
ResetTimeoutChecker();
HwndSource source = HwndSource.FromHwnd(new WindowInteropHelper(this).Handle);<br />
source.AddHook(new HwndSourceHook(myWndProc));<br />
}<br />
<br />
private static IntPtr myWndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)<br />
{<br />
if (msg == 0x0201)
ResetTimeoutChecker();<br />
<br />
return IntPtr.Zero;<br />
}
|
|
|
|
|
Maybe you can use one of the WPF Preview... events on your Window. Since the Window will "see" the event before it happens, you can perform you checks there. Then you can remove all the above code.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
thanks man, I'm gonna try that right now, but I don't think its gonna make a difference
|
|
|
|
|
Hey All,
I was just thinking about this question since it was/is a fairly large topic of discussion on the web this year. Isn't Blend itself a good example of the fact that it is ready ...
Just a thought ...
|
|
|
|
|
It certainly is ready for LOB apps, and if you want to take a look at the work that Karl is doing, you'll see more examples of WPF and LOB apps. BTW - Visual Studio (future versions) will be more WPF based, with more of the interface being developed in WPF.
|
|
|
|
|
Agreed.
I'm really looking forward to what Karl contributes to the whole thing. VS is a great IDE and more WPF integration can only be a good thing imho.
|
|
|
|
|
Also worth mentioning is the fact that Expression Blend is entirely written in WPF.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
I'm pretty sure that was Jammer's point.
|
|
|
|
|
Yep...you're right. That's what happens when one doesn't fully read the original post.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
|
WPF is LOB ready today and this space will only get way better in the future.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
For sure ... i'm working on two LOB WPF apps at the moment.
|
|
|
|
|
Hi,
I am working with designing custom controls for WPF applications. My problem is I couldn't find a way to force a control property appear in the XAML window by default. It appears only when its changed by the user. for example a button has a propert called myProp which I initializes in the constructor, but It doesn't gets reflected in the XAML file of the window. pls tell me how to force a property to appear in the .xaml file, by default whenever a control is placed on the WPF window.
thanks in advance,
vinod
|
|
|
|
|
Simple answer, you can't. Sorry about that.
|
|
|
|
|
thn how microsoft manages to embed some control property into the xaml by default. Like the name proprty of a control derived from Usercontrol.
or can tell me if there is any work around
modified on Tuesday, October 14, 2008 2:50 AM
|
|
|
|
|
plz can any body give me the code which transfer to another page
like (server.Transfer()) or (response.redirect())
|
|
|
|
|
You can use System.Windows.Browser.HtmlPage.Window.Navigate( Uri ) for similar purpose in Silverlight.
Regards,
Syed Mehroz Alam
|
|
|
|
|
thank u very much
it worked with me
|
|
|
|
|
|
|
How to assign stream as source to WPF mediaelement control. In Silverlight I can do it using mediaelement.SetSource. I am not able to find out how to do it in WPF application.
|
|
|
|
|
Posting in this[^] forum would be more appropriate.
Syed Mehroz Alam.
|
|
|
|
|
|
Are you creating your own language service?
If not can you provide a few more details.
modified 27-Feb-21 21:01pm.
|
|
|
|