Home » C++ Programming

Nice article on creating an ApplicationBar using Blend

Ginny Caughey
Device Application Development MVP

3 Answers Found


Answer 1


Answer 2

On a related note, this blog post on the Expression Blend Blog provides more details about the Windows Phone specific features added to this version (including the Application Bar design experience):





Answer 3

Thanks, Adrian.


Ginny Caughey
Device Application Development MVP


So i'm playing around with the app bar in beta 1 and i notice the syntax shell:ApplicationBar.ApplicationBar

both application bars seem to give the same properties. Is this a design issue or does it have a purpose?




Hi all,

 I am doing a personal GUI application using C++ Visual Studio 2008 and I am trying to find out how to display formatted data on a form.

 The data to be displayed on the form is basically the result from a QCM (score, questions answered correctly and wrong answered questions). The form need to have de following specs;

 Dynamic ; Because number of questions can vary, hence the results report is not fixed length (the form need to be generated and formatted at run time) Formatted text ; I need to use bold but also need to use green and red for marking right and wrong answers in some part of the form

 I have checked on the web I found out that my best bet would be to create an HTML file and display it on a window form... The problem is that I can’t find too much documentation and example workable for me (I am still beginner with C++). This link http://ehsanakhgari.org/article/visual-c/html-dialogs looks fine but I can’t seem to get it working for me (it refer to the about form from IE made with HTML which I find really nice).

Can someone show me some example on to how to use ShowHTMLDialogand the MSHTML.DLL with Visual C++?

 Are there other technologies or tools I can use to achieve the same thing?


Thanks for your help anf happy new year...



Hi I'm using the Knowledgebase Template. We are mainly creating Word Docs and loading them into the library. Tagging with the "Realated Articles" column. I am writing a intro page in SPD that has a choice list of the keywords, which then filters the docs based on choice. This works. What I can't get working is making the "related articles" column into a hyper link, like MS have done in default views - if I use the library in a web part from the browser it works fine, but not in SPD. Any ideas? Cheers Eserim

Hi, I have been reading the below article and I have got it to work.   


The problem is when I use my database script file it throws an error 1001 saying error next to keyword 'GO'.    But if i take the exact same script and run it in SQL Management Studio it works fine.

Try this small script, this is what I am using and its giving me an error, An above is a lovely article to creating a database from microsoft.

