DCSIMG
Tips - Pavel's Blog
Sign in | Join | Help

Pavel's Blog

Pavel is a software guy that is interested in almost everything
software related... way too much for too little time

Browse by Tags

Making HTTP calls in WinRT with C++
14 January 13 04:36 AM | pavely | with no comments
When working with Windows Store applications (“metro”), it’s sometimes necessary to make HTTP calls. one classic example is to register for push notifications . After obtaining a unique channel URI, the app needs to send that URI to its application server, as that particular URI is the one to use by the application server to execute a push notification against the Windows Notification Service (WNS). Getting the channel URI is fairly simple, with a call to the static PushNotificationChannelManager...
WPF/Silverlight Tip: Transparent Hit Testing
23 February 12 08:56 AM | pavely | with no comments
Hit testing is the process of finding out which elements (if any) contain a certain point (typically the location of the mouse pointer). Sometimes, however, there is a need to disregard some elements in a hit testing scenario. Consider this simple program that allows moving of circles: One can grab a circle and drag it around. Here’s the MouseLeftButtonDown event handler on the containing Canvas: void OnMouseDown( object sender, MouseButtonEventArgs e) { var shape = e.Source as Shape ; if (shape...
תגים:, , , ,
WPF Tip: Binding to the Selected Item in a Master-Details View
06 December 11 04:00 PM | pavely | with no comments
Master-details is a common way to display data. A master view provides minimal data for a collection of objects (e.g. book names), and when selecting one such item, a details view provides more information for the selected item (e.g. a book’s name, author, publication date, etc.). In WPF, data binding (in XAML) is typically used to achieve the connection between an object and its details without using any code. Let’s see how we can achieve this. Let’s say we want to show a list of book names, and...
תגים:, , , ,
WPF Tip: SharedSizeGroup
26 November 11 05:54 PM | pavely | with no comments
Suppose we want to display a set of objects in a ListBox (or other ItemsControl ) using a DataTemplate that uses a Grid : < ListBox HorizontalContentAlignment ="Stretch" x : Name ="_list" > < ListBox.ItemTemplate > < DataTemplate > < Border Margin ="2" BorderBrush ="Blue" BorderThickness ="2" Padding ="2"> < Grid > < Grid.ColumnDefinitions > < ColumnDefinition Width ="Auto" /> < ColumnDefinition...
תגים:, , , ,
Reminder: WPDUG September Meeting
04 September 11 01:05 AM | pavely | with no comments
This Wednesday (the 7th) will hold a Windows Platform Developer User Group meeting in Microsoft’s offices in Ra’anana (Israel). Our first session will be about adding realtime and deterministic capabilities to Windows and its impact on the system and the ways to program such a system (all based on addons by a company called TenAsys ). The second session will demonstrate useful (and undocumented) debugging tips and tricks in Visual Studio (primarily for native developers). Should be interesting for...
WPF Tip: Using a MouseDoubleClick event where none exists
03 August 11 10:46 AM | pavely | 2 comment(s)
Consider the following simple piece of XAML:        < Border Margin ="10" BorderBrush ="Black" BorderThickness ="2">             < Grid Margin ="4">                 < Rectangle Fill ="Red" />                ...
תגים:, , , ,