winrt-xaml

Flyout behind Appbar

空扰寡人 提交于 2019-12-20 02:56:17
问题 When you want your app to expand to the full screen (including status bar and appbar), you have to do : var applicationView = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView(); applicationView.SetDesiredBoundsMode(Windows.UI.ViewManagement.ApplicationViewBoundsMode.UseCoreWindow); Then if you want to have a flyout in your appbar or anywhere in your app, they will be displayed behind the appbar : <Page.BottomAppBar> <CommandBar> <AppBarButton Icon="Preview" Label="Preview">

Setting Mindate and MaxDate for Datepicker Control

。_饼干妹妹 提交于 2019-12-20 02:33:16
问题 I'm currently using DatePicker’s control, where I tried to limit the dates to show MinDate & Maxdate. Unfortunately I couldn't find any related method to set the Min and Max days/Month except for Year, I even tried to extends the Controls class to set the Date to be display during it the DatePicker loaded. Is it possible to limit which dates a user can select from a datepicker on a UWP application? Thanks! 回答1: I assume you're developing on Windows 10 Universal Windows Platform. DatePicker in

How to change windows 8 live tile text color?

随声附和 提交于 2019-12-20 02:32:02
问题 I am creating a windows 8 application in which I want to change foreground of live tile. I Have found a set of templates but didn't find any way to change live tile's text color. I have written following template code in my application. <tile> <visual> <binding template=""TileWidePeekImage01""> <image id=""1"" src=""{0}"" alt=""alt text""/> <text id=""1"">ActySystem</text> <text id=""2"">{1} Updated: {2} {3}</text> </binding> </visual> </tile> Please Help me! 回答1: You have only two choice for

Windows 8 Metro App - Render PNGs

纵然是瞬间 提交于 2019-12-20 02:27:10
问题 I am needing to render some custom PNGs in a Windows 8 app. Basically I need to create a custom live tile by putting some drawings made in my app on top of an image for a live tile, and the only way to do this is render a PNG to disk, see here. What library should I use to do this? My first thought was to use a Xaml UserControl and RenderTargetBitmap , but it is not available in a Metro app. 回答1: WinRT XAML Toolkit has some extension methods for WriteableBitmap that you could use too. You

Load a Page into a ContentControl

风流意气都作罢 提交于 2019-12-19 11:38:30
问题 I have a ContentControl where I want to load the page myPage2 . My XAML Codefrom this page looks like this: <Page x:Class="ExampleApp.myPage2"> <Grid x:Name="Content" Height="651" Width="941" Background="White"> ... ... </Grid> </Page> I know that I can load a resource from a page with this Code: protected override DataTemplate SelectTemplateCore(object item, DependencyObject container) { var contentControl = (ContentControl)container; return (DataTemplate) contentControl.Resources

How to get camera feeds in Windows 8 Metro style app?

折月煮酒 提交于 2019-12-19 10:21:04
问题 I am trying to get camera feeds in Windows 8 metro style app so that i can make some changes on it something like augmented reality. I have tried but only able to find how to capture images using CameraCaptureUI(). Can anyone tell me how can i achieve camera feeds for AR? 回答1: All you need to do is pass in CameraCaptureUIMode.Video for CaptureFileAsync. Here is a sample CameraCaptureUI dialog = new CameraCaptureUI(); dialog.VideoSettings.Format = CameraCaptureUIVideoFormat.Mp4; StorageFile

Change background color of selected item in listbox

可紊 提交于 2019-12-19 10:16:13
问题 First I search here and on web and I find many and many solution how change background color of selected item in listbox in WPF but not how do it in windows store app. This framework is litte different I cant get to work any solution. I use this: http://social.msdn.microsoft.com/Forums/windowsapps/en-US/91575930-2058-413a-99de-f3b31c74dfd9/change-itemtemplate-forground-when-listbox-is-focused?forum=winappswithcsharp on the end of page is very good solution but he set item teplate like this:

Behaviors are not working properly inside Style Setter

ε祈祈猫儿з 提交于 2019-12-19 09:48:30
问题 In my Windows-Runtime app, I have a theme with a style that has a Behavior defined for the DoubleTapped action: These are the XML Namespaces: xmlns:i="using:Microsoft.Xaml.Interactivity" xmlns:core="using:Microsoft.Xaml.Interactions.Core" And this is the style: <Style x:Name="DisplayImage" TargetType="ScrollViewer"> <Setter Property="VerticalScrollBarVisibility" Value="Hidden" /> <Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="ZoomMode" Value="Disabled" /> <Setter

WinRT 8.1 Phone - ListView reordering

ε祈祈猫儿з 提交于 2019-12-19 08:26:45
问题 I need to create a reorderable ListView in a Windows Phone 8.1 app created using WinRT. The XAML is the following (it binds to an ObservableDictionary in the codebehind): <Grid Margin="24"> <ListView x:Name="MainListView" CanDragItems="True" CanReorderItems="True" AllowDrop="True" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" > <ListView.ItemTemplate> <DataTemplate> <Border Padding="24" Margin="16" Background="CadetBlue"> <TextBlock Text="{Binding}" /> </Border> </DataTemplate> <

windows phone 8.1 textbox character virtualKey validation

僤鯓⒐⒋嵵緔 提交于 2019-12-19 08:20:49
问题 im develeoping windows phone 8.1 app. In a textbox I want to prevent the user from inputting any non-digital letter only [0-9]. So here is my code: private void NumKeyDown(object sender, KeyRoutedEventArgs e) { bool isNumber = (e.Key == Windows.System.VirtualKey.Number0 || e.Key == VirtualKey.Number1 || e.Key == VirtualKey.Number2 || e.Key == VirtualKey.Number3 || e.Key == VirtualKey.Number4 || e.Key == VirtualKey.Number5 || e.Key == VirtualKey.Number6 || e.Key == VirtualKey.Number7 || e.Key