windows-phone-7.1

Json.net slow serialization and deserialization

非 Y 不嫁゛ 提交于 2019-12-02 18:28:26
I have a problem - Json.Net serializing my objects realy slow. I have some basic class: public class authenticationRequest { public string userid; public string tid; public string token; public string platform; public string version; } And I'm serializing it with string jsonDataToSend = JsonConvert.SerializeObject(dataToSend); This operation takes about 1900 ms. In compare to info from Json.net CodePlex page: It takes a really long time. For test purposes I swapped my class for a simple string: string jsonDataToSend = JsonConvert.SerializeObject("fsdfsdfsdfs"); And it still takes ~900 ms to

Windows Phone7 Share data among applications

二次信任 提交于 2019-12-02 11:19:36
I searched everywhere and wondering whether any posible way available for share data among applications within the mobile phone itself. What I basically meant by that is, if there any way that can create a file from one application and allow other applications to access that file. The problem is, If we save the file in application's isolated storage, then any other application won't be able to access it. For example a scenario like this. One application produce a file and store it in a public location within the phone and later using the email client application need that file to be sent as an

how to populate a listbox with files in the project of my windows phone 7 application

非 Y 不嫁゛ 提交于 2019-12-02 10:27:01
问题 i want to use a listbox in my wp7 app where i want to display the names of all the files present in a specific directory. i have added the folder with all files in my project itself. i want to populate all the file names in that folder. how can i access it? i am using this to bindlist string[] files = Directory.GetFiles("C:\\Users\\sony\\Documents\\Visual Studio 2010\\Projects\\MyChristmas\\MyChristmas\\recipe"); foreach (string f in files) { string entry1 = System.IO.Path.GetFullPath(f);

Get latest tweet using Tweetsharp on Windows Phone 7

瘦欲@ 提交于 2019-12-02 09:40:59
问题 I only want to get a latest tweet to my Windows Phone Apps using Tweetsharp. below is what I have done: Installing Tweetsharp using Nuget Package Manager. Registering my apps to Twitter Developer Site. Get Consumer key, Consumer Secret, token, and token secret. Initializing TwitterService using that 4 keys. Then, what is next? are there any mistakes of my steps above? I am really confused. 回答1: The documentation for tweetsharp is available on the wiki. The best method is statuses/user

Is there any way to get XAML element by Tag property?

最后都变了- 提交于 2019-12-02 09:02:32
Is there any way to get the XAML element by its tag value?? My code is like this : <Grid Tap="StackPanel_Tap" Tag="{Binding Type}" > <Border BorderThickness="0" CornerRadius="0" BorderBrush="White" Width="100" Height="100" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="1" > <Image Tag="{Binding Type}" Source="{Binding Location}" Opacity="1" Width="100" Height="100" Stretch="Fill" HorizontalAlignment="Center" VerticalAlignment="Center" UseLayoutRounding="True" > </Image> </Border> </Grid> I am binding Tag Property for Grid , is there any way to get an object of Grid by using

PushSharp + Windows Phone deep linking on Toast Notifcation

梦想与她 提交于 2019-12-02 08:51:27
When using PushSharp with Windows Phone, I'm sending the notification with a deep link to a view in my app. push.QueueNotification(new WindowsPhoneToastNotification() .ForEndpointUri(new Uri(endpoint)) .ForOSVersion(WindowsPhoneDeviceOSVersion.Eight) .WithBatchingInterval(BatchingInterval.Immediate) .WithNavigatePath("/Views/DetailView.xaml") .WithParameter("slug", slug) .WithText1(text) .WithText2(message)); But when the toast appears and I touch it to open the app, the app opens to my default view instead of the requested DetailView. Shouldn't this open to my DetailView? You might want to

JSON Deserializing for Windows Phone

我与影子孤独终老i 提交于 2019-12-02 08:25:52
I am trying to deserialize the following JSON, but I really have no idea how to use JSON.net to do the work. I am using C# and JSON.Net library. My JSON is as follows: { "found": 3, "bounds": [ [ -43.54919, 172.62148 ], [ -43.54487, 172.63654 ] ], "features": [ { "id": 15342454, "centroid": { "type": "POINT", "coordinates": [ -43.54779, 172.62148 ] }, "bounds": [ [ -43.54779, 172.62148 ], [ -43.54779, 172.62148 ] ], "properties": { "osm_element": "node", "amenity": "toilets", "synthesized_name": "Toilets", "osm_id": "502884303" }, "geometry": { "type": "POINT", "coordinates": [ -43.54779, 172

Do code after OnNavigatedTo

淺唱寂寞╮ 提交于 2019-12-02 07:29:13
I Have Code get IdUsers From Other Page String IdUsers; public Main_Wallets_Page() { InitializeComponent(); MessageBox.Show(IdUsers); } protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { String Id; if (NavigationContext.QueryString.TryGetValue("IdUsers", out Id)) IdUsers = Id; } The MessageBox Alway be Null. I Want to MessageBox Show the "IdUsers" after OnNavigationTo (Do not put the MessageBox IN "OnNavigationTo"). How can i do it ? You shouldn't use MessageBoxes in OnNavigatedTo because if the user does not press a button your app will crash since the

Windows Phone Image Binding

情到浓时终转凉″ 提交于 2019-12-02 06:41:59
I want to put images in my ListBox using Binding. Below is the object containing the URI's: _roomView.Room = new Room { Items = new List<Item> { new Item {ItemType = ItemType.BlueKey, ImageUri = "/Escape;component/Images/Items/a.jpg"}, new Item {ItemType = ItemType.Bracelet, ImageUri = "/Escape;component/Images/Items/b.png"}, new Item {ItemType = ItemType.Money, ImageUri = "/Escape;component/Images/Items/b.png"}} }; DataContext = _roomView; Below is the XML: <ListBox x:Name="Mylist"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Margin="5"> <Image Source="{Binding Room.Items.ImageUri}"

WP7 wraping text around image

不羁的心 提交于 2019-12-02 05:52:27
问题 I have this code: <ScrollViewer x:Name="textScroller" Grid.Row="2"> <Grid x:Name="ContentPanel" Margin="12,0,12,0" DataContext="{Binding}"> <Image x:Name="ImageUrl" Source="{Binding ImageUrl}" Height="198" Width="150" Margin="10 10 10 10" FlowDirection="RightToLeft" HorizontalAlignment="Left" VerticalAlignment="Top" /> <TextBlock x:Name="Content" Text="{Binding Content}" TextWrapping="Wrap" Style="{StaticResource PhoneTextNormalStyle}" Margin="0,41,24,-41" LineStackingStrategy=