winrt-xaml

How to handle the back button on WP 8.1 using MVVM light?

家住魔仙堡 提交于 2019-12-21 20:29:21
问题 I'm searching for the appropiate way to handle the back button pressed event on Windows Phone 8.1 WinRT using the NavigationService available on MVVM light 5. So far I think the best place to do it is inside the ViewModelLocator by registering the GoBack method of the NavigationService while creating it following the approach outlined in NavigationService in MVVM Light V5 This is an effective approach. However, I can't handle validation before navigating back so I was wondering if there is a

How to convert a Windows.UI.Color into a string color name in a Windows Universal app

ε祈祈猫儿з 提交于 2019-12-21 19:19:05
问题 I'm trying to convert a Windows.UI.Color into a simple string color name in my Windows 8.1 Universal app. I already have the ARGB values from the Color (even the hex code), and I just want its associated known name (for example, from #7AFF7A7A to "salmon"). Since System.Drawing is not available in WinRT, I cannot use ColorConverter or ColorTranslator. I've tried converting the Windows.UI.Color object into a SolidColorBrush or even a Brush, but none of them provide the name conversion

How to convert a Windows.UI.Color into a string color name in a Windows Universal app

走远了吗. 提交于 2019-12-21 19:17:07
问题 I'm trying to convert a Windows.UI.Color into a simple string color name in my Windows 8.1 Universal app. I already have the ARGB values from the Color (even the hex code), and I just want its associated known name (for example, from #7AFF7A7A to "salmon"). Since System.Drawing is not available in WinRT, I cannot use ColorConverter or ColorTranslator. I've tried converting the Windows.UI.Color object into a SolidColorBrush or even a Brush, but none of them provide the name conversion

Styling SelectedItem in ListView in Metro App XAML

☆樱花仙子☆ 提交于 2019-12-21 16:57:52
问题 I am having troubles setting up the style of selected item in metro app list box. I have created the DataTemplate for the item in which there is a TextBlock which colour I would like to change. I tried many things from WPF but they are not available for metro like DataTemplate.Triggers, Style.Triggers and so on. I also tried to make a copy of the ItemContainerStyle template but since it uses ContentPresenter to display my DataTemplate I didn't know what to change to achieve what I want. The

C#/XAML Compile Error - Various Errors (The name “LayoutAwarePage” does not exist")

核能气质少年 提交于 2019-12-21 09:28:38
问题 EDIT : Here are the pastebins for the code: BasicPage1.xaml.cs BasicPage1.xaml LayoutAwarePage.cs EDIT 2 I have added a MS Connect ticket here: https://connect.microsoft.com/VisualStudio/feedback/details/771648/c-xaml-compile-error-various-errors-the-name-layoutawarepage-does-not-exist#tabs Right a head scratcher which I'm hoping others have experienced and know how to resolved as I'm a little disheartened by the whole affair. The Problem I have been working on a Windows Store App using C#

Issue with multiselect combobox control in Windows 8

六月ゝ 毕业季﹏ 提交于 2019-12-21 06:39:18
问题 I am creating a multiselect combobox in Windows 8 as shown in below image: For this I have created custom control code for which is mentioned below: The problem with below code is that on selecting all the all items are not selected Selected items are not displayed in textbox How can I fix that? XAML: <UserControl x:Class="App5.MultiSelectComboBox" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:App5"

Missing EventToCommand behaviour in mvvmlight for Windows 8 - Work Around?

孤者浪人 提交于 2019-12-21 04:38:07
问题 Question says it all really :) I'm writing a Windows 8 app in XAML/C# using MVVM Light and I've noticed the EventToCommand feature hasn't been implemented yet. Are there any work arounds for this that anybody can suggest? thanks! 回答1: Check out the EventToCommand behavior written by LocalJoost which uses Reactive Extensions: http://dotnetbyexample.blogspot.be/2012/07/a-winrt-behavior-to-mimic-eventtocommand.html 回答2: You can now accomplish what EventToCommand used to do using the Behaviors

UWP compiled binding x:Bind produces memory leaks

烂漫一生 提交于 2019-12-20 09:55:15
问题 While developing UWP application I recently found quite a few memory leaks preventing my pages from being collected by GC. I have a ContentPresenter on my page like: <ContentControl Grid.Column="0" Grid.Row="1" Content="{x:Bind ViewModel.Schedule, Mode=OneWay}"> </ContentControl> After I remove the Content, or replace it with dynamic {Binding} -- page is collected when I navigate from it. Otherwise it remains in memory. Is it bug or I'm doing something wrong? Is there a way to release and

UWP StackedLineSeries doesn't show values

廉价感情. 提交于 2019-12-20 06:45:42
问题 I am trying to use WinRTXamlToolkit.Controls.DataVisualization.UWP trying to draw any of the stacked charts like this: But only this comes out: Please help me, I have to use stacked series but the framework doesn't act as it should be.. 回答1: Since I don't know how you define the code behind, I just provide the sample code as follows which can create a StackedLineSeries chart successfully. XAML Code <Page x:Class="CStackLineChat.MainPage" ... xmlns:charting="using:WinRTXamlToolkit.Controls

Filtering and Sorting of an ObservableCollection in ListView-Binding

故事扮演 提交于 2019-12-20 03:52:06
问题 In earlier Versions of .net you could use something like ICollectionView collectionView = CollectionViewSource.GetDefaultView(AllImages); To build up filter mechanisms for UI-Elements. But this doesn't seem to exist in WinRT anymore. I'm using a ListBox-Element to display an User-List. The User-Class contains the properties username (String), isOnline (Boolean), isFriend (Boolean) and unreadMails (Int). I need some kind of Filtering and sorting. Filter by: no Filter only isOnline == true