winrt-xaml

Show status bar when using the ApplicationViewBoundsMode.UseCoreWindow windows phone 8.1

给你一囗甜甜゛ 提交于 2019-12-02 08:15:47
My Windows Phone 8.1 apps bottom part gets under the software navigation keys. I use ApplicationViewBoundsMode.UseCoreWindow to make the page stay over the software navigation keys. But as a result the content of the page gets under the status bar and the status bar becomes transparent. Is there any way to keep the status bar normal and also make the page from going under the software navigation keys? Zhendong Wu - MSFT Is there any way to keep the status bar normal and also make the page from going under the software navigation keys? ApplicationViewBoundsMode.UseCoreWindow can indeed help to

Windows Runtime: How to set image in a ellipse shape button?

狂风中的少年 提交于 2019-12-02 06:41:42
<Button x:Name="btnProfilePicture" HorizontalAlignment="Center" Click="btnProfilePicture_Click"> <Button.Template> <ControlTemplate> <Ellipse x:Name="ellipsePicture" Fill="Turquoise" Width="150" Height="150" Stroke="White" StrokeThickness="10"> </Ellipse> </ControlTemplate> </Button.Template> </Button > I have a button in ellipse shape, with color fill by default. I want to change the fill to an image in code-behind in runtime. How can I do this? More info: I tried to set the ellipse fill by using the "ellipsePicture" name but this name cannot be referenced in the code behind but I dont know

Navigate to another page at OnNavigatedTo?

走远了吗. 提交于 2019-12-02 05:27:54
问题 Why does the method Navigate not work when called in the OnNavigatedTo event of this page? Is this behavior reproducible for you? Any ideas how to avoid this problem? void LockScreenPage::OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) { //if user has no PIN protection this->Frame->Navigate(Windows::UI::Xaml::Interop::TypeName(AnotherPage::typeid)); //else verify PIN } 回答1: To get the right behavior I am now using the dispatcher: this->Dispatcher->RunAsync(Windows::UI:

Calculate ViewBox ScaleFactor on a Metro Style App

痞子三分冷 提交于 2019-12-02 04:38:47
Is there any way to get the scale factor by which a ViewBox scales its content in a XAML Windows 8 Metro Style App The WinRTXAMLToolit has an extension for this. public static double GetChildScaleX(this Viewbox viewbox) { if (viewbox.Child == null) throw new InvalidOperationException("Can't tell effective scale of a Viewbox child for a Viewbox with no child."); var fe = viewbox.Child as FrameworkElement; if (fe == null) throw new InvalidOperationException("Can't tell effective scale of a Viewbox child for a Viewbox with a child that is not a FrameworkElement."); if (fe.ActualWidth == 0) throw

How to make EntranceThemeTransition works on a Custom Panel & ItemsSource?

空扰寡人 提交于 2019-12-02 04:13:39
I can't get EntranceThemeTransition to work on a custom panel as ItemsPanelTemplate. See: Simplest code behind: public List<int> MyListExample = new List<int>() {0, 1, 2, 3, 4, 5}; Simplest XAML: <ListView Width="120" ItemsSource="{x:Bind MyListExample}"> <ListView.ItemContainerTransitions> <TransitionCollection> <EntranceThemeTransition FromVerticalOffset="200" IsStaggeringEnabled="True"/> </TransitionCollection> </ListView.ItemContainerTransitions> <ListView.ItemsPanel> <ItemsPanelTemplate> <!--EntranceThemeTransition WORKS--> <ItemsWrapGrid/> <!--EntranceThemeTransition does NOT work--> <!-

LiveSDK 5.6.3 not working in UWP store app

只愿长相守 提交于 2019-12-02 03:20:29
I have a universal windows store app targeting Windows 10. In a previous version of the app targeting Windows 8.1 I used the LiveSDK ( the 5.6 version here ) to access data from the user's MS Live account using the LiveAuthClient . In the new version of the app, I figured I'd use the most recent version of the LiveSDK ( 5.6.3 available as a nuget package here ) but when I install the nuget package, I am unable to to access the Microsoft.Live namespace. For example, the following statement: using Microsoft.Live; Produces the error "The type or namespace 'Live' does not exist in the namespace

Universal App Windows Phone Orientation

为君一笑 提交于 2019-12-02 03:13:39
Recently I was developing a Universal app for both the Windows Phone and Windows Store. In that app, I was trying to fix the Orientation of the App to Landscape. But in WinRT based apps of Windows Phone 8.1, I failed to find any Orientation option. In the Silverlight apps, we can fix the Orientations as we want. But is there any way to fix the Orientation to Landscape mode in the Universal Apps? It will be very helpful if someone help me in this regard. Thanks in advance. :) Under WinRT you can have a look at DisplayInformation class , where you will find probably all you need. You can also

How to localize notifications and combobox in Windows store app? (C#/XAML, Multilingual App Toolkit)

走远了吗. 提交于 2019-12-02 01:03:17
问题 I have a couple of issues with windows store app localization. I am able to localize xaml stuff like TextBlock.Text or Button.Content(I'm doing it in the same way as shown here), but I have no idea how can I localize following things: 1). Items in my ComboBox. <ComboBox x:Name="comboBoxTopAppBar" Width="120" Margin="10,0,0,0" MinWidth="200" SelectedItem="{Binding SelectedStatus, Mode=TwoWay}"> <x:String>Item 1</x:String> <x:String>Item 2</x:String> <x:String>Item 3</x:String> </ComboBox> 2).

How to localize notifications and combobox in Windows store app? (C#/XAML, Multilingual App Toolkit)

好久不见. 提交于 2019-12-01 22:35:00
I have a couple of issues with windows store app localization. I am able to localize xaml stuff like TextBlock.Text or Button.Content( I'm doing it in the same way as shown here ), but I have no idea how can I localize following things: 1). Items in my ComboBox. <ComboBox x:Name="comboBoxTopAppBar" Width="120" Margin="10,0,0,0" MinWidth="200" SelectedItem="{Binding SelectedStatus, Mode=TwoWay}"> <x:String>Item 1</x:String> <x:String>Item 2</x:String> <x:String>Item 3</x:String> </ComboBox> 2). MessageDialogs in C# code(without await because of catch block) new MessageDialog("Something went

Setting Mindate and MaxDate for Datepicker Control

故事扮演 提交于 2019-12-01 22:01:30
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! I assume you're developing on Windows 10 Universal Windows Platform. DatePicker in UWP, you can only set the MinYear and MaxYear. There's 4 datetime control that you can use (Refer to this