Windows Phone – Progress popup and AutoCompleteBox
Progress popup
During my development I would like to have a progress popup which shows a dialog telling the user that the program are on working process. The implementation below does not contain a progress bar if you want to can insert a progress bar and update it.
<Popup x:Name="ProgressPopup" Width="300" IsOpen="False" HorizontalAlignment="Center" VerticalAlignment="Top" d:LayoutOverrides="Width, HorizontalMargin" Margin="89,203,91,0"> <Border BorderThickness="10" BorderBrush="Black" Background="DarkGray" Padding="30,30"> <StackPanel> <TextBlock Foreground="White" FontWeight="Bold" FontSize="36" x:Name="txt" Text="Processing..."> <TextBlock.Triggers> <EventTrigger RoutedEvent="TextBlock.Loaded"> <BeginStoryboard> <Storyboard> <DoubleAnimation AutoReverse="True" Duration="0:0:1" From="1.0" RepeatBehavior="Forever" Storyboard.TargetName="txt" Storyboard.TargetProperty="Opacity" To="0.0"/> </Storyboard> </BeginStoryboard> </EventTrigger> </TextBlock.Triggers> </TextBlock> </StackPanel> </Border> </Popup>
I also add an animation to make the opacity to 0.0 so that I can have a blinking text block. To call this popup, you can use following code to turn on and turn off popup.
this.Dispatcher.BeginInvoke(new Action(() => ProgressPopup.IsOpen = true)); this.Dispatcher.BeginInvoke(new Action(() => ProgressPopup.IsOpen = false));
AutoCompleteBox
The second component I would like to discuss in this post is AutoCompleteBox. If you are developers on Silverlight, you may know there is already a AutoCompleteBox control. However this control is not available on Windows Phone. So if you would like to use this control in Windows Phone, you can simply add reference to the library of this control. After installing Silverlight SDK, the library of AutoCompleteBox should be at “C:\Program Files (x86)\Microsoft SDKs\Silverlight\v3.0\Libraries\Client\System.Windows.Controls.Input.dll” (your installation path may vary from mine). Let’s add reference to add and add one instance in page
<phoneNavigation:PhoneApplicationPage
...
xmlns:swci="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input"
...
Loaded="PhoneApplicationPage_Loaded"
>
...
<Grid x:Name="ContentGrid" Grid.Row="1">
<swci:AutoCompleteBox x:Name="acbName" Margin="0,6,0,564"></swci:AutoCompleteBox>
</Grid>
Add database for AutoCompleteBox
private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
{
List<string> lstNames = new List<string>();
lstNames.Add("Lewis");
lstNames.Add("Whitcomb");
lstNames.Add("Kadi");
lstNames.Add("Woods");
lstNames.Add("Shissler");
lstNames.Add("Fleischer");
lstNames.Add("Johnson");
lstNames.Add("Schloen");
lstNames.Add("Ritner");
lstNames.Add("Pardee");
acbName.ItemsSource = lstNames;
}
The AutoCompleteBox will work perfectly in Windows Phone
Popularity: 3% [?]

I don’t think the AutoCompleteBox works perfectly.
The style doesn’t fit and it looks very weird when orientation changed
Very nice post.
FYI: A Windows Phone 7 Toolkit was just released witht he AutoCompleteTextBox
http://silverlight.codeplex.com/releases/view/55034
Cheers,
Karl
Leave your response!
Computer security »
Hacking – How to hack WPA/WPA2 Password with BackTrack through cracking WPS?
Last week I’ve read small news on c’t magazine saying that the default password of EasyBox router used for Vodafone, Telecom, Arcor in Germany … was hacked by Sebastian Petters. That means if someone is using default settings of EasyBox, you can get his WLAN password easily and then access his network. This default password was generated by a algorithm and this algorithm was patented. Therefore like other patents, the complete description of algorithm was …
Programming »
C# – Host Microsoft Chart in WPF application
How we provide our customers the way to display their data is a important feature of every software for data management. Maybe the users want to use Bar, Line, Pie, Pyramid chart… someone wants to display as 2D and the other wants 3D for his plotting. The financial prefer Kagi, Renko, Point and Figure chart… meanwhile the statisticians maybe use Bar and Column, Cylinder or just simple Line chart. Because of these numerously different requirements …
Tutorial »
Tools – Doidw – Do I DDos this website?
Last year I have seen a lot of DDOS attacks aimed to website of news or independent communities. These websites were attacked by a botnet built from unknown virus (which wasn’t detected by any antivirus at that time). Some professionals found some variants of this virus but the websites were still heavily attacked.
Some of professional users are willing to help to find more variants of this virus. They would like to check if computers of …
Donation
Archives
Blogroll
Tag Cloud
.net reactor 64 bit 2012 asp.net auto backtrack blog c# codeveil 3.x database Entertainment firefox game gold hack hacking master volume munich mvvm online notes password pet php picasa reverse engineering security sharepoint silverlight ssh theme tlbb tool trip visual studio wallpaper wcf web album webpart web service windows windows 7 windows phone word wpf yahoo messenger