For the best viewing experience, install the latest version of Silverlight here.

XAML Blog - Silverlight, WPF, WP7

Subscribe via RSS
14May/13 0

Airplanes 2.2 has been released

Checkout this new and exciting update of my Airplanes game.

http://xamlblog.com/Images/AirplanesV2.2Banner.jpg

Highlights:

- Play Online with people from all over the world

- Cross-Platform: play from Windows 8 Tablet, Windows Phone, PC(Windows and MAC) and Facebook…soon it will also be available on iPhone and iPad

- In-Game Chat

- Leaderboards with ranks (Captain, Major, Colonel and General)

- Share your victory on Facebook and Twitter

- Live Tile that shows your Best Score and Rank

Here are the links:

- Windows 8 Tablet

- Windows Phone

- PC (Windows and MAC)

- Facebook

- iPhone and iPad: COMMING SOON

Enjoy!

Filed under: Airplanes,Windows Phone,WP7,Windows 8,Facebook,Links 0 Comments
27Jan/13 0

Airplanes for Facebook has just been bumped to version 2.1

Airplanes for Facebook has just been bumped to version 2.1

http://xamlblog.com/Images/AirplanesV2.1.png

The new version includes:

- Smarter computer opponents

- Share your victory on Facebook/Twitter

- UI Improvements

- Bug fixes

The game can be accessed from Facebook here: http://apps.facebook.com/airplanes-battle/

More info can be found here: http://apps.xamlblog.com

Filed under: Airplanes, Windows Phone, Facebook, Links 0 Comments
11Nov/12 0

Airplanes at WOWZAPP 2012

Saturday I was invited by Petru Jucovschi from Microsoft Romania to introduce my Airplanes game at WOWZAPP 2012, a 48-hour Hackathon dedicated to developing applications for Windows.

http://xamlblog.com/Images/WOWZAPP_Airplanes.jpg

There I had the opportunity to meet more developers including Cristi and Irinel, Fillr game developers. To my surprise I found that they are also from Prahova county, so Prahova county rulz Windows 8 :)

I was pleased to participate in this event and to see that Microsoft Romania began to get involved in supporting Romanian developers, I hope this becomes a good habit.

I think the future in terms of developing applications for mobile devices is Windows 8 and Window Phone 8.

Filed under: Airplanes,Microsoft,Windows 8,Windows Phone,Links 0 Comments
26Sep/12 0

Airplanes for Windows 8 is now available in the store

Great news! We have just released the Windows 8 version of our Airplanes game. You can find it in the Windows 8 Store here.

http://xamlblog.com/Images/Airplanes Windows 8.png

Stay tuned for the next update where you will be able to play this game ONLINE, over the internet, with friends or with random players.

Airplanes is available on Windows 8, Windows Phone, Facebook and PC. Here are the links:

- Windows 8 version

- Windows Phone version

- Facebook version

- PC version

Please feel free to drop us a word here, on Facebook or rate the game on Windows 8 Store/Windows Phone Store.

Enjoy!

Filed under: Airplanes,Windows 8,Windows Store 0 Comments
4May/12 0

Airplanes 2.0 has been released

We have just released version 2.0 of our Airplanes game.

http://www.xamlblog.com/Images/AirplanesV2.png

The new version includes:

- Major UI Improvements

- Position your airplanes with Drag & Drop

- New fire/miss effects

- Share your victory on Facebook/Twitter

- New animations and a more attractive color theme

- Bug fixes

The game can be purchased from Windows Phone Marketplace for just $ 0.99.

Play Airplanes for FREE here:

- Airplanes FREE for Windows Phone - Airplanes FREE for PC - Airplanes FREE for Facebook

Enjoy!

Filed under: Airplanes,Windows Phone,WP7,Facebook,Links 0 Comments
12Feb/12 0

Airplanes Version 1.3 has been released

We have just released version 1.3 of our Airplanes game.

The new version includes:

- bug fixes

- Faster UI + Improvements

