windows-8.1

Prevent the listview from scrolling to its top position when ItemSource changed Windows 8.1

荒凉一梦 提交于 2019-12-06 12:37:13
问题 So is there a way to stop scrolling up ? I have listview's scrollview and i tryed saving last position and in listview size changed scroll down - but it first scrolls down and later up ;/ Maybe there is some different event or completly different way ? 回答1: You can set the ItemsStackPanel's ItemUpdatingScrollMode. <ListView> <ListView.ItemsPanel> <ItemsPanelTemplate> <ItemsStackPanel ItemsUpdatingScrollMode="KeepScrollOffset" /> </ItemsPanelTemplate> </ListView.ItemsPanel> </ListView> It only

Styling Windows Phone 8.1/WinRT AppBarButton

人走茶凉 提交于 2019-12-06 12:23:00
I'm currently looking to implement a CommandBar for a WinRT Windows Phone 8.1 app. Overall it is very straightforward but I am unable to style the control. I have themed my app so that the accent colour has been changed to green. This works well for pretty much everywhere in the app (buttons, textblocks etc.) but not for the AppBarButton. The brushes I'm overriding are SystemColorControlAccentBrush and PhoneAccentBrush but changing these does not make any difference to the colour of the AppBarButton when pressed: Any idea what I'm doing wrong/can this colour be changed? Set the CommandBar's

Custom Binding not working updating from Knockout 2.3 to 3.3

帅比萌擦擦* 提交于 2019-12-06 12:09:52
My Windows 8.1 App was working fine on Knockout 2.3 but after updating to 3.3 it seems like I get the wrong Context in my custom binding. First here is how I apply binding for individual elements in the command bar of my app : var cmdArray = []; var commandIsRunning = function() { return _.any(cmdArray, function(command) { return command.isRunning(); }); }; _.each(_bottomCommands, function (row) { if(row.command) { // command wrapper var commandWrapper = ko.command({ action: function() { var rowCommand = row.command(); if (rowCommand) { return rowCommand(); } return WinJS.Promise.as(); },

Cannot get Facebook single signon with windows 8.1 to work

二次信任 提交于 2019-12-06 11:36:25
问题 After the great news about Facebook and Microsoft support Facebook SSO I have tried to implement this in a winrt/xaml/c# app for windows 8.1, however I cannot get it to work. I have registered the app with facebook and set the app's SID in the app's settings. This is the login code: Uri sid = WebAuthenticationBroker.GetCurrentApplicationCallbackUri(); string callbackURL = sid.ToString(); String facebookURL = "https://www.facebook.com/dialog/oauth?client_id=" + Uri.EscapeDataString(AppId) + "

Create a theme in Windows 8.1

荒凉一梦 提交于 2019-12-06 11:35:35
In Windows 8, you were able to create your own themes for your application ( here's a tutorial ). In Windows 8.1 Applications, themes are handled differently: you can change them at run-time and set a theme for a specific control in your XAML (if you don't want to apply the theme to the whole Application). For instance: <Grid x:Name="MainGrid" RequestedTheme="Dark"> However, I could not find a way to create my own themes. The property RequestedTheme takes an enumeration (its type is FrameworkElement.RequestedTheme ) and an enumeration by definition cannot be extended (in C#). Also, if I want

How to show “An app on your PC needs the following Windows feature.” dialog programmatically?

混江龙づ霸主 提交于 2019-12-06 08:59:48
问题 When I try to run .NET 3.5 applications on Windows 8.1 which has not .NET 3.5 Framework, Windows will show the "An app on your PC needs the following Windows feature. .NET Framework 3.5 (includes .NET 2.0 and .NET 3.0)" dialog automatically. But I want to show this dialog programmatically. I think that the dialog is much more friendly than DISM command. Any help would be appreciated. 回答1: The dialogue you are searching for is provided by a tool called Fondue (Features on Demand User

How can I get MessageBox icons in Windows 8.1

被刻印的时光 ゝ 提交于 2019-12-06 06:22:27
问题 I want to get the MessageBoxIcons, that get displayed when the user is presented with a MessageBox . Earlier I used SystemIcons for that purpose, but now it seems that it returns icons different than the ones on the MessageBox . This leads to the conclusion that in Windows 8.1 SystemIcons and MessageBoxIcons are different. I know that icons are taken using WinApi MessageBox, but I can't seem to get the icons themselves in any way. I would like to ask for a way of retrieving those icons. 回答1:

WinRT preload images

孤者浪人 提交于 2019-12-06 05:23:19
I have a Windows 8.1 XAML app where I'd like to preload images before navigating between pages. The naive code I have now is: // Page1.xaml.cs private void Button_Click(object sender, RoutedEventArgs e) { Frame.Navigate(typeof(Page2)); } And on the second page: // Page2.xaml.cs this.image1.Source = new BitmapImage(new Uri("ms-appx:///Assets/image1.jpg")); this.image2.Source = new BitmapImage(new Uri("ms-appx:///Assets/image2.jpg")); Now, when I click the button to navigate, I can see the images being loaded and showing up one at the time. I would like to pre-load the images on the button click

How to use SearchBox in Windows 8.1 by loading the results using a async method

独自空忆成欢 提交于 2019-12-06 04:06:09
问题 I am using a SearchBox to list some items that are obtained from the server. The call to the server is happening in a async method. I am getting an exception An exception of type 'System.InvalidOperationException' occurred WinRT information: A method was called at an unexpected time. My XAML <SearchBox Name="SearchBox" Style="{StaticResource AccountSearchBoxStyle}" Grid.Row="1" Margin="120,0,0,0" HorizontalAlignment="Left" SuggestionsRequested="SearchBox_SuggestionsRequested"

WinAPI deprecation after Windows 8.1

徘徊边缘 提交于 2019-12-06 03:55:53
问题 I have been using GetVersionEx and it failed in machine which runs with Windows 8.1. After looking some information found out that GetVersionEx is depracated since 8.1 version. I want to ask where could I find full list of deprecated APIs because I don't want to use it anymore. EDIT: I'm not asking what to use instead of GetVersionEx , I'm asking for a full list of deprecated APIs. 回答1: Microsoft has described the changes in Operating system version changes in Windows 8.1 and Windows Server