This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<toolkit:PickerBox ItemsSource="{Binding SecondItems}" SelectedItem="{Binding SecondSelected}" Foreground="{StaticResource PhoneContrastForegroundBrush}"> | |
<toolkit:PickerBox.ItemTemplate> | |
<DataTemplate> | |
<StackPanel x:Name="stackPanel" Orientation="Horizontal" Margin="10,10" Width="440"> | |
<Rectangle Fill="{Binding Brush}" Width="42" Height="42" /> | |
<TextBlock Text="{Binding Name}" FontSize="36" VerticalAlignment="Center" Margin="25,0,0,0" /> | |
</StackPanel> | |
</DataTemplate> | |
</toolkit:PickerBox.ItemTemplate> | |
</toolkit:PickerBox> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<toolkit:PickerBox ItemsSource="{Binding FirstItems}" SelectedItem="{Binding FirstSelected}" | |
Foreground="{StaticResource PhoneContrastForegroundBrush}" | |
FontSize="36" Margin="0,0,0,48" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (int i = _firstInViewport; i <= _lastInViewport; i++) | |
{ | |
ListBoxItem item = (ListBoxItem)MainListBox.ItemContainerGenerator.ContainerFromIndex(i); | |
if (item == null) | |
continue; | |
VisualStateManager.GoToState(item, "BeforeLoaded", false); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var observable = Observable.GenerateWithTime(_firstInViewport, x => x <= _lastInViewport, x => x, | |
x => TimeSpan.FromMilliseconds(50), x => x + 1); | |
observable.Subscribe(i => Dispatcher.BeginInvoke(() => | |
VisualStateManager.GoToState( | |
(ListBoxItem)MainListBox.ItemContainerGenerator | |
.ContainerFromIndex(i), "AfterLoaded", true))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_firstInViewport = 0; | |
_lastInViewport = MainListBox.Items.Count - 1; | |
// determine first visible item | |
for (int i = 0; i < MainListBox.Items.Count; i++) | |
{ | |
ListBoxItem item = (ListBoxItem)MainListBox.ItemContainerGenerator.ContainerFromIndex(i); | |
if (item == null || !IsVisibleInViewPort(item, MainListBox)) | |
continue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GeneralTransform elementTransform = element.TransformToVisual(container); | |
Rect rect = elementTransform.TransformBounds(new Rect(new Point(0, 0), element.RenderSize)); | |
rect.Intersect(new Rect(new Point(0, 0), MainListBox.RenderSize)); | |
return rect != Rect.Empty; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var observable = Observable.GenerateWithTime(0, x => x < yourListBox.Items.Count, x => x, x => TimeSpan.FromMilliseconds(50), x => x + 1); | |
observable.Subscribe(i => Dispatcher.BeginInvoke(() => | |
VisualStateManager.GoToState( | |
(ListBoxItem)yourListBox.ItemContainerGenerator | |
.ContainerFromIndex(i), "AfterLoaded", true))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (int i = 0; i < yourListBox.Items.Count; i++) | |
{ | |
ListBoxItem item = (ListBoxItem)yourListBox.ItemContainerGenerator.ContainerFromIndex(i); | |
if (item != null) | |
{ | |
VisualStateManager.GoToState(item, "BeforeLoaded", false); | |
} | |
} | |
yourListBox.Opacity = 1.0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yourListBox.Opacity = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void Application_Start() | |
{ | |
IKernel kernel = new StandardKernel(new YourNinjectModule()); | |
DependencyResolver.SetResolver(new NinjectDependencyResolver(kernel)); | |
// register global filters, routes, ... | |
} |