winrt-xaml

How SQLite.Net-PCL handle UTC time

て烟熏妆下的殇ゞ 提交于 2019-12-25 09:15:48
问题 I am using below code: using new SQLite.Net.SQLiteConnection(new SQLitePlatformWinRT(), DBPath) to get SQLiteConnection and create table. Class contain DateTime DataType class Transaction { [SQLite.Net.Attributes.PrimaryKey, SQLite.Net.Attributes.AutoIncrement] public int QId { get; set; } public DateTime PurchaseDate { get; set; } public int Amount {get;set;} Public string ItemCode {get;set;} } Insert Data As follows: var db = new SQLite.Net.SQLiteConnection(new SQLite.Net.Platform.WinRT

xaml WebView: How to catch a “OnNavigation” event @Windows Store App

ε祈祈猫儿з 提交于 2019-12-25 07:29:08
问题 I am developing Windows Store Apps with C#/xaml. How do I notice if a link in my WebView gets klicked? There is no Event for that afaik. I've already looked into this and that but it doesn't provide me with a suitable solution. May I give an example: I am embedding the stream of a facebook page in my WebView via iFrame. I want to block all links that might be in that iFrame. 回答1: You can call InvokeScript with some of your own Javascript to set up a listener for when the user navigates away

How to bind a ListView with SelectionMode multiple to achieve MVVM using Behaviors SDK in Windows 8.1

这一生的挚爱 提交于 2019-12-25 06:21:19
问题 I have a Windows 8.1 application with a ListView with SelectionMode multiple(making the ListView allow the user to select multiple entries) I am trying to use Behaviors SDK from Microsoft <DataTemplate x:Key="DataItemTemplate"> <TextBlock Text="{Binding Name}" Margin="10,0,0,0"/> </DataTemplate> <ListView ItemsSource="{Binding Data}" SelectionMode="Multiple" ItemTemplate="{StaticResource DataItemTemplate}"> <Interactivity:Interaction.Behaviors> <Core:EventTriggerBehavior SourceObject="

Accessing ComboBox inside a Datatemplate of a listbox from c# code behind in metro application?

 ̄綄美尐妖づ 提交于 2019-12-25 06:09:41
问题 i have a combo box present inside a list-box , listbox has a datatemplate in which this combobox and other elements resides . <ListBox x:Name="lstbxbProducts" HorizontalAlignment="Left" Height="547" Margin="0,221,0,0" VerticalAlignment="Top" Width="1044" RenderTransformOrigin="0.600000023841858,0.5"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <StackPanel Width="80" Orientation="Horizontal"> <TextBlock Text="{Binding prdnum}" VerticalAlignment="Center"

Style only works for the first occurence when outside Grid.Resources?

[亡魂溺海] 提交于 2019-12-25 05:50:45
问题 I have a gridview with a data template which includes a togglebutton. The datatemplate for the items in the Gridview has a grid in it, with a stylized togglebutton. The style for the togglebutton is located in Grid.Resources. It works fine, but when I move the style from Grid.Resources to either Page.Resources or App.xaml, the content inside the button that is defined in the style disappears from all except the first occurrence of the button in the gridview. Here is the style: <Style

How to refresh the UI in a metro app?

对着背影说爱祢 提交于 2019-12-25 05:31:03
问题 I'm using this code in a XAML page: <TextBox ItemsSource="{Binding Posters, Converter={StaticResource collectionToFirstElementConverter}, Mode=TwoWay}" /> Posters is an ObsevableCollection and I'm using a converter where takes the collection and gets the first element of it. As I'm using async procedures, where the textbox receives the object, this one has no elements (Count=0), and calls the converter. I'm trying to update the textbox everytime the property add new elements, but not calls

How to control number of items appearing in GridView rows and columns in a Metro Style GridView App?

邮差的信 提交于 2019-12-25 05:08:05
问题 I create GridView app and in the itemspage after binding items with the grid, it appears with 4 rows and 5 columns, when I rotate ScrollViewer to Vertical. It appears with only one column. How can I control the number of rows and columns? 回答1: You can control it in many ways depending on your layout which you have not shared. If you want a fixed number - make sure the height/width of your GridView is the correct multiple of the number of columns/rows that you want displayed. For example for a

Is preparing Windows 8 XAML HubPages from several GridViews inside ScrollViewer the good approach?

旧街凉风 提交于 2019-12-25 02:59:29
问题 I'd like to get the effect visible on the picture: 回答1: I don't think it is. A GridView already has a ScrollViewer in itself, so multiple of them does not make sense. I would try to use a single GridView with GroupStyleSelector/ItemContainerStyleSelector/ItemTemplateSelector implementations and DataTemplates to define each item. A less dynamic version might just be a ScrollViewer with Style set to HorizontalScrollViewerStyle, a horizontal StackPanel and a few VariableSizedWrapGrids - if you

Chat code in windows 8 app

不羁岁月 提交于 2019-12-25 02:39:19
问题 hi i m Windows 8 Developer and i am new in this so any one can help me to how to make chat app with using WCF service? any codes or links please send to me i have search a lot in Google but i cant found best code. i have refer these two links http://rudolfantonio.com/blog/real-time-windows-store-app-with-signalr-sample-code-c-chat-app/ http://www.c-sharpcorner.com/UploadFile/78d182/signalr-sample-chat-application-in-C-Sharp/ 来源: https://stackoverflow.com/questions/20536366/chat-code-in

DataTemplate.DataTriggers not found?

别等时光非礼了梦想. 提交于 2019-12-25 01:58:58
问题 A pretty strange thing happens when trying to use DataTemplate.DataTriggers in my XAML for Windows 8 Metro app. In my App.xaml, I am defining template for my data. I'd like to use the DataTriggers, but when I type it my VS2012 editor, I get errors stating that The attachable property 'DataTriggers' was not found in type 'DataTemplate'. and The member "DataTriggers" is not recognized or is not accessible. A similar issue happens when I try to set the DataType property for DataTemplate: The