[Q] Using a binding with static text in a TextBlock? - Windows Phone 7 Software Development

See http://forum.xda-developers.com/showthread.php?t=977609 please

Related

Strings starting with * on wiki

I posted to the Vox wiki concerning a control string. The string starts with a star character and this causes wiki not to display the star but to put the rest of the string in bold text. I understand that this is correct behaviour and documented, but nowhere could I find how to suppress it. Using two stars produces two stars in the text, leading with any other character displays that character too. So I resorted to a backslash and an explanation in the text.
Can anyone tell me if there is an escape character, and what it is?? And can we update the wiki help to include this please?
Many thanks!

Accessing the full character set

Please can someone tell me how to access the full character set (eg the copyright symbol, bullet symbols etc) when writing SMSs, emails or Notes as the built in keyboard doesn't have them and is very limited? Thank you.
Use the Symbol key on the keyboard to bring up a list of characters to choose from
You've got access to a lot of symbols by pressing [FN] + [,] keys when writing something (Qwerty keyboard, unbranded TP2).
Thank you, this is helpful. But it's still not the full ASCII set. Is there any way of accessing the full set using the ASCII codes for example?
Indeed, for instance the \ isn't available.
Very annoying when you want to login via Remote Desktop, and you need to type the domainname

c# keyboard input help

Im trying to get input from the keyboard on my touch pro 2 in c# but i cant seem to find how to do this anywhere.
any help would be appreciated
also is there a way to use the vibration motor?
anyone?...................
Use the KeyPress event of the form.
Code:
private void Form1_KeyPress(object sender, KeyPressEventArgs e)
{
}
e.Keychar contains the actual key pressed. Do with it what you will.
To use vibrate have a look at Post #2 in http://forum.xda-developers.com/showthread.php?t=646790
P.S. All controls have a KeyPress() event. Decide at which level you wish to respond to it, the form or the control. The KeyDown event can be used to filter out unwanted Alt-Ctrl key depressions before something untoward happens before your application gets told of it, if you wish to take control over such key depressions. KeyDown is triggered before KeyPress but uses a different event object. Look at some of the examples in VS Help on these functions.
thanks much appreciated

[Q] VB and the ApplicationBar

Using VB, im trying to add an application bar in the code (rather than xaml). I have the following code:
Code:
Public Sub New()
InitializeComponent()
Dim appBar As ApplicationBar
appBar = New ApplicationBar
appBar.IsMenuEnabled = True
appBar.IsVisible = True
appBar.Opacity = 1
Dim icon As New Uri("/Images/expand.png", UriKind.Relative)
Dim cmdStart As New ApplicationBarIconButton(icon)
cmdStart.Text = "Start"
'AddHandler (cmdStart.Click), test_click()
appBar.Buttons.Add(cmdStart)
' Set the data context of the listbox control to the sample data
DataContext = App.ViewModel
End Sub
However when i run it in the emulator there is no application bar! No error either. It is a pivot application also but this shouldnt make a difference surely? any ideas?
The application bar is accessible via the ApplicationBar property of the Page class you're deriving from. You don't need to create your own instance.
Thanks, I actually figured this out just after i posted the question. Thanks anyway.

[Q] WP7 - ProgressBar sample?

Hi there,
I'm a little bit stuck with a page transition.
In my app, I select a name from a listbox which is located in another page (Page 2)
Once the name is selected from the listbox (in page 2) it automatically returns to the calling page.
Problem is that during the transition, in the OnNavigatedTo event of Page 1, it fires a query which takes some time and the transition is freezed during that time.
How can I add a ProgressBar to warn the user?
If possible, I'd like to stay as "official" as possible, so my idea is to use the standard ProgressBar supllied in the RTW.
I tried many searches and found nothing close to a workable sample on this.
Any help is much apprecitated in advance!
GFR_2009 said:
Hi there,
I'm a little bit stuck with a page transition.
In my app, I select a name from a listbox which is located in another page (Page 2)
Once the name is selected from the listbox (in page 2) it automatically returns to the calling page.
Problem is that during the transition, in the OnNavigatedTo event of Page 1, it fires a query which takes some time and the transition is freezed during that time.
How can I add a ProgressBar to warn the user?
If possible, I'd like to stay as "official" as possible, so my idea is to use the standard ProgressBar supllied in the RTW.
I tried many searches and found nothing close to a workable sample on this.
Any help is much apprecitated in advance!
Click to expand...
Click to collapse
If you're not already using the PerformanceProgressBar, you should be.
http://www.jeff.wilcox.name/2010/08/performanceprogressbar/
It's pretty much 'plug&play'.
There are 2 ideas which you could try to fix your problem.
An idea that you could try is using a DispatcherTimer. A timer will allow the function to finish loading, while creating an event which will fire to display the progress bar. When the page has finished loading, (say 1 sec) your timer could tick, and do whatever work you need done. Another solution would be to add a Loaded event on the page. This would allow you to run some code once the page is fully loaded. This is probably the best design. To do that, you'd need some code like this:
Code:
public MainPage()
{
InitializeComponent();
Loaded += new RoutedEventHandler(MainPage_Loaded);
}
void MainPage_Loaded(object sender, RoutedEventArgs e)
{
ProgressBar pb = new ProgressBar();
pb.Style = PhoneApplicationService.Current.State["PerformanceProgressBar"] as Style;
pb.IsIndeterminate = true;
//add it onto the page, since it wasn't done in XAML.
LayoutRoot.Children.Add(pb);
}
Note that you can still create the ProgressBar in XAML, it was just easier to only show 1 file.
williammel,
Thanks a lot for the answer. Very clear and helpful!
Will try it right now.
Cheers,
Gus

Categories

Resources