Alternate background color in Listview XAML

I tried this and it works for me. <Window x:Class=”TryResponses.MainWindow” xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation” xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml” xmlns:vm=”clr-namespace:TryResponses” xmlns:system=”clr-namespace:System;assembly=mscorlib” Title=”MainWindow” Height=”350″ Width=”525″> <Window.Resources> <vm:MainWindowViewModel x:Key=”MainWindowViewModel” /> </Window.Resources> <Grid Background=”LightGray” DataContext=”{StaticResource MainWindowViewModel}”> <Grid.Resources> <Style TargetType=”ListViewItem”> <Style.Triggers> <Trigger Property=”ItemsControl.AlternationIndex” Value=”0″> <Setter Property=”Background” Value=”LightBlue” /> </Trigger> <Trigger Property=”ItemsControl.AlternationIndex” Value=”1″> <Setter Property=”Background” Value=”LightGray” /> </Trigger> </Style.Triggers> </Style> <DataTemplate DataType=”system:String”> <!– put your data template … Read more

What are the pros and cons of writing C#/XAML vs. C++/XAML WinRT applications in Windows8? [closed]

I see the difference as a design choice, than a personal preference of language. Preference would be more related to VB vs C#. And generally it’s the same differences you get in any application where you choose C++ or .NET. C++ will give you faster startup times. IIRC, .NET 4.5 has auto NGENing abilities (not … Read more

Let TextBox stretch to fill width in StackPanel

Unfortunately the alternative (DockPanel) isnt available for Metro. You could try a WrapGrid, but I dont know if it’ll solve your problem (Ive never used it). The only real way of doing this is using a Grid as you described: <Grid Width=”400″> <Grid.ColumnDefinitions> <ColumnDefinition Width=”Auto” /> <ColumnDefinition /> </Grid.ColumnDefinitions> <TextBlock Text=”Label” Width=”150″ /> <TextBox Text=”Value” … Read more

Do Windows 8 Store Apps (Metro) run in Windows 7 or XP?

What new things needed to run Metro Apps in Windows XP or Windows 7 A virtual machine of Windows 8. Metro apps currently don’t run on Windows 7, and definitely don’t on Windows XP. According to this thread, it’s difficult but might happen eventually: Keep your eyes out on future Channel 9 videos and on … Read more

What is _In_ in C++?

It is a SAL annotation, used for code analysis. The annotations themselves are defined as macros that, in normal builds, expand to nothing. The ^ and ref class are features of C++/CX, a set of language extensions developed to make it easier to build Metro style apps for Windows 8 in C++. Neither is a … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)