This file contains 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
AccessDeniedInvalid according to Policy: Policy Condition failed: ["eq", "$key", "downloads/brainafk/BrainafkPhoneToolkit/C:\u000Cakepath\r2-binaries.zip"]1DF069746D6A58D64Z+SO1mNq0TN587kZrPs1xNpCxYDBs8u9gr1BMBEw0LjM5kLbhOHE2RV5YeXUtm1 |
This file contains 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="Black" FontSize="36" | |
IsApplicationBarVisible="True" /> |
This file contains 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
MainListBox.ItemContainerStyle.Setters.Add(new Setter(ListBoxItem.OpacityProperty, 0)); |
This file contains 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 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
private void ItemContainerGenerator_ItemsChanged(object sender, ItemsChangedEventArgs e) | |
{ | |
Dispatcher.BeginInvoke(new ItemAddedDelegate(i => | |
{ | |
var item = (ListBoxItem) MainListBox.ItemContainerGenerator.ContainerFromIndex(i - 1); | |
if (item == null) | |
return; | |
VisualStateManager.GoToState(item, "BeforeLoaded", false); | |
item.Opacity = 1.0; |
This file contains 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
<Style TargetType="controls:PickerBox"> | |
<Setter Property="Template"> | |
<Setter.Value> | |
<ControlTemplate TargetType="controls:PickerBox"> | |
<StackPanel> | |
<VisualStateManager.VisualStateGroups> | |
<VisualStateGroup x:Name="ButtonStates"> | |
<VisualStateGroup.Transitions> | |
<VisualTransition GeneratedDuration="0:0:0.1"/> | |
</VisualStateGroup.Transitions> |
This file contains 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 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 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
MainListBox.ItemContainerGenerator.ItemsChanged += ItemContainerGenerator_ItemsChanged; |
This file contains 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; |