winrt-xaml

Change style of a Button when its Disabled ( IsEnabled=False )

只愿长相守 提交于 2020-01-23 01:08:09
问题 I have a UWP Question. How can I change style of a Button when it’s Disabled (IsEnabled=False)? 回答1: Here's how you do it. <StackPanel> <Button x:Name="button" Content="Click Me" IsEnabled="{Binding IsChecked, ElementName=checkBox}"> <Interactivity:Interaction.Behaviors> <Core:DataTriggerBehavior Binding="{Binding IsEnabled, ElementName=button, Mode=OneWay}" Value="True"> <Core:ChangePropertyAction PropertyName="Opacity" Value="1"/> </Core:DataTriggerBehavior> <Core:DataTriggerBehavior

Windows Phone ListView Binding

怎甘沉沦 提交于 2020-01-17 08:09:18
问题 I am trying to create a ListView of items and to be able to delete them. Here is my code. I can't get the list of items to display. I didn't find a simple example of binding ListViews so i can understand the exact concept. Can you tell me what am i doing wrong ? PS. myListOfItems is a list with strings. The project is WP 8.1 WinRT. public class MedClass { public string medName { get; set; } } public class MedClassRoot { public List<MedClass> medNames { get; set; } } public sealed partial

Is there a way limit the no of urls in web view

时间秒杀一切 提交于 2020-01-17 05:20:11
问题 I am writing a windows 8 application in c# xaml , I am using using a web view, I want to limit the URLs to be loaded in the web view as there are some buttons which are not necessary and we have specific web apps for that purpose. So can we limit the URLs that can be loaded in a web view? A way I thought of was to check for an event which will be fired once we start navigating to a new URL. But I could not get one in MSDN doc. Any thoughts? 回答1: While not as simple as having a Navigating

WinRT C# Play a viddler video using MediaElement

梦想与她 提交于 2020-01-17 02:50:30
问题 I am trying to play a Viddler video in my application but i cant get it to work. Here is my simple code: XAML: < MediaElement VerticalAlignment="Center" Visibility="Visible" HorizontalAlignment="Center" Name="myMediaElement" Height="350" Width="640" /> And my c#: myMediaElement = new MediaElement(); Uri url = new Uri("http://www.viddler.com/embed/5b17d44f/"); myMediaElement.Source = url; myMediaElement.Play(); Any help would be great! When i arrive on the page, nothing happens, the

GridViewItem with height greater than its GridView height

僤鯓⒐⒋嵵緔 提交于 2020-01-16 19:29:28
问题 I have GridView with fixed width and height of items. But I want some items to exceed that fixed height to contain more data. 1 I don't want to increase height of GridView - this will cause decreasing of the touch area of other controls that lie under GridView. Is there any solution? Thank you! Concept 1 回答1: I understand that you want variable sized tiles in your grid view just like in the start screen? If so then this article should help http://blogs.u2u.be/diederik/post/2012/03/07

VisualStateManager.GoToState returns false and Visual State is not changed

倖福魔咒の 提交于 2020-01-16 04:35:08
问题 I have this XAML code: <Button x:Name="btnStartRecord" Visibility="Collapsed"> <Button.BorderBrush> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="Black" Offset="0"/> <GradientStop Color="#FFF3883E" Offset="1"/> </LinearGradientBrush> </Button.BorderBrush> </Button> <Button x:Name="btnStopRecord" Visibility="Collapsed"> <Button.BorderBrush> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="Black" Offset="0"/> <GradientStop Color="

Cropping tool after file picker (like the one after you take a picture)

霸气de小男生 提交于 2020-01-15 09:25:41
问题 When you take a picture with the integrated camera, windows 8 automatically starts a cropping tool. You can enable it with this code: CameraCaptureUI cameraUI = new CameraCaptureUI(); cameraUI.PhotoSettings.AllowCropping = true; I need something similar for a picture which is chosen from the file picker. Is there any way to use the same Image-Cropper-Tool in the FilePicker as for the camera or do I have to implement it on my own? 回答1: You need to implement on your own. Check out this awesome

Get user information in Windows 8?

守給你的承諾、 提交于 2020-01-15 09:13:19
问题 I have created a sample in Windows 8 using C# and XAML to get user info of my system which includes Name, Email Id, Photo of my User Login. I am able to get Name and image but I am not able to get Email Id. My system is logged in by my hotmail id. Following is the code: how can I achieve to get email id? string displayName = await UserInformation.GetDisplayNameAsync(); string Emailid = await UserInformation.GetPrincipalNameAsync(); StorageFile image = UserInformation.GetAccountPicture

Replace `Page` with `WinRTXamlToolkit.Controls.AlternativePage`

回眸只為那壹抹淺笑 提交于 2020-01-15 06:10:48
问题 I'm attempting to use Windows RT XAML Toolkit so that I can have access to the TreeView control. I've created a new BlankApp that contains a MainPage containing XAML similar to this: <Page x:Class="BlankApp.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:BlankApp" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006

Blurred textblocks when used in animations

你离开我真会死。 提交于 2020-01-14 14:06:56
问题 I am simulating the semantic zoom effect in a Windows Store app using animations between two canvas'. However when I "zoom out" the TextBlock that appear on the canvas, appear as VERY blurry until the animation completes. This only happens for the first animation, after that the text is clear on all subsequent animations. I suspecting a bitmap caching type issue but either setting the CacheMode to Bitmap or null makes no difference. Are there any settings that can control or change this? The