winrt-xaml

Winrt custrom grid control with gridlines

感情迁移 提交于 2019-12-24 10:38:13
问题 I want to make a custom grid control, because the default doesn't support showing grid lines. I found a wpf solution for this, but the winrt lacks few features that the wpf supports. The code in the wpf soulution is something like this : protected override void OnRender(DrawingContext dc) { if (ShowCustomGridLines) { foreach (var rowDefinition in RowDefinitions) { dc.DrawLine(new Pen(GridLineBrush, GridLineThickness), new Point(0, rowDefinition.Offset), new Point(ActualWidth, rowDefinition

LIVE SDK v5.3 & Window 8 - How to tell the difference between a user logged in with a Microsoft Account and user with a local account?

空扰寡人 提交于 2019-12-24 09:15:08
问题 I'm using the v5.3 Live SDK for a Windows 8 Store App (XAML/C#) and I have a question. In my app, if the user is logged into Windows using a Microsoft Account, then I want to grab the firstname/lastname/Microsoft ID. If they are logged in to Windows using a local account and haven't logged in to my app, then I want to show a 'Login' button, so they can enter their Microsoft account email/password. I know how to do all that using the Live SDK, but my question is - how can I tell if the user is

how to prevent autoselection of first item in GridView on databind?

只愿长相守 提交于 2019-12-24 09:07:24
问题 When I databind my GridView to an ObservableCollection, the first item of the collection is automatically selected. The SelectionMode property of the GridView is set to multiple . Is there some way to prevent this auto-selection? Or on what event should I listen so that I can reset the SelectedIndex of the GridView back to -1? 回答1: Set the IsSynchronizedWithCurrenItem property to false on the gridview in xaml 回答2: There is acutally a pretty simple solution. I set the SelectionMode of the

Expand Search Charm programmatically

大城市里の小女人 提交于 2019-12-24 07:46:09
问题 Is it possible to expand the search charm programmatically? I want to have a search button in my windows 8 app which expands the search charm. 回答1: According to Object Browser: public void Show(string query) Member of Windows.ApplicationModel.Search.SearchPane . see http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.search.searchpane.show.aspx 回答2: Windows.ApplicationModel.Search.SearchPane.GetForCurrentView().Show(); 回答3: Hi add this below method in App.xaml.cs

How to use CSS with Windows 8 Webview Control?

倾然丶 夕夏残阳落幕 提交于 2019-12-24 07:14:34
问题 I have a question about window's 8 apps Webview Control , is there anyway to use css to manage the look of the webview , i'm using it here to view a returned contents of a feeded html data but as you can see it's striped from all the CSS , so is there anyway that I can manage the CSS for the Webview ? UPATED : This is the code void ItemListView_SelectionChanged(object sender, SelectionChangedEventArgs e) { // this code to populate the web view // with the content of the selected blog post. //

func<string,string,bool> is not a valid windows runtime parameter type (win 8.1)

拈花ヽ惹草 提交于 2019-12-24 07:13:13
问题 https://github.com/igorkulman/AutoCompleteBox/blob/master/AutoCompleteBox/AutoCompleteBox.cs I download this control, But I cannot build it, public Func<string, string, bool> SearchFunction { get { return (Func<string, string, bool>)GetValue(SearchFunctionProperty); } set { SetValue(SearchFunctionProperty, value); } } When I try using SearchFunction as public,I am getting this error. When I change it as internal it is working but this time I can't access SearchFunction from my project. Method

Windows 8 store app development without touch screen

穿精又带淫゛_ 提交于 2019-12-24 07:12:13
问题 I've started doing Windows 8 Store app development for some projects at work, but I do not have a touch screen device of my own at home. If I write a personal app for submission to the store, I must use my own hardware since I can't use the work computers for personal projects. My concern is getting into a situation where I submit an app to the store, then have touch-screen users describing issues that I can't replicate on a non-touch-screen device. Are there any functions or capabilities or

W8.1 Live SDK 5.6 - LiveAuthClient.InitializeAsync System.NullReferenceException

空扰寡人 提交于 2019-12-24 06:42:50
问题 I'm developing a Windows 8.1 App (XAML/C#) with MVVM Light. I used to keep my LiveId inside the code just for debugging, but now it's time to do the LogIn. Currently i'm stuck with this piece of code: this.authClient = new LiveAuthClient(); LiveLoginResult loginResult = await this.authClient.InitializeAsync(scopes); It keeps giving me the error: An exception of type 'System.NullReferenceException' occurred in mscorlib.dll but was not handled in user code Additional information: Object

Setting Path.Data in code-behind

故事扮演 提交于 2019-12-24 05:33:14
问题 I have this XAML code which makes a Path which is inside a Canvas residing in a MainPage.xaml page. <Path x:Name="progressPath" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Stroke="Gold" StrokeThickness="5" Canvas.Left="300" Canvas.Top="300" Height="305" Width="305" Data="m 150,0 A 150,0 0 0 0 150,0 A 150,150 0 0 0 150,0"> </Path> I want to have several Path 's like this one (for example, a new Path is made when the user taps a button), so I decided to create them in the

How to disable “scroll compression” in ScrollViewer

混江龙づ霸主 提交于 2019-12-24 05:30:13
问题 In a template I'm using a ScrollViewer with the following properties: <ScrollViewer VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Hidden" HorizontalSnapPointsType="MandatorySingle" HorizontalSnapPointsAlignment="Near" ZoomMode="Disabled"> <ItemsPresenter/> </ScrollViewer> This works mostly fine. The only detail I want to change is to disable "scroll compression" when the scroll viewer is scrolled to either the leftmost/rightmost positions. At these positions, if I