Prevent unexpected System Shutdown During runtime

31 בOctober 2014

,Running application could be critical sometimes .For example while writing Data to server of course we can by configuring OS from Win7 and up to provide information on running apps ,for most of times when we are try to shutdown or sleep the system Yet we have special event in Application class we can registered on, and getting noticed when :OS get into logoff or shutdown public partial class App : Application { public App() { SessionEnding...
אין תגובות

WPF string is null or empty using Xaml Trigger

20 בOctober 2014

:Nice to have When work on xaml and no C# available from any reason (no binding and no converter) :We can also do some tricks on UI like in this case We have a textBlok and we need to hide it when no text presented In C# we use to write if(! String.IsNullOrEmpty(string value)) :But, it can be easily done with pure Xaml with Trigger like <Style TargetType="TextBlock"> <Style.Triggers> <Trigger Property="Text" Value=""> ...
2 תגובות

WPF ViewModel get noticed on View Visibility

7 בOctober 2014

,The request is simple View object, from any kind can react to Visibility interactions, now, the ViewModel behind it ..might be connected the some services, and registered to Events, etc Well, if the view Target isn’t active, we like to block the background work , especially from .efficiency consideration's but not only There is a few tricks about it, but we must remember that the first demand is to reduce coupling between components. And connections from ViewModel to View must minimize to DataContext .injection :As starter try simple solution than we try to deploy it to better one .1 :base contract for View Visibility Observer public interface IViewVisibileObserver ...
תגובה אחת