windows-phone

How can I change selected item's background color in Windows Phone?

血红的双手。 提交于 2019-12-11 15:01:51
问题 How can I change selected item's background color that in listbox which has datatemplate in Windows Phone? I have seen that it can be with Setter Properties. Where I will write them? Thanks. Code <ListBox x:Name="listLocs" HorizontalAlignment="Left" Height="605" VerticalAlignment="Top" Width="250" SelectionChanged="listLocs_SelectionChanged" Margin="10,155,0,0" BorderBrush="#FF030042" BorderThickness="2" Foreground="#FF030042"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation=

WP8 LongListSelector - Navigating to different pages

我的未来我决定 提交于 2019-12-11 14:23:38
问题 I have recently created a LongListSelector for my Windows Phone 8 app. However what I want to achieve now is to navigate to another page when the user taps on an item but I don't know what put in my code and also I'm not 100% as to where I should insert my uri's for each individual page. Does anyone know how I can achieve this? I would be grateful if anyone could help me with this matter. Many thanks. Partial Public Class Station_Chooser Inherits PhoneApplicationPage Public Sub New()

Windows Phone IsolatedStorage

久未见 提交于 2019-12-11 14:03:31
问题 I have a application that needs to download and save files on a device - videos. Videos are short ~ 10min and in poor quality, which means that their size is minimal. So, the problem is that when i download some files - all goes nice, but some files fail with error: Out of memory exception. Logically i think that files less than some size ( for example 50MB ) download nicely, but higher - exception. Here is my code: private void btnDownload2_Click(object sender, RoutedEventArgs e) { WebClient

Command Bar in Windows Phone

二次信任 提交于 2019-12-11 13:38:24
问题 I am using Command Bar in windows phone using below code <Page.BottomAppBar> <CommandBar Foreground="White"> <CommandBar.PrimaryCommands> <AppBarButton x:Uid="Share"> <AppBarButton.Icon> <BitmapIcon UriSource="/Assets/Share.png"/> </AppBarButton.Icon> </AppBarButton> <AppBarButton Icon="Favorite"></AppBarButton> <AppBarButton Icon="Comment"></AppBarButton> </CommandBar.PrimaryCommands> </CommandBar> </Page.BottomAppBar> I am getting a footer icon like below with out any background. Simply the

Windows Phone - Crop BitmapImage [closed]

徘徊边缘 提交于 2019-12-11 12:48:36
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I have BitmapImage and I need to crop it to a rectangle of size 200x200. The rectangle should contain the center of the source

How to deploy APPX to running Windows Phone Emulator?

£可爱£侵袭症+ 提交于 2019-12-11 12:15:37
问题 I'm trying to deploy a appx package from C# to a Windows Phone Emulator as seen here: How to deploy an .appx into Windows Phone 8.1 The thing is that the method GetDevices() returns a list of devices like this: {Device} {Emulator 8.1 WVGA 4 inch 512MB(ES)} {Emulator 8.1 WVGA 4 inch(ES)} {Emulator 8.1 720P 4.7 inch(ES)} I don't know why it appends the (ES) at the end. After i execute the code, the Emulator launches but it gets stuck. It does not work. Can i instead, have a already running

Get tile notifications count Windows phone

风格不统一 提交于 2019-12-11 12:07:45
问题 Is there a way to get the current count of Tile notifications on Windows Phone and update it locally. I need to update the tile count locally if I have read a notification via push notification / toast without hitting the push service from the server end. Say for eg. I have the tile count 6. As soon as I receive a push notification and I click on it, I want the tile count to be reduced by 1. How do I achieve this? 回答1: Unfortunately you cannot read out information from a ShellTile . You can

Access Storyboard dynamically from code-behind?

风流意气都作罢 提交于 2019-12-11 11:58:18
问题 I'm working on a Windows Phone app, but I believe this applies to Silverlight as well. I want to create a Storyboard (right now I'm creating it as a global variable in my code-behind page for testing) that changes a Rectangle 's Fill property from transparent to red, and then back to transparent. I'm going to be re-using this Storyboard among multiple rectangles so I'd like to be able to access it and Begin() it from the code-behind. I couldn't find any examples like this, so I gave it a shot

UnauthorizedAccessException while initializing ProximityDevice (Windows Phone)

一笑奈何 提交于 2019-12-11 11:46:38
问题 I want to use ProximityDevice in my application. If I declare it as field or in the constructor, like this: public partial class MainPage : PhoneApplicationPage { // Constructor public ProximityDevice device; public MainPage() { InitializeComponent(); device = ProximityDevice.GetDefault(); } } or this: public partial class MainPage : PhoneApplicationPage { // Constructor public MainPage() { InitializeComponent(); public ProximityDevice device = ProximityDevice.GetDefault(); } } I get A first