CREATE TABLE [dbo].[Category](
	[CatID] [int] IDENTITY(1,1) NOT NULL,
	[CatName] [nvarchar](max) NULL,
	[CatDesc] [nvarchar](max) NULL,
	[CatID] ASC

/****** Object: Table [dbo].[Customer]  Script Date: 10/14/2010 09:52:03 ******/
CREATE TABLE [dbo].[Customer](
	[AccNo] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NULL,
	[Name] [nvarchar](max) NULL,
	[Surname] [nvarchar](max) NULL,
	[ID_No] [nvarchar](max) NULL,
	[Address] [nvarchar](max) NULL,
	[Telephone] [nvarchar](max) NULL,
	[Mobile] [nvarchar](max) NULL,
	[Fax] [nvarchar](max) NULL,
	[Email] [nvarchar](max) NULL,
	[Notes] [nvarchar](max) NULL,
	[Balance] [decimal](18, 2) NULL,
	[AccNo] ASC





I read many post about Intergrating Fckeditor to ASP.Net MVC, and I have done.

Now, I have tbl_Articles table, it contain some articles... How to Insert - Update - Create articles from TextArea of FCKeditor (ASP.Net MVC)

Please give some way for me. Thanks.



i am pretty new in the area of Visual Web Developer Express and also in programming.

I have an Access DB which i need to create a Web App on it for enabling users to enter new requests and let me to process these open requests.

Where can I find some guidance about this topic?

I know how to create the Web site and how to edit it in a way that will look as i need, I also know how to connect to the DB but i have no idea how to make a value in a text box added to a certain filed in the DB....

Please assist



very glad to be here

Talking about iphone, people is impressed by its multi-touch screen and other powerful/beautiful design. Due to its wonderful design, Iphone users don’t regare iphone as a communication tool, but also a multimedia player to enjoy music and videos. For iphone fans, make full use of iphone is their long-cherished desire. How to achieve this aim? Now, I share my experience to everyone who wants to watch dvd/videos on iphone.
In the following text, I expatiate it in two parts:
1.How to put dvd on iphone
2.How to put video on iphone

Part 1: . How to put dvd on iphone

Step 0. Run 4Videosoft DVD to iPhone Converter.

Step 1. Load your DVD
Put your DVD in your DVD drive and click "Load DVD", you can load your DVD, DVD folder, and also IFO file.

Step 2. Choose your output profile and settings
At the lower part of the interface you can find a "Profile" drop-down list, you can find one for yourself.
Click "settings" on the right side of "Profile" you can adjust your output's settings, such as "Resolution", "Frame Rate", "Bitrate" and so on.

Step 3. Start Conversion
If you don't want any more editing just Click "START" button to start your conversion.

Step 4: Start conversion
Click the “Start” button to start your conversion and in a short while it will be finished.

Part 2: How to put video on iphone

Step 0. Run 4Videosoft iPhone Video Converter .

Step 1. Click the "Add Video" button to import the video files you are going to convert. Alternatively, you can click "File -> Add Files..." to load the video files.

Step 2. Extend the "Profile" category to select an output format.

Step 3: Start conversion
Click the “Start” button to start your conversion and in a short while it will be finished.

If you want to cut your DVD movie into many different parts, or you just want to convert one part of the movie, just use “Trim” function.
3 methods for you to complete this:
a. Drag the slider
b. Click “Start Time” and “End Time” button
c. Set the value

"Crop" function allows you to remove the black edges and customize the aspect ratio
3 ways for your to do this.
a. Selecting the crop mode
b. adjusting the crop frame
c. setting the crop value
You can customize the your own aspect ratio using "Zoom Mode". It provides you "Keep Original", "Full Screen", "16:9" and "4:3".

Click "Effect" button you can adjust brightness, contrast, saturation and volume easily.

4.Merge and Snapshot
"Merge" function enables you to put many chapters into one output video file
"Snapshot" allows you to capture the picture of the movie you like

5.Audio Track and Subtitles
You can choose the audio track and subtitles before conversion (If your DVD has different audio track and subtitles).

At the end of this article, I will share you two useful tools.
iPhone Ringtone Maker
It can help you to make your favorite music as iphone ringtone and put the converted M4R Ringtone on the iPhone directly without iTunes.
iPhone Transfer
With it, you can share your videos and songs to your friends. Because it can help you to manage videos, audios between two iPhone.
Hope this guide can offer you a chance to much more enjoy your iphone


Archos 2 is coming, with the lower price and superior quality. We all know how to use it to enjoy music. But, it also has a extra function. That is to watch videos. How can we achieve this aim? Now I will share a nice method to help you put dvds and videos on Archos .

The following guide has two parts:

1.How to put dvd on Archos

2.How to put video on Archos

Part 1: How to put dvd on Archos

Step 0: Download and install 4Videosoft 4Videosoft DVD to Archos Converter

Step 1: Import DVD.

Place the DVD into your DVD drive and click the “Load DVD” button to load DVD.

Step 2: Video settings.

Select the output video format you want from the “Profile” drop-down list.

Step 3: Place video

Click “Open Folder” button to open your output destination file.

Step 4: Start conversion

Click the “Start” button to start your conversion and in a short while it will be finished.

Part 2: How to put video on Archos

Step 0: Download and install 4Videosoft Archos Video Converter

When you finished the download process, run the .exe file to install it.

Step 1: Click “Add files” button to import videos.

Step 2: Extend the "Profile" category to select an output format.

Step 3: Click “Open Folder” button to open your output destination file.

Step 4: Click the “Start” to convert.

Tips----- Basic functions for all the 4videosoftware:

1. How to change your video effect

If you want to adjust the effect of your movie, please click the “Effect” button and a pop-up effect window will appear. It allows you to edit your movie’s effect including “Brightness, Contrast, Saturation and Volume”.

2: How to crop off the black edges and adjust the size of video play region

By using the "Crop" function you can crop off the black edge of your video and you can also drag the line around the video image to adjust the video play region to fit for your mobile devices

3: How to split your video

The "Trim" function also servers as a video splitter for you to get any time-length video episode. You can set the "Start Time" and "End Time" to set the exact time-length of the clip or you can directly drag the slide bar to the position you want.

4: How to join the videos

If you would like to put several files into one output file, please tick the check box of the “Merge into one file”.

5: How to save your favorite picture

If you like the current image when preview video, you can use the "Snapshot" option. Just click the "Snapshot" button, the image will be saved and you can click the "Open" button next to "Snapshot" button to open your picture.

video converter
iPod Video Converter
Hi there,
I've created an MVC Application and Test project and added the solution to Team Foundation 2005 server. When I open the solution Visual Studio 2008 informs me:

"The project 'MvcApplicationTest' is under source control. This version of Visual Studio .NET does not support source controlled projects. Any changes that you make to this project will not be propagated to source control."

Very strange as I've also added a class library project to the solution which works with source control just fine and as I'd expect.

If I Unload and Reload the Test project it is then added to source control as expected and VS 2008 integrates nicely. When I close the solution and reopen it the behaviour returns to the above.

The obvious workaround would be to create my own test project, which I've tried, BUT I can't add a reference to System.Web.Extensions - it doesn't appear in the .Net component list. It's in the GAC though, I can see it. V strange.

Any advice which would help me out with either of these two issues would be much appreciated!



I need to export a report into an editable format while preserving the way it looks.  It's a columnar report.  I've been trying to use DoCmd.OutputTo for this.  acFormatXLS makes an ugly datasheet view.  acFormatRTF looks pretty good but the columns aren't really spaced by tabs or anything so when you edit one column (especially in multi-line text blocks) it messes with the other columns and does not wrap.  acFormatHTML looks good.  It prserves columns nicely.  I can take the HTML and save it as a Word document and all is pretty good.  Except that acFormatRTF wants to make multiple pages.  Can I defeat that behavior?  Suggestions?

Thank you!

Steve Schlipf


I downloaded a Trial version of Project Professional, used the Team Planner for a day and then bought it.  For me the Team Planner view was worth the cost of admission and is absolutely fantastic... the missing functionality I've been looking for that's finally been added. 

So after using Project 2010 for a few weeks I have compiled a few notes on "Nice-to-Have" features, as well as a few bugs which occur for me on a semi-regular basis (I will post the bugs to one or more separate threads at another time).

I also realize that for the list below, there may be possible workarounds.  Not being a heavy Project user, any suggestions or workarounds are helpful, but I would also point out that they were not apparent to me as a new user of Project 2010.

Nice-to-Have #1) An easy way to keep a task in view when navigating between Gantt Chart and Team Planner views

I often switch between Gantt Chart view and Team Planner view, and most of the time when I am switching between the two, I am examining a particular task. It seemed very intuitive to me that this would be a right-click menu option, but it is not.

In other words, if it were implemented as a right click option on a task:

In the Team Planner view it would say something like: "Navigate to to this task on the Gantt chart" In the Gantt chart it would say something like: "Navigate to this task on the Team Planner"

Selection of this option from Team Planner would:

Open the Gantt Chart view Scroll the list of tasks on the left to the appropriate task, expand any collapsed trees as necessary, and highlight it It might even execute "scroll to task" option to bring it into view on the Gantt Chart calendar on the right

Selection of this option from Gantt Chart view would:

Open the Team Planner view Scroll the calendar such that the task or start of the task is in view, and highlight it

This is a huge missing feature in my opinion... in a project with lots of tasks I want to be able to easily flip back and forth without having to mentally take notes on a task from one view just to be able to find it in the other view.


Nice-to-Have #2) A "Mark on Track" icon when right clicking a task in Team Planner

When right clicking a task there is a bar with icons for: Fill, Border, 0%, 25%, 50%, 75%, 100%

This would be rounded out nicely with an icon to mark an item on track. 

It's intuitive that they are grouped together, and this was done in the ribbon, but was not carried through to the right-click options.


Nice-to-Have #3) A lockable timescale in Team Planner for zooming in

I have a preferred view for the timescale in Team Planner:

Top Tier: None Middle Tier: Units of weeks (Jan 25, '09 format) Bottom Tier: Units of Days in (| S | M | T | W | T | F | S | Format)

I would like to 'lock' this format for viewing, regardless of zoom-in operations (I understand that if you zoom out for example, this view won't fit, and the format would need to change, but that is not the case for zoom-in operations).

Zooming in causes two things to happen...
(using either the bottom right +/- buttons to zoom, or adjusting the the timescale selection with the mouse to adjust what is visible)

The middle and bottom tiers automatically change formats If the zoom is re-adjusted to the previous size, the formats do not necessarily revert back to what they were previously (| S | M | T | W | in my case)

Item 1 is simply a personal preference:  I find the zoomed-in format (beyond the | S | M | T | W | format) to be difficult to understand (for example, the middle tier now shows every other day, and the bottom tier shows two columns that say '12' for each day listed in the middle tier, such that the entire bottom tier is a row of cells that say '12').

Having the zoom operations cause inconsistent changes to the timescale settings however is not just personal preference, but is operationally confusing, annoying and not intuitive--if I were to zoom in and find the new timescale format confusing, I cannot just zoom back out to get back to the format I was viewing momentarily ago. 

After much consternation with the zooming in and out, it appears to me that there is "hysteresis" in some of the zooming operations.  In other words, it is not necessarily the current view or scale that determines the automatically-set timescale options (ie, how zoomed in or how zoomed out you are), but it is also dependent on the previous view, or perhaps on the timescale settings of the previous view. 

In some cases this is very repeatable using the +/- buttons at the bottom right to set the zoom to three distinct levels. Let's define three spots on the zoom slider that we can navigate between using the +/- buttons:

Level 1: Zoomed Out Level 2: Normal Level 3: Zoomed In (In my case, Level 1 is at the center of the zoom slider, Level 2 is one notch right, and Level 3 is two notches right)

And let's define two different sets of timescale settings (the one I like and the one I don't), where the bottom tier of the timescale shows:

Bottom Tier = | S | M | T | W | T | F | S |  (we'll call this TS1) Bottom Tier = | 12 | 12 | 12 | 12 | 12 | 12 | (we'll call this TS2)

So here's what happens:

At Level 2 with TS1, Zoom-In to Level 3 --> We get Bottom Tier = TS2 At Level 3 with TS2, Zoom-Out to Level 2 --> We get Bottom Tier = TS2 At Level 2 with TS2, Zoom-Out to Level 1 --> We get Bottom Tier = TS1 At Level 1 with TS1, Zoom-In to Level 2 --> We get Bottom Tier = TS1

This same kind of hysteresis behavior extends to the zoom operations that occur when dragging the zoom box on the Timeline view.

It makes sense that there may be multiple zoom levels with a bottom tier that doesn't change--for example transitioning from one level to another and having the bottom tier remain the same might still remain a very clear way to interpret the timeline--but having the bottom tier change inconsistently depending on whether you're zooming in or zooming out is confusing.

Regardless of whether this a 'feature' or a bug that gets fixed or not fixed, the "nice-to-have" would be a way to lock the timescale settings in some form or fashion.  Maybe if the software absolutely has to adjust between different settings for different zoom levels, it would at least be possible to save the settings for each of these zoom level adjustments, such that zooming in or out does not cause an unpleasant surprise, but is simply transitioning between different timescale settings that have been adjusted and saved by the user.

Many times I would like to zoom in on the Team Planner to have a more detailed view the tasks, but find myself then trying to back out of that zoom level because I can no longer interpret the timescale clearly.  Sometimes this happens on the Gantt chart too, but I notice it much more in the Team Planner.

Nice-to-Have #4) A nicer horizontal scroll bar for the Team Planner

1) In the Team Planner view, the horizontal scroll bar at the bottom of the page extends all the way to the left side of the Microsoft Project window, but the calendar area that is being scrolled does not extend past the vertical splitter bar for scheduled/unscheduled tasks. 

This discrepancy is counter intuitive when you go to navigate the calendar with the horizontal scroll bar. 

The vertical scroll bars on the right however do not have this problem, and are sized within the window being scrolled.

2) The scroll bar block is 'small' (fixed size) and 'hard to grab' with the mouse, instead of being larger and/or proportional (proportionally-sized scroll bar blocks are are just generally larger and more intuitive object to 'grab' with the mouse, which perhaps is why they're so widespread).


These two aspects of the scroll bar--as well as issues with the zoom feature--are perhaps somewhat nit-picky, but they have had a significant impact on my ability to seamlessly navigate and use the Team Planner.  This is true especially when the tasks are of short duration, because to see these tasks effectively in the Team Planner view, the most natural thing to do is to zoom in (such that the boxes are larger and display more text), scroll week-to-week perhaps at that zoom level to examine surrounding content, then zoom back out for the big picture view. This simple sequence of tasks should flow seamlessly (zoom-in, examine, scroll, scroll, zoom-out), but in my case it feels like the GUI disrupts that flow and makes it difficult.


These "nice-to-haves" are just that however--I personally think they would be nice to have, but not having them isn't critical.  By and large I would like to express my personal opinion that the development team did an absolutely fantastic job with this feature.  I have found the Team Planner to be an amazingly helpful tool, super easy to use and very intuitive--obviously well-thought-out and implemented.


Check the Clear Channel case study (http://www.microsoft.com/casestudies/casestudy.aspx?casestudyid=201308):

"Clear Channel Communications, a Fortune 500 media company, owns more than 1,200 radio and TV stations across the United States and 750,000 billboards worldwide. The company’s Enterprise Application Development group lacked a standard development methodology, formal software testing, and requirements authoring standards. In addition, the group missed project deadlines because requirements changed late in development. This situation adversely affected business planning. Seeking a solution, Clear Channel deployed Microsoft® Visual Studio® Team System and defined its development model and framework based on the Microsoft Solutions Framework. The result was a complete culture change: formerly opposing factions became a cohesive, productive team. Besides completing high-quality applications on time, the team now shares common terminology, a common understanding of roles, and a common process."

Clementino Mendonca - Microsoft Services ALM Team


I would like the ability to delete an application from a server in the Event Flow debugger


Have a management interface around the Server (think SSMS)

I know I can do it in code

if (srv.Applications.ContainsKey("AllansApp"))


But I would like something a little more user friendly.




For one of our applications, we were thinking that we would change the ApplicationBar based on the state of the page.  For instance, if the page is in Edit mode then we would display a save and cancel button.  If it is in Read Only mode then we would display an edit button.  While this scenario is workable with the existing APIs, this doesn't seem as easy as it could be.

Is this scenario something we are "allowed" to do?  Will we run into problems when it comes time to certify our application due to this approach? 

The Certification Requirement guideline mentions not to create your own ApplicationBar (which would indicate that this is a supported scenario) but the API doesn't make this easy to do so I wanted to double-check.

Thank you,




 I have a user control which is attached to my Main.xaml page. On this main page, I have an application bar attached. Is there a way to access the Application Bar from within the user control's code behind? I would like to make the AppBar visible/hidden based on settings found in the user control.

Thanks for any suggestions



in Beta version where I put the ApplicationBar in App.xaml?

This eaxmple is not correct

        <shell:ApplicationBar x:Name="appBar" IsVisible="True" IsMenuEnabled="True">

          <shell:ApplicationBarIconButton x:Name="menuNews" IconUri="/Images/news.png" Text="News" />
    <!--Required object that handles lifetime events for the application-->
      Launching="Application_Launching" Closing="Application_Closing" 
      Activated="Application_Activated" Deactivated="Application_Deactivated"/>



There are a few issues I notice with the beta version of the WP7 tools:


The ApplicationBar no longer causes a page to resize it contents with the CTP workaround Using the ApplicationBar from App.xaml and imported as a static resource does not work as expected



In the CTP version of the WP7 tools when using an appbar and navigation from page to page, the appbar remainined on top of the page content rather than having the content resize itself to be on top of the appbar.  The work around was to set the IsVisible property to false in the constructor and set to true on the page loaded event.  This is no longer working and the appbar remains on top of the loaded page unless turned completely off.  I have my appbar xaml in app.xaml and each page uses it as a static resource. 

Also the click event is no longer triggered for app buttons, I am using the appbar as a resource in my App.xaml and added as a {StaticResource} in my page's xaml.  Any help would be appreciated as this is the only way I have for navigating around my application, aside from rolling my own navigation page.



public CalculatorView()

ApplicationBar.IsVisible = false;

SupportedOrientations = SupportedPageOrientation.Portrait;

Application.Current.RootVisual = this;

private void PhoneApplicationPageLoaded(object sender, RoutedEventArgs e)
ApplicationBar.IsVisible = true;
<Shell:ApplicationBar x:Key="GlobalApplicationBar" IsVisible="True" IsMenuEnabled="True">
<Shell:ApplicationBarIconButton x:Name="CalculaterAppIconButton" Click="CalculaterMenuItemClick" IconUri="/Images/Icons/32/Back.png" Text="Main" />
<Shell:ApplicationBarIconButton x:Name="HistoryAppIconButton" Click="HistoryMenuItemClick" IconUri="/Images/Icons/32/Intl-History.png" Text="History" />
<Shell:ApplicationBarIconButton x:Name="StatisticsAppIconButton" Click="StatisticsMenuItemClick" IconUri="/Images/Icons/32/Stats.png" Text="Stats" />
<Shell:ApplicationBarIconButton x:Name="OptionsAppIconButton" Click="OptionsMenuItemClick" IconUri="/Images/Icons/32/Settings.png" Text="Options" />
<Shell:ApplicationBarMenuItem x:Name="StartingHandsMenuItem" Click="StartingHandsMenuItemClick" Text="Starting Hands" />
<Shell:ApplicationBarMenuItem x:Name="HoleOddsMenuItem" Click="HoleOddsMenuItemClick" Text="Hole Odds" />
ApplicationBar="{StaticResource GlobalApplicationBar}"   //In my page.xaml


I have a question about globalization for the texts of "ApplicationBar" as we all now realize it does not help us much because they behave differently from the other controls, so you can not make a Binding of a property. I would ask the opinion of you to devise a better way to implement globalization in menu items.

Thank you.

ps. Will we one day be able to work normally with the "ApplicationBar", performing mainly Binding commands?


sorry for my english...



Does microsoft provide free licence icons or images for us to use in app development. Hope to have it as page without atttractive icons,imges look boring.  Where can I download some?

1) What icon size to use for application Bar ?

10x in advance.



<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure