microsoft-metro

XAML Binding to property

旧巷老猫 提交于 2019-12-22 04:34:11
问题 I have check box in my XAML+C# Windows Store application. Also I have bool property: WindowsStoreTestApp.SessionData.RememberUser which is public and static. I want check box's property IsChecked to be consistent (or binded, or mapped) to this bool property. I tried this: XAML <CheckBox x:Name="chbRemember1" IsChecked="{Binding Mode=TwoWay}"/> C# chbRemember1.DataContext = SessionData.RememberUser; Code for property: namespace WindowsStoreTestApp { public class SessionData { public static

Why does TextBlock trims ending spaces from the text?

我只是一个虾纸丫 提交于 2019-12-22 02:00:03
问题 Here is my TextBlock s <StackPanel Orientation="Horizontal" Margin="0,3,0,0"> <TextBlock Text="6 or more characters, at least one letter and a number, " FontFamily="Segoe UI" Foreground="#000000" FontSize="13"/> <TextBlock Text="no symbols" FontFamily="Segoe UI" Foreground="#000000" FontSize="13"/> </StackPanel> And here is the output (screen shot) Why TextBlock trims ending spaces? However it works fine when I give leading spaces. 回答1: It looks like xml:space="preserve" should do the trick

Binding multiple HTML properties using WinJS?

五迷三道 提交于 2019-12-22 00:27:21
问题 WinJS allows you to bind HTML properties dynamically at run-time, similar to XAML binding. <div id="itemTemplate" data-win-control="WinJS.Binding.Template"...> <h3 data-win-bind="innerText: timestamp"></h3> </div> How if I want to also bind the font color style for <h3> as well, how do I achieve that? 回答1: Unlike the data-win-options binding which makes use of {key:value,key2:value2} syntax. data-win-binding uses a syntax similar to inline-css styles. Using property:bindingValue;property2

Windows 8 store certificate: Uploaded app package invalid because of certification (publisher id) [closed]

时光总嘲笑我的痴心妄想 提交于 2019-12-21 12:59:20
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I receive following error when attempting to upload my app to the Windows 8 store: Validation error: The Publisher attribute of the Identity element in the app manifest doesn't match your publisher ID, which is: CN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX I manually updated the app manifest file with the publisher

ReadText from file in ANSII encoding

吃可爱长大的小学妹 提交于 2019-12-21 06:37:10
问题 I use Q42.Winrt library to download html file to cache. But when i use ReadTextAsync i have exception: No mapping for the Unicode character exists in the target multi-byte code page. (Exception from HRESULT: 0x80070459) My code very simple var parsedPage = await WebDataCache.GetAsync(new Uri(String.Format("http://someUrl.here"))); var parsedStream = await FileIO.ReadTextAsync(parsedPage); I open downloaded file and there is ANSII encoding. I think i need to convert it to UTF-8 but i don't

How to prevent/disable snapped view for Windows 8 Metro UI applications

萝らか妹 提交于 2019-12-21 06:29:44
问题 I have an application that really makes no sense for snapped view, as the content generally represents A4 pages of information and data collection. Is there a way to disable snapped view for the application, or is the recommended approach to just show the application icon, while in snapped mode? 回答1: You cannot disable snapped view. Simply just create a new page and navigate to that page if a snap event occurred. You can simply display an image. Window.Current.SizeChanged += (object sender,

linq to sql (Local database for Windows Phone) better ? (OR) A sqlite-net version for mobile better ?? for windows phone 8 local database creation

感情迁移 提交于 2019-12-21 06:04:29
问题 Hi I am creating windows phone 8 app , i want to store huge amount data in my app , i have already completed my windows 8 tablet app using sqlite version for windows 8. my doubt is regarding creating a local datbase in windows phone 8 which is the most reliable one to go with ? option 1:- Working with SQLite in Windows Phone 8: a sqlite-net version for mobile option 2:- linq to sql (Local database for Windows Phone) if i use the option 1 i can easily re-use all my Data, DALC, BIZ layers as it

Accessing other processes in Win8 Metro-style app

為{幸葍}努か 提交于 2019-12-21 05:06:16
问题 I am trying to build a Windows 8 "metro-style" app that will operate as a "app killer". For those of you who have used Win8 (Tech Preview) you'll notice that once you open a metro-style app you cannot close it (without going into Task Manager and ending the process). My challenge is that I cannot access 'System.Diagnostics.Process' from my metro-style app, nor do I know if there is an comparable alternative within the WinRT. I also thought of building a separate app that hosts a service for

How to convert a simple stream(http webresponse) to bitmapimage in c# windows 8?

空扰寡人 提交于 2019-12-21 04:51:13
问题 I try 1000 times, to convert a simple stream (http webresponse) to bitmapimage, but no one tutorial is working in c# windows 8. Example: BitmapImage image = new BitmapImage(); image.SetSource(stream); image1.Source = image; Thank's for all reply. Solution InMemoryRandomAccessStream randomAccessStream = new InMemoryRandomAccessStream(); DataWriter writer = new DataWriter(randomAccessStream.GetOutputStreamAt(0)); writer.WriteBytes((byte[])command); await writer.StoreAsync(); BitmapImage image =

How easy is it to port a Windows Phone 7 application to Metro on a Windows 8 tablet?

瘦欲@ 提交于 2019-12-21 04:09:23
问题 I know that Metro on both platforms shares a common “look and feel” and that WinRt makes use of XAMLand C# (or VB.NET) like Silverlight does on Windows Phone 7. However I also know that WinRT is not Silverlight. Therefore what is the process of creating an app that will work on both a Windows 8 tablet and a Windows 7 (or 7.5) Phone? How close is WinRt to Silverlight? 回答1: Despite certain people in Microsoft claiming it will only require changing a couple of lines of code... The only possible