Coder Social home page Coder Social logo

wptoolkit's Introduction

Windows Phone Toolkit (Kinnara's fork)

Includes fixes, improvements, and more controls.

NuGet package

Highlights

ApplicationBarSubmenu
Submenu for an application bar item.

FlipView
Lets people flip through items one at a time. Similar to the WinRT FlipView.

ImageButton + ToggleImageButton
Button/ToggleButton control which has an image as its content.

Label
Enhanced text control that supports MaxLines and TextLineBounds. A rich set of standard styles are provided.

ListView
Long list selector with incremental loading and more.

PhonePasswordBox
An extended password box which implements header, placeholder text, and a show password check box.

PhoneSlider
An extended Slider which implements tick marks and snap points.

PropertyUI
Interactive property presenter with copy context menu.

RadioButtonGroup
More easily implement a group of radio buttons.

StartView
Panoramic view similar to the start screen.

VariableSizedWrapGrid
Provides a grid-style layout panel where each tile/cell can be variable size based on content. Similar to the WinRT VariableSizedWrapGrid.

WaitCursor
The wait cursor is a blocking visual animation typically reserved for cases where the application cannot continue until an event is satisfied.

wptoolkit's People

Contributors

kinnara avatar pepsi1x1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wptoolkit's Issues

NullReferenceException in TransitionFrame

I'm afraid I don't have repro steps for this, but have received a few crash reports relating to this from a production app.

NullReferenceException
at Microsoft.Phone.Controls.TransitionFrame.EnsureLastTransitionIsComplete()
at Microsoft.Phone.Controls.TransitionFrame.OnNavigating(Object sender, NavigatingCancelEventArgs e)
at System.Windows.Navigation.NavigationService.RaiseNavigating(Uri uri, NavigationMode mode, Boolean isFragmentNavigationOnly, Boolean isCancelable, Boolean isNavigationInitiator, PhoneApplicationPage existingContentPage)
at System.Windows.Navigation.NavigationService.Journal_NavigatingBack(Object sender, JournalEventArgs args)
at System.Windows.Navigation.Journal.OnNavigatingBack()
at System.Windows.Navigation.Journal.ShellPage_BackKeyPressed(Object sender, BackKeyPressEventArgs args)
at Microsoft.Phone.Shell.Interop.ShellPageCallback.FireOnBackKeyPress(IntPtr pageThis)

Focusing PhonePasswordBox

I was trying to use the KeyUp event in a PhoneTextBox to focus the PhonePasswordBox in a typical username-password form, but it just wasn't working. PhonePasswordBox.focus(), at least in this case, does not cause the keyboard to come up and the input box to actually be focused.

In my case, I fixed this with the following extension method:

public static void FocusReal(this PhonePasswordBox pb)
{
    var grid = System.Windows.Media.VisualTreeHelper.GetChild(pb, 0);
    PasswordBox realpb = System.Windows.Media.VisualTreeHelper.GetChild(grid, 2) as PasswordBox;
    realpb.Focus();
}

I was using a modified template (which did not modify the name or type of the actual PasswordBox object), so that is probably the cause of the problem. Also, my solution will not work if the template is changed so that the actual PasswordBox is not in the same position.

Ideally, the focus() code should look for either an object named "PasswordBox" inside the tree, whatever its position, or the first PasswordBox object inside the tree, whatever its name.

ElementScrollingHost, ElementItemsPresenter are getting null

Hi, i copied all FlipView Control of your toolkit into my project. I have debugged both your sample and my sample i am getting
ElementScrollingHost =null
ElementItemsPresenter=null
In your sample your able to get.

Below method your where your assigned values:

public override void OnApplyTemplate()
{
_animator = null;
ItemsHost = null;
ItemsHostSize = new Size(double.NaN, double.NaN);

        if (ElementItemsPresenter != null)
        {
            LayoutUpdated -= OnLayoutUpdated;
        }

        base.OnApplyTemplate();

        ElementScrollingHost = GetTemplateChild(ElementScrollingHostName) as ScrollViewer;
        ElementItemsPresenter = GetTemplateChild(ElementItemsPresenterName) as ItemsPresenter;

        if (ElementItemsPresenter != null)
        {
            InitializeItemsHost();

            if (ItemsHost == null)
            {
                LayoutUpdated += OnLayoutUpdated;
            }
        }
    }

I am not getting why those values are null. sample running without error. but i am getting following output:
output

BindingExpression path error when binding PickerBox ItemsSource to a collection with 20 or more items and using FullModeDisplayMemberPath

Enter full mode and scroll, these outputs are shown:

System.Windows.Data Error: BindingExpression path error: 'Key' property not found on 'System.Collections.Generic.List`1[System.Object]' 'System.Collections.Generic.List`1[System.Object]' (HashCode=66629291). BindingExpression: Path='Key' DataItem='System.Collections.Generic.List`1[System.Object]' (HashCode=66629291); target element is 'Microsoft.Phone.Controls.Primitives.PickerBoxListItem' (Name=''); target property is 'Content' (type 'System.Object')..
System.Windows.Data Error: BindingExpression path error: 'Property1' property not found on 'System.Collections.Generic.List`1[System.Object]' 'System.Collections.Generic.List`1[System.Object]' (HashCode=43330072). BindingExpression: Path='Property1' DataItem='System.Collections.Generic.List`1[System.Object]' (HashCode=43330072); target element is 'Microsoft.Phone.Controls.Primitives.PickerBoxListItem' (Name=''); target property is 'Content' (type 'System.Object')..

Items are displayed correctly though. No error is shown when the collection has less than 20 items.

XAML

<phone:PhoneApplicationPage
    x:Class="PhoneApp1.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    DataContext="{Binding RelativeSource={RelativeSource Self}}">

    <StackPanel>
        <toolkit:PickerBox ItemsSource="{Binding DictSrc}" FullModeDisplayMemberPath="Key"/>
        <toolkit:PickerBox ItemsSource="{Binding ListSrc}" FullModeDisplayMemberPath="Property1"/>
    </StackPanel>
</phone:PhoneApplicationPage>

C#

using System.Collections.Generic;
using Microsoft.Phone.Controls;

namespace PhoneApp1
{
    public partial class MainPage : PhoneApplicationPage
    {
        Dictionary<string, string> dictSrc = new Dictionary<string, string>
        {
            {"0", ""}, {"1", ""}, {"2", ""}, {"3", ""}, {"4", ""},
            {"5", ""}, {"6", ""}, {"7", ""}, {"8", ""}, {"9", ""},
            {"10", ""}, {"11", ""}, {"12", ""}, {"13", ""}, {"14", ""},
            {"15", ""}, {"16", ""}, {"17", ""}, {"18", ""}, {"19", ""}
        };

        public Dictionary<string, string> DictSrc { get { return dictSrc; } }

        List<ListItem> listSrc = new List<ListItem>
        {
            new ListItem("0", ""), new ListItem("1", ""), new ListItem("2", ""), new ListItem("3", ""), new ListItem("4", ""),
            new ListItem("5", ""), new ListItem("6", ""), new ListItem("7", ""), new ListItem("8", ""), new ListItem("9", ""),
            new ListItem("10", ""), new ListItem("11", ""), new ListItem("12", ""), new ListItem("13", ""), new ListItem("14", ""),
            new ListItem("15", ""), new ListItem("16", ""), new ListItem("17", ""), new ListItem("18", ""), new ListItem("19", ""),
        };

        public List<ListItem> ListSrc { get { return listSrc; } }

        public MainPage()
        {
            InitializeComponent();
        }
    }

    public class ListItem
    {
        public string Property1 { get; set; }
        public string Property2 { get; set; }

        public ListItem(string prop1, string prop2)
        {
            Property1 = prop1;
            Property2 = prop2;
        }
    }
}

Custom branch won't build

The WP7 and WP8 Toolkit are missing 2 files each and neither will build.

To reproduce, download a .ZIP of the Custom branch, extract to a folder then try and build in Visual Studio 2012 (Update 3)

ExpanderView animations

When you open a group, you have a nice animation for it opening, when it closes, however, it just snaps closed, no animation.

FlipView with image, slow

Congratulations for the component. I use FlipView for loading image. if the images are of low resolution is fast.
if images are large size is slow and not is asynchronous. how to solve?
thanks

Cannot run PhoneToolkitSample.WP8 project

Your LIB looks cool and I wanted to test it out, but I cannot get the samples to compile and run for windows phone 8. I tried opening just the windows phone 8 samples project, but it loaded everything anyway (including the WP7 stuff).

Here are the error I am getting when trying to run it on the WP8 emulator on my WIn 8 Pro 64 bit system with VS 2013.

Warning 1 Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. Microsoft.Phone.Controls.Toolkit.WP7
Error 2 An assembly with the same identity 'System.IO, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has already been imported. Try removing one of the duplicate references. c:\Users\Ryan\SkyDrive\Programming\WinPhone\WPToolkit-custom\WPToolkit-custom\packages\Microsoft.Bcl.1.1.3\lib\sl4-windowsphone71\System.IO.dll Microsoft.Phone.Controls.Toolkit.WP7
Error 3 An assembly with the same identity 'System.Runtime, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has already been imported. Try removing one of the duplicate references. c:\Users\Ryan\SkyDrive\Programming\WinPhone\WPToolkit-custom\WPToolkit-custom\packages\Microsoft.Bcl.1.1.3\lib\sl4-windowsphone71\System.Runtime.dll Microsoft.Phone.Controls.Toolkit.WP7
Error 4 An assembly with the same identity 'System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has already been imported. Try removing one of the duplicate references. c:\Users\Ryan\SkyDrive\Programming\WinPhone\WPToolkit-custom\WPToolkit-custom\packages\Microsoft.Bcl.1.1.3\lib\sl4-windowsphone71\System.Threading.Tasks.dll Microsoft.Phone.Controls.Toolkit.WP7
Warning 5 Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. PhoneToolkitSample.WP7
Error 6 Metadata file 'C:\Users\Ryan\SkyDrive\Programming\WinPhone\WPToolkit-custom\WPToolkit-custom\Bin\WP7\Debug\Microsoft.Phone.Controls.Toolkit.dll' could not be found C:\Users\Ryan\SkyDrive\Programming\WinPhone\WPToolkit-custom\WPToolkit-custom\PhoneToolkitSample\CSC PhoneToolkitSample.WP7

-=Ryan

FlipView - property to set if manipulation was handled or not

Hi,
could you please add some bool property to FlipView which in default would be true but I could set it to false. It should be used for e.Handled in Manipulation events. I would like to use FlipView in scroll control but now when I tried to use FlipView and vertical scroll doesn't do anything (horizontal scrolling with images is working great :) ). Is it possible?
Thanks

How to Use FlipView

Please provide sample code. when using this control it is printing namespace of the data item. In sample it is working fine. but why my code is printing dataitem namespace.

FlipView manipulation and animation

FlipView captures all manipulation events and cancels vertical swipes/flicks/drags, so I'm unable to scroll the ScrollViewer.
It also has no animation transition with updating the SelectedIndex property (though the feature seems to be present as per source code).

ContextMenu how to know what ListItem was selected

Having fun learning to use your toolkit fork. However, I am having trouble trying to figure out how to use the ContextMenu with a listbox control. I want to tap and hold a listbox item, then select delete from the contextmenu to delete that listitem, but the click event for the context menu seem to have no reference to the listbox item. And if I try to capture the selected item in the ListBox.Hold event selectedItem is null.

Here is part of my xaml:

<ListBox x:Name="PodcastListbox" ItemsSource="{Binding Podcasts}" SelectionChanged="PodcastListbox_SelectionChanged">
<ListBox.ItemTemplate>
    <DataTemplate>
        <ListBoxItem Toolkit:TiltEffect.IsTiltEnabled="True">
            <Grid Margin="0,0,0,12">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Image Source="/Assets/Podcast_NoImg.png" Width="60" Height="60" Margin="5,5,5,5" />
                <StackPanel Grid.Column="1">
                    <TextBlock Text="{Binding Path=Name}"
                       Style="{StaticResource PhoneTextAccentStyle}"
                       FontSize="{StaticResource PhoneFontSizeMedium}"/>
                    <TextBlock Text="{Binding Path=ArtistName}" Margin="20,0,0,20" />
                    <Toolkit:ContextMenuService.ContextMenu>
                        <Toolkit:ContextMenu>
                            <Toolkit:MenuItem Header="Delete Podcast" Click="MenuItemPodcastDelete_Click" />
                        </Toolkit:ContextMenu>
                    </Toolkit:ContextMenuService.ContextMenu>
                </StackPanel>
            </Grid>
        </ListBoxItem>
    </DataTemplate>
</ListBox.ItemTemplate>
</ListBox>

On another note... I would love to see you add some features like Coding4Fun's Prompt, MessagePrompt and Popup dialog classes.

Thanks
-=Ryan

AutoCompleteBox popup behind keyboard

The popup of the AutoCompleteBox control will be displayed behind the keyboard instead of cropping the height. This occurres if the page has an applicationbar. See the screenshot below:

wp_ss_20150325_0001

Can not integrated with Windows Phone Toolkit 4.2013.8.16

I have worked with FlipView in WPToolkit (Kinnara), it is the best for my purpose.
But in my project Windows Phone 8.1 Silverlight, I had Windows Phone toolkit (https://www.nuget.org/packages/WPtoolkit/4.2013.8.16). And when I try to install WPToolkit (Kinnara), some conflicts happend.

It seems Kinnara's WPToolkit overrides Windows Phone toolkit (https://www.nuget.org/packages/WPtoolkit/4.2013.8.16). Unfortunately, I need both of them

I used many classes of Windows Phone toolkit (https://www.nuget.org/packages/WPtoolkit/4.2013.8.16), and many useful features are available in it. But I deeply want to use FlipView (only in WPToolkit - Kinnara)

Can you help me to solve the conflict?
untitled

Thank you very much

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.