Development by Davis: “GIMP Magazine: motion photography and more” plus 8 more |
- GIMP Magazine: motion photography and more
- Open government and civic engagement at SXSW
- Retrieving RSS feeds for Twitter and Facebook
- Windows Phone: picking up contacts in code
- A VS2012 extension to use the WinRT APIs in desktop apps
- WinRT: ho to solve if ListView and GridView lose their way
- Playing media contents in loop with the MediaElement control
- My first eBook: "Hidden WPF"
- Windows Phone: the SaveAppointmentTask class
GIMP Magazine: motion photography and more Posted: 15 Mar 2013 02:00 AM PDT If you're interested in getting started with GIMP (GNU Image Manipulation Program), an open source alternative to Photoshop, then check out the latest issue of GIMP Magazine. The visuals are stunning. You can take a deep dive into motion photography and learn about filter options. The focus of this issue is photography and just under 90 pages. The team from GIMP Magazine has some great stuff accompanying this issue: |
Open government and civic engagement at SXSW Posted: 15 Mar 2013 12:00 AM PDT From the stage of the South by Southwest festival (SXSW), Code for America Founder and Executive Director, Jennifer Pahlka, announced they are now accepting applications for the 2013 Accelerator and 2014 Fellowship. |
Retrieving RSS feeds for Twitter and Facebook Posted: 14 Mar 2013 01:32 AM PDT You might need to analyze RSS feeds from different pages in order to get information and latest news from a channel. Facebook and Twitter are probably the most interesting, but there's no easy specific API. Fortunately it is possible to retrieve the RSS feed 2.0, that is XML, in a pretty easy way. The following URL allows retrieving the RSS feed of a Facebook page (not user profile): https://www.facebook.com/feeds/page.php?id=pageidnumber&format=rss20 Where pageidnumber is the id of the desired page. For instance, the Facebook address for my VB community in Italy is the following: https://www.facebook.com/feeds/page.php?id=295804250449780&format=rss20 About Twitter, you can retrieve a feed like this: https://api.twitter.com/1/statuses/user_timeline.rss?screen_name=username Where username is the account name of the person you are following. For instance, this is the RSS feed for the profile of my Italian VB community: https://api.twitter.com/1/statuses/user_timeline.rss?screen_name=vbtipsandtricks You might find this useful Alessandro |
Windows Phone: picking up contacts in code Posted: 14 Mar 2013 01:25 AM PDT In Windows Phone apps, you can easily pick up contacts from the contact list in code. You simply need to use a chooser called Microsoft.Phone.Tasks.AddressChooserTask. You define an instance: Private contattoSelezionato As String Dim WithEvents addressChooser As AddressChooserTask Public Sub New() InitializeComponent() Me.addressChooser = New AddressChooserTask End Sub Then you invoke Show to start the chooser: addressChooser.Show() To determine the returned contact, you handle the Completed event and you read the value only if the user has confirmed her choice (the TaskResult.OK value from the TaskResult enum): Private Sub addressChooser_Completed(sender As Object, e As AddressResult) Handles addressChooser.Completed If e.TaskResult = TaskResult.OK Then Me.contattoSelezionato = e.DisplayName End If End Sub Other than the DisplayName you can also retrieve the Address , which is actually the value that determines the difference between contacts with the same name or between elements belonging to the same contact. Alessandro |
A VS2012 extension to use the WinRT APIs in desktop apps Posted: 14 Mar 2013 01:20 AM PDT Anyone who has ever built for Windows 8 and the Windows Runtime probably wondered how it is possible to use WinRT in desktop applications. Even though with some limitations, this is possible and requires some manual steps so that a project can reference Windows 8's libraries. Lucian Wischik has published an interesting extension for Visual Studio 2012, which adds a Console app project template which is ready to take advantage of WinRT. Such an extension is available from the Visual Studio Gallery at this address, where you will also find hints for the usage. Lucian has also published an article on CodeProject, where he provides detailed information about this scenario. Remember that som APIs from WinRT cannot be used on the desktop for privacy and security reasons, especially those related to some devices and that work in a sandboxed environment. Alessandro |
WinRT: ho to solve if ListView and GridView lose their way Posted: 14 Mar 2013 01:14 AM PDT In a Windows Store App I've been working on, I had to face a particular problem. It is a problem that can randomly occur with the GridView and ListView controls and it probably depends on the DataTemplate you use. Consider the following GridView: <GridView Name="MyView" ItemsSource="{Binding}" Margin="0,15,0,0" HorizontalAlignment="Left"> <GridView.ItemTemplate> <DataTemplate> <!-- custom DataTemplate --> </DataTemplate> </GridView.ItemTemplate> </GridView> In this page I have this object; then I navigate to a secondary page. From the secondary page, I navigate back to the page where I have the GridView. As a result, instead of showing items horizontally (as required), the control shows them vertically losing the original orientation. I searched on the Internet but the only one taling about this problem is a guy at Microsoft, who provides a possible solution in this blog post. Unfortunately that solution did not work for me, so what I did is changing the template of the panel for the view. In this case I used a StackPanel. This works well for me because I have a few items and I don't need virtualization. In code: <GridView.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation="Horizontal"/> </ItemsPanelTemplate> </GridView.ItemsPanel> In this way, everything worked correctly. In conclusion, if you face this problem remember to work on the ItemsPanelTemplate. Alessandro |
Playing media contents in loop with the MediaElement control Posted: 14 Mar 2013 01:04 AM PDT The MediaElement control is used to play media contents in Technologies like WPF, Silverlight, WinRT and Windows Phone. You might have the need to play a content forever, with a loop. A very easy way to accomplish this is Handling the MediaEnded and restart from there. For example, we declare a boolean variable to store the loop state (enabled/disabled): Private isLoop As Boolean = False This can be useful if we associate the state of the loop to a button, which is just responsible to change its value: Private Sub LoopButton_Click(sender As Object, e As EventArgs) isLoop = Not isLoop End Sub Somewhere else we'll start playing the content; the important thing is how we handle the event, like in the following example: Private Sub Media1_MediaEnded(sender As Object, e As RoutedEventArgs) Handles Media1.MediaEnded If isLoop = True Then Me.Media1.Position = New TimeSpan(0) Me.Media1.Play() End If End Sub Basically the code first checks if the loop state is active, then it moves the position back to zero and restarts playing. Alessandro |
Posted: 14 Mar 2013 12:58 AM PDT A few days ago, we have released my first eBook called "Hidden WPF: Secrets for creating great applications in WPF": Published by InformIT (the online division of my publisher SAMS/Pearson), this is a different publication. It's a very small book, 99 pages, produced and thought for mobile devices. Here you will find tons of tips & tricks, suggestions, and real world implementations that I collected in my daily work, building applications with Windows Presentation Foundation. Price is $ 7,99. You will find many info about working with PDF and XPS documents, suggestions to get the most out of the Visual Studio IDE with WPF, enhancing your debugging experience, improving the user interface performance, common requirements (e.g. ComboBox controls with lookup tables), descriptions of Productivity tools either free or paid, that you might have probably missed. I'm aware that WPF has been definitely become very popular in the developer community Worldwide, so probably this publication can bring you some value. After all, we do not have to forget that WPF is the premiere technology about building apps for the Desktop, despite HTML5, the Web, and the apps for Windows 8. Alessandro |
Windows Phone: the SaveAppointmentTask class Posted: 14 Mar 2013 12:50 AM PDT The Windows Phone 8 SDK introduces new launchers, which are tasks on the phone that you can interact with via managed code. Among the Others, the new Microsoft.Phone.Tasks.SaveAppointmentTask class allows saving an appointment in the calendar or an activity in the specified time interval. For instance, the following code creates an appointment in the calendar: Dim appointmentTask As New SaveAppointmentTask With appointmentTask .AppointmentStatus = Microsoft.Phone.UserData.AppointmentStatus.OutOfOffice .Details = "Going on vacations" .StartTime = New Date(2013, 7, 1) .EndTime = New Date(2013, 7, 18) .Location = "Seaside" .Reminder = Reminder.OneDay .Subject = "I'm not available" .Show() End With Properties are pretty self-explanatory, in particular focus on the AppointmentStatus one which allows chosing how we should appear to our contacts, by selecting a value from the Microsoft.Phone.UserData.AppointmentStatus. We can chose among OutOfOffice, Busy, Free, Tentative . The Reminder property instead allows selecting a value from the Microsoft.Phone.Tasks.Reminder to set the reminder time. In this case, a reminder appears the day before (OneDay) but many are the available values. IntelliSense will help you as usual. Of course the appointment will not be saved directly, but it will require interaction with the user who will be able to edit the appointment details via a familiar user interface, as demonstrated in the following figure: Alessandro |
You are subscribed to email updates from Developers by Davis To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
No hay comentarios:
Publicar un comentario