Skip to content

Instantly share code, notes, and snippets.

View Kinnara's full-sized avatar
🌴
On vacation

Yimeng Wu Kinnara

🌴
On vacation
View GitHub Profile
@Kinnara
Kinnara / gist:ca7bb872b0aef6febcc3
Created June 3, 2014 09:16
Simple GridViewItem Style
<Style x:Key="AlphaJumpListItemContainerStyle" TargetType="GridViewItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="GridViewItem">
<Border x:Name="TiltContainer">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Pressed">
<Storyboard>
@Kinnara
Kinnara / gist:04689b68ebad6630ed2f
Created May 5, 2014 07:20
Refined Text-only Item Templates
<DataTemplate x:Key="TextItemTemplate">
<TextBlock Text="{Binding Line1}"
Style="{ThemeResource ListViewItemTextBlockStyle}"
Margin="0,2,0,7" />
</DataTemplate>
<DataTemplate x:Key="TextPaddedItemTemplate">
<TextBlock Text="{Binding Line1}"
Style="{ThemeResource ListViewItemTextBlockStyle}"
Margin="0,-3.5,0,30.5" />
@Kinnara
Kinnara / ScrollContent.cs
Last active October 13, 2015 20:59
How to disable bounce effect for ScrollViewer when content is not scrollable
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Media;
namespace Kinnara.Phone.Controls
{
public sealed class ScrollContent : ContentPresenter
{