Are Click, Tapped, and PointerPressed synonymous in WinRT-XAML?

Click is there for backwards compatibility, and is essentially the same as Tapped. Tapped is a “high level gesture” that will translate automatically to a click, tap, pen press, etc. and is what I would recommend to use. PointerPressed is not what you want. Here’s why: if I press and hold, the PointerPressed event will … Read more

WPF Fade Animation

I don’t know how to do both animations (fade in and fade out) in pure XAML. But simple fade out can be achieved relatively simple. Replace DataTriggers with Triggers, and remove ExitActions since they makes no sense in Fade out scenario. This is what you will have: <Style TargetType=”FrameworkElement” x:Key=”animatedList”> <Setter Property=”Visibility” Value=”Hidden”/> <Style.Triggers> <Trigger … Read more

ListView ItemTemplate 100% width

I got it. Setting the ListView.ItemContainerStyle with a HorizontalContentAlignment setter makes the trick. I.e.: <ListView x:Name=”questionsView” Background=”{StaticResource ApplicationPageBackgroundThemeBrush}”> <ListView.ItemTemplate> <DataTemplate> <Border Background=”BlueViolet”> <Grid HorizontalAlignment=”Stretch” Margin=”0″> <TextBlock Text=”{Binding}” /> <TextBlock HorizontalAlignment=”Right”>16 minutes ago</TextBlock> </Grid> </Border> </DataTemplate> </ListView.ItemTemplate> <ListView.ItemContainerStyle> <Style TargetType=”ListViewItem”> <Setter Property=”HorizontalContentAlignment” Value=”Stretch” /> </Style> </ListView.ItemContainerStyle> </ListView>

TextBox Binding TwoWay Doesn’t Update Until Focus Lost WP7

I assume your Save button is an ApplicationBarButton (not a normal button). For normal buttons it will just work because they take focus and hence the data-binding will kick in. For ApplicationBarButtons on the phone it’s a little different because they don’t take focus away from the client app. To ensure the data-binding kicks in … Read more

Xamarin Forms StackLayout: How to set width / height of children to percentages

StackLayout doesn’t go very well with varying heights in this scenario. The Xamarin Forms engines isn’t as well rounded as the WPF engine at this point. Basically you have to go <Grid> <Grid.RowDefinitions> <RowDefinition Height=”7*” /> <RowDefinition Height=”3*” /> </Grid.RowDefinitions> <Entry Grid.Row=”0″ VerticalOptions=”Fill”></Entry> <Button Grid.Row=”1″ VerticalOptions=”Fill”>Click me</Button> </Grid> Also as a side note, only Grids … Read more

Newline in string attribute

<TextBlock Text=”Stuff on line1&#x0a;Stuff on line 2″/> You can use any hexadecimally encoded value to represent a literal. In this case, I used the line feed (char 10). If you want to do “classic” vbCrLf, then you can use &#x0d;&#x0a; By the way, note the syntax: It’s the ampersand, a pound, the letter x, then … Read more

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