windows-runtime

Metro: Why is binding from XAML to a property defined in code-behind not working?

一笑奈何 提交于 2020-01-07 04:26:08
问题 I am attempting to adapt a Windows Metro-style app sample slightly by binding the title text to a property defined in code-behind, but I can't seem to get it to work. Reading the blog post titled Bind from XAML to property defined in code-behind, I am trying out "Solution 1". Here is my XAML source (simplified): <UserControl x:Class="... .MainPage" x:Name="UserControlSelf" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

Improper WinRT exception behavior

被刻印的时光 ゝ 提交于 2020-01-07 04:18:08
问题 I observe very strange exception handling behavior in any Windows 8.1 (WinRT) application. I've created default project "Blank App (Windows 8.1)", declared MyException exception class and throw it in button's click event handler. I have submitted to Application.UnhandledException event and trying to get the type of received exception. Sometimes it is my exception, sometimes it is common System.Exception . Sometimes debugger shows it is common Exception but application works as it would be

Getting binding of transform property from code behind

你。 提交于 2020-01-06 21:14:22
问题 I have code below inside Grid : <Grid.RenderTransform> <TranslateTransform X="{Binding X, Converter={StaticResource HorizontalPositionConverter}}" Y="{Binding Y, Converter={StaticResource VerticalPositionConverter}}" /> </Grid.RenderTransform> How can I get binding of TranslateTransform.X or TranslateTransform.Y in code behind? I found this question but solution works for non-nested dependency properties. What to do when they are? I cannot consider binding to entire RenderTransform . I am

Calling async method does not set member variable

醉酒当歌 提交于 2020-01-06 20:23:40
问题 This code it´s write in C# in visual studio 2012 I ´ve using winrt tool kit Hi I tried create this loadGrupos to catch the file grupo.txt and read and load his content in to the class Grupos but I don´t know what´s happen the list grupos recive the content from the json but when I callend the loadGrupos the variable grupos don´t expose nothing. I really don´t know what´s going on. I tried debug and I didn´t found any error. using System; using System.Collections.Generic; using System.Linq;

Renewed developer license,. Now i cant debug my winrt app. Error : DEP0700

ⅰ亾dé卋堺 提交于 2020-01-06 19:42:10
问题 I am developing winrt app. Today i renewed visual studio developer's license. from then I'm getting the error. The app is running fine on simulator, but I'm trying to run it on Remote machine where its throwing this error. Error 1 Error : DEP0700 : Registration of the app failed. An internal error occurred with error 0x80070005. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues. (0x80073cf6) I checked this,this,this and this. None helpful in my case

How to parse a DateTime string based on culture?

假装没事ソ 提交于 2020-01-06 15:51:16
问题 Well I was creating a application for windows phone 8.1 WinRT. I save a Datetime.now() based on en-US culture initially but later the culture gets changed and when I try to parse the saved string in DateTime.Parse() , I get a format exception . //Setting en-US culture var culture = new CultureInfo("en-US"); Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = culture.Name; //Saving DateTime.Now in a string format String usTime = DateTime.Now.ToString(); //Changing it to the de

slider control and textblock control interaction-Metro apps

谁说我不能喝 提交于 2020-01-06 15:51:16
问题 i am trying to set the slider control to value from text block's text property through {Binding} on XAML. <Slider ValueChanged="slider_ValueChanged_1" Value= "{Binding ElementName=ComponentTextBlockValue,Path=Text}" StepFrequency="25"/> Do i need an converter to set the slider's value . The binding seems to work sometimes but sometimes it doesn't work. Sometimes,the slider just doesn't set its value to text block value. 回答1: Since you bind the Slider's value directly without a value converter

Windows Runtime GridView throws ArgumentException when setting ItemsSource property

匆匆过客 提交于 2020-01-06 15:15:36
问题 I have the following two classes for a RageComic reader metro style app I am making. public class ComicDataWNGroup { public ComicDataWNGroup(string title) { this.Title = title; this.Items = new ObservableCollection<ComicDataItem>(); } public String Title { get; set; } public ObservableCollection<ComicDataItem> Items { get; private set; } } public class ComicDataWNSource { private RedditAPI.RedditManager currentManager; public ComicDataWNSource(RedditAPI.RedditManager currentManager) { this

Namespace missing in Windows Phone 8.1 runtime app project

北慕城南 提交于 2020-01-06 14:33:32
问题 I am writing a Windows Phone 8.1 runtime app. The InkPresenter class which was available in Windows Phone 8 is not there in 8.1. Now, 8.1 should be backward compatible with 8 and that all the apps that used the InkPresenter class in Windows Phone 8 can run on 8.1 too. So my guess(and I can be wrong in assuming this) is that the Inkpresenter class should be there in Windows Phone 8.1 too but might be under a different namespace. Otherwise, how could the apps of Windows Phone 8 using the

Merging multiple Images

十年热恋 提交于 2020-01-06 03:15:05
问题 I'm trying to merge multiple Images into one image. Problem is that most libraries with such functionality are not available in a Windows 8.1 App. I'd prefer to not have to use external libraries such as WriteableBitmapEx This is my current code which unfortunately doesn't work: int count = 4; int size = 150; WriteableBitmap destination = new WriteableBitmap(300, 300); BitmapFrame frame = await (await BitmapDecoder.CreateAsync(randomAccessStream)).GetFrameAsync(0); PixelDataProvider pixelData