- more game options available with Ad supported version(TRIAL or FREE); you can now play on a battlefield of 10x10 with all skill levels available: Beginer(2 Airplanes), Intermediate(3 Airplanes) and Expert(4 Airplanes)

Play Airplanes for FREE here:

- Airplanes FREE for Windows Phone - Airplanes FREE for PC - Airplanes FREE for Facebook

Enjoy!

Filed under: Airplanes,Windows Phone,WP7,Facebook,Links 0 Comments
23Jan/12 0

Airplanes News

We got some reviews from WP7Lab.COM and also from BestWP7Games.COM.

More great news, Microsoft User Community has just added Airplanes to their 2012 Windows Phone Developer App Showcase album :).

UPDATE: WP7Rocks.COM also made us a review, thanks you guys.

UPDATE: We also got a Press Release and a Game Review from WMPowerUser.COM, thanks.

UPDATE: WPNow.NET also published our Press Release, thanks you guys.

UPDATE: WPAppInfo.COM also published our Press Release, thanks you guys.

That's great, thanks all you guys and we hope to see more reviews comming.

Here are the links and screen shots of the reviews:

http://wp7lab.com/news/airplanes-review/

http://www.xamlblog.com/Images/WP7Lab_Review.png

http://www.bestwp7games.com/airplanes-play-with-your-friend-on-pc-facebook.html

http://www.xamlblog.com/Images/BestWP7Games_Review.png

http://www.wp7rocks.com/2012/01/airplanes-windows-phone-desktop.html

http://www.xamlblog.com/Images/WP7Rocks_Review.png

Filed under: Airplanes,WP7,Links 0 Comments
20Jan/12 0

Airplanes - Windows Phone Game

We have developed a really cool network game for Windows Phone using Silverlight and Metro design. Here is a link to “Airplanes”.

http://www.xamlblog.com/Images/Airplanes_Logo_Image.pngThe main game features are: -Runs both on Windows Phone and PC; Desktop/Browser version available at: http://apps.xamlblog.com/ and Facebook version at: http://apps.facebook.com/airplanes-battle/

-Our game supports network play and in-game Chat -It’s the first game using Windows Phone Metro running on PC Enjoy!!!

Filed under: Airplanes,WP7,Game,Links 0 Comments
28Apr/11 0

Transparent wallpaper for Windows Phone 7

I have read an interesting article about how to put transparent wallpapers on your Windows Phone. When an image that contains transparent elements is used as wallpaper you can achieve a nice effect while unlocking the phone. Here you can find a video with a phone that uses this kind of wallpaper. Among the images found on the internet, I liked "WP7 Holes" and "WP7 Shattered":

http://www.xamlblog.com/Images/WP7-Holes-1.png

http://www.xamlblog.com/Images/WP7-Shattered.png

The above images can be found here or if you do a Google search for "Windows 7 transparent lock screen phone". To apply the image as wallpaper you should follow these steps: 1) Copy the image into a PC 2) Send an email with the image as attachment to your phone 3) Open the attached image from the email on your phone 4) In options "..." select "Set as Wallpaper" NOTE the image should not be stored in the phone before placing it as wallpaper.

Have fun!

Filed under: WP7,Links 0 Comments
27Mar/11 0

Nullable ComboBox for Silverlight and WPF

This post describes a simple and easy way to change the current behavior of your Silverlight of WPF ComboBox by using an attached property and a ComboBox style.

Here is a Live Example of the Silverlight version:

As you can see the selection of the ComboBox can be easily cleared by pressing the X button.

All that you need to do is set the IsNullable property to True on the ComboBox that you want to have this behavior:

<ComboBox ItemsSource="{Binding Source={StaticResource ViewModel}, Path=Actors}" library:Combobox.IsNullable="True" />

Now let me tell you what you need to do to implement it in your application.

First you need to change the default ComboBox style so that it will contain the X button. You can find the default style for Silverlight here and for WPF here. You need to make the following changes to the Template property of the ComboBox:

Silverlight ComboBox:

