Dependency property getters and setters in multithreaded environment

29 באפריל 2007

Recently I blogged about Thread safe ObservableCollection. And what's about regular single Dependency Properties? Actually, the story is rather same and the rule is clear - Bring into your STAThread first, then do whatever you want to do. So how to do it? Simple Let's create regular window with two DPs MyTextProperty and ButtonTitleProperty. We'll bind TextBox to MyTextProperty and will change it from other thread, based on ButtonTitleProperty value. So, first of all those properties ...
4 תגובות

Snipping tool integration plugin for WLW

28 באפריל 2007

 Playing a lot with Live Writer API, I found a lot of nice features and possibilities, as well as not-so-nice problems, but one thing is really clear - writing plugins for Windows Live Writer is fun and quick work. Let's take an example of Yossi's request. It took me about a half an hour to write it, or today's plugin for snipping tool integration - 25 minutes, including installer. Don't is really nice? OK, so, you can download it - this plugin...
תגובה אחת

Is "web scrapping" legal?

27 באפריל 2007

Most of those fun webparts widgets gadgets use technology named "web scrapping" (an ability to "wrap off" content from web sites and display it within own layout). But not all of those gadgets provided by real content owners, most of them were developed by someone else. And almost no one of those developers has legal permissions for using and distributing content this way. So I have a question: "Is it legal?" From one hand, such gadgets, as well as RSS feeds provide outstanding push...
תגיות: ,
אין תגובות

RTL and LTR in Windows Live Writer

26 באפריל 2007

Someone is crying for a couple of days about text direction support in WLW. I decided to help all those, who have to wait for MS to understand, that there are right-to-left languages in the market, that even with really good HTML/RichText control we should support it. So, I decided to write simple plugin for Live Writer and change the direction of input to RTL or LTR, send Change Input Language signal to the workspace and add two magic tags, Yossi is very worry...
3 תגובות

Thread safe observable collection

22 באפריל 2007

If you ever wrote something more, then standard UI input-output, you sure got into wide range of exceptions like "The calling thread cannot access this object because a different thread owns it" or "This type of CollectionView does not support changes to its SourceCollection from a thread different from the Dispatcher thread". What the problem? The problem is old like condom in my wallet world-old, the try to get into resources from different threads. Let me show you some code. Very-very...
41 תגובות

New source copy helper for Windows Live Writer

20 באפריל 2007

Are you already tiered of BlogMyCode or CopyAsHTML popup windows and non-standard right-mouse-click-do-something-then-maybe-I-help-you dialogs? Let me introduce my last plugin for Windows Live Writer blog client - Code Past Plugin. It's really simple as it should be. This plugin uses standard copy functions from anywhere (no only from VS2005). Then it converts code into XHTML and put it into WLW window. Don't this should work this way? Without right clicks and unnecessary windows? Download it now and use it. Here the...
5 תגובות

How to read GPS metadata from image

19 באפריל 2007

Someone asks about how to get GPS (and other) metadata from Image properties. It's easy once we have Windows Imaging Component, which now the integrate part of .NET framework 3.0, so you can get meta information directly from your image. How to do it? First of all, you should get BitmapMetadata out from your source. In order to do it you should use BitmapDecoder, there are some of them, one for each image type (Jpg, Bmp, Png, Gif etc). So let's...
תגיות: , ,
3 תגובות

TreeView and ObservableCollection weird bug

18 באפריל 2007

Recently my client points me to strange bug, if observable collection is binded to treeview and you are trying to perform Move or Replace action on the ObservableCollection, the exception "Unexpected collection change action 'Replace'" or "Unexpected collection change action 'Move'" will be thrown. This not happens with other ItemsControl e.g. ListBox. So, this is one of WPF confirmed bugs (which actually already fixed). How to build workaround? Simple, you do not have to know WPF in order to do it....
תגיות: , ,
4 תגובות

ListBoxItem index or enumirating of ListBox Items over filtered data source

17 באפריל 2007

One of my clients asked me today, how it possible to put the index of ListBox Item near the value, while data source of it might be filtered. How to get the index from inside data source all of you, I believe, knows, but how to ask out host (it might be any ItemsCountrol) about what the real index of the binded item, while some of items are hidden. So, in order to do it, we have to be able to "ask"...
תגובה אחת

Now it's official – WPF/E=SilverLight

16 באפריל 2007

New "flash killer" is here and this time it's serious. Today at NAB conference, Microsoft announced and demonstrates it's next generation cross-platform web technology Microsoft Silverlight. Actually, it's totaly rebranded WPF/E . Microsoft Silverlight will enable content providers to deliver media experiences and rich interactive applications that incorporate media, graphics, animation, and much, much more with full application functionality on both Windows and Mac platforms and inside IE, Firefox and Safari. Silverlight users will also enjoy compatibility with the broad ecosystem of Windows...
תגיות: , ,
5 תגובות