<ContentPresenter x:Name="ContentPresenter" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> <TextBlock Text=" " /> </ContentPresenter> <Button x:Name="PART_ClearButton" Visibility="Collapsed" HorizontalAlignment="Right" Margin="0,0,20,0"> <Path Data="M0,0 L1.6,0 L3,1.56 L4.4,0 L6,0 L3.8,2.5 L6,5 L4.4,5 L3,3.49 L1.59,5 L-4.2E-09,5 L2.18,2.5 z" Fill="#CC111111" Height="5" Stretch="Fill" Width="7"/> </Button>

WPF ComboBox:

<TextBox x:Name="PART_EditableTextBox" Style="{x:Null}" Template="{StaticResource ComboBoxTextBox}" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="3,3,23,3" Focusable="True" Background="Transparent" Visibility="Hidden" IsReadOnly="{TemplateBinding IsReadOnly}" /> <Button x:Name="PART_ClearButton" Visibility="Collapsed" HorizontalAlignment="Right" Margin="0,0,22,0"> <Path Data="M0,0 L1.6,0 L3,1.56 L4.4,0 L6,0 L3.8,2.5 L6,5 L4.4,5 L3,3.49 L1.59,5 L-4.2E-09,5 L2.18,2.5 z" Fill="#CC111111" Height="5" Stretch="Fill" Width="7"/> </Button>

When you have completed these changes you need to create the IsNullable attached property that will do all the work. When this property is set true on a ComboBox it will enable the Nullable functionality.

The Nullable functionality is obtained by using these two functions:

private static void ApplyIsNullable(ComboBox comboBox) { var isNullable = GetIsNullable(comboBox); var clearButton = (Button)GetClearButton(comboBox); if (clearButton != null) { clearButton.Click -= clearButton_Click; clearButton.Click += clearButton_Click; if (isNullable && comboBox.SelectedIndex != -1) { clearButton.Visibility = Visibility.Visible; } else { clearButton.Visibility = Visibility.Collapsed; } } } private static void clearButton_Click(object sender, RoutedEventArgs e) { var clearButton = (Button)sender; var parent = VisualTreeHelper.GetParent(clearButton); while (!(parent is ComboBox)) { parent = VisualTreeHelper.GetParent(parent); } var comboBox = (ComboBox)parent; //clear the selection comboBox.SelectedIndex = -1; }

The ApplyIsNullable function refreshes the X button state and is called whenever the Selection of the ComboBox changes. The clearButton_Click function clears the ComboBox selection and is called when someone clicks the X button.

Now all that you have to do is to apply the Combobox.IsNullable=”True” attached property to all your Nullable comboboxes.

Before we finish let’s make the X button look a better by adding a MouseOver animation by using this custom Button style:

<Style x:Key="ClearSelectionButtonStyle" TargetType="Button"> <Setter Property="Background" Value="#FF3C688D"/> <Setter Property="BorderBrush" Value="#FF617584"/> <Setter Property="BorderThickness" Value="1"/> <Setter Property="Width" Value="15"/> <Setter Property="Height" Value="15"/> <Setter Property="Padding" Value="0"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Grid Background="Transparent"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal"/> <VisualState x:Name="MouseOver"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseOverElement"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Pressed"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseOverElement"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Disabled"/> </VisualStateGroup> <VisualStateGroup x:Name="FocusStates"> <VisualState x:Name="Focused"/> <VisualState x:Name="Unfocused"/> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Border x:Name="MouseOverElement" BorderThickness="{TemplateBinding BorderThickness}" Background="#FFC8E4ED" BorderBrush="#FF3F6A8E" Visibility="Collapsed"/> <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="Center" Margin="{TemplateBinding Padding}" VerticalAlignment="Center"/> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style>

That’s it! Don’t forget to drop me a comment to let me know what you think. You can download the sample application for Silverlight from here and for WPF from here.

Filed under: Nullable ComboBox,Silverlight,WPF,Style,Close Button,CodeProject 0 Comments
26Mar/11 2

Add Facebook Like to your Silverlight application

In this post you will find out what you need to do if you want to add a Facebook Like button to your Silverlight application.

The strait forward approach is to add a button to your application and make it look the same as the one on Facebook. Then you need to Facebook authenticate the person that clicked the like button and add your Facebook page to the list of pages that he likes. This is very difficult to implement and requires knowledge of the Facebook API. You can also try to use the Codeplex Facebook SDK but that requires you to have a Facebook application, if you have a Facebook personal page or a website the SDK will not help.

The simple way to do this is to integrate the Html Facebook like button into your Silverlight application. In order to do this you need an HtmlHost control that will display the Html like button. Since the standard Microsoft WebBrowser control only works when running in out-of-browser mode I have used the divelements free HtmlHost control. In order to use this control you need to set windowless parameter of your Silverlight plugin to true.

Here is a step by step example:

1) Create a new project named FacebookLikeApplication in Visual Studio 2010 using the SilverlightApplication template; when creating the project check the “Host the Silverlight application in a new Web site” option

2) Download the divelements Silverlight Tools from here; extract, unblock and add a reference of Divelements.SilverlightTools.dll to your FacebookLikeApplication project

3) Open the FacebookLikeApplicationTestPage.aspx and FacebookLikeApplicationTestPage.html, identify the <object .. /> element and add windowless parameter

<form id="form1" runat="server" style="height:100%"> <div id="silverlightControlHost"> <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%"> <param name="source" value="ClientBin/FacebookLikeApplication.xap"/> <param name="onError" value="onSilverlightError" /> <param name="background" value="white" /> <param name="minRuntimeVersion" value="4.0.50826.0" /> <param name="autoUpgrade" value="true" /> <param name="windowless" value="true" /> <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.0" style="text-decoration:none"> <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/> </a> </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div> </form>

4) Open the MainPage.xaml and add the HtmlHost control

<UserControl x:Class="FacebookLikeApplication.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:divtools="clr-namespace:Divelements.SilverlightTools;assembly=Divelements.SilverlightTools" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400"> <Grid x:Name="LayoutRoot" Background="White"> <divtools:HtmlHost x:Name="htmlHost" /> </Grid> </UserControl>

5) Open the Facebook Like button website from here, fill in the fields and retrieve the Facebook like IFrame

6) Open the MainPage.xaml.cs and set the Facebook like IFrame to htmlHost.SourceHtml property; after you set the value replace the double quotes from the IFrame text with a single quote

namespace FacebookLikeApplication { public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); htmlHost.SourceHtml = "<iframe src='http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FMirceaDeliuRO%2F156040061112418&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:450px; height:80px;' allowTransparency='true'></iframe>"; } } }

That’s it! Now you can build and run the application.

Don’t forget to drop me a comment to let me know what you think.

You can download the sample application from here.

Filed under: silverlight,facebook,facebook like,XAML,HtmlHost,WebControl,Facebook SDK,CodeProject 2 Comments
22Mar/11 1

After some work my Silverlight blog is up and running

I have started this blog because I want to share my ideas and solutions to problems I encounter while working with Silverlight, WPF, WP7 and Visual Studio LightSwitch. This is my first post so don't kill me just yet. The blog engine is developed using silverlight 4, RIA Services and Entity Framework with features like SEO integration, full blog search, 3D tag cloud and RSS+ATOM feeds. If you see something that you like or hate about this blog drop me a comment.

Filed under: silverlight,blog 1 Comments

Keywords

  • Links
  • Airplanes
  • WP7
  • facebook
  • Windows Phone
  • silverlight
  • Windows 8
  • CodeProject
  • facebook like
  • XAML
  • HtmlHost
  • WebControl
  • Facebook SDK
  • blog
  • Nullable ComboBox
  • WPF
  • Style
  • Close Button
  • Game
  • Windows Store
  • Microsoft
Copyright © 2011 Mircea Deliu. All rights reserved. Lightword Theme by Andrei Luca