Code Monkey home page Code Monkey logo

callisto's Introduction

Callisto

Build status

What Is It?

Callisto is a library for use in Windows Store XAML applications (aka Metro style apps). The XAML framework in Windows.UI.Xaml is great, but has some functionality that isn't provided in-the-box in a few controls and APIs. Callisto provides added functionality on top of the XAML UI framework for Windows.

You can also read more under Frequently Asked Questions. Documentation for each control is always an 'in progress' thing (contributions welcome) but is on the Wiki page here.

What's In It?

So far Callisto includes:

  • Rating - a ratings control for Metro UI
  • LiveTile - an in-app tile experience to give you animated or 'live' tiles
  • Tilt - an effect to provide the tilt experience when clicked on edges/corners
  • OAuth helpers - a set of helpers to create OAuth 1.0 signatures/headers for those sites that hate OAuth 2.0 :-)
  • BooleanToVisibilityConverter - a converter to well, convert boolean to visibility, very common use
  • LengthToBooleanConverter - a converter to examine a string length to convert to boolean (simple validation helper)
  • RelativeTimeConverter - a converter to show time as relative string, i.e., 'about an hour ago'
  • Extensions - some extension method helpers (i.e., bind html content to a WebView)

What is in the plan (could always use the help):

  • DatePicker and TimePicker - providing a globalized time/date picker control in Metro style
  • Ratings - providing a rating control for Metro style
  • Pivot - a UI interface for providing "tabbed" interface in a Metro style way

Note the following have been deprecated in the most recent release as Windows 8.1 introduces proper controls for these:

  • Flyout - a primitive that includes positioning and 'light dismiss' logic
  • Menu - primarily to be used from AppBar, contains the base for providing, well, a Menu
  • MenuItem - an item for a menu, including separators and contains the command point for the menu item
  • SettingsFlyout - an item to create a custom settings pane UI

How To Install It?

There are two ways you can install the control.

Visual Studio Extension SDK

Install as an Extension SDK via the Visual Studio Gallery - available within VS as well as downloading from the gallery directly

NuGet

You can get the control via NuGet if you have the extension installed for Visual Studio or via the PowerShell package manager. This control is published via NuGet at Callisto.

How To Use It?

Controls are individually documented with examples for usage on the Wiki Documentation.

I found an Issue

Great, please log a bug so that it can be tracked.

Credits and Acknowledgements

Open Source Project Credits

Some of the code represented in the toolkit is forks/ports of other Open Source libraries. Where used, their license is reprsented in the code files.

  • Silverlight Toolkit - for providing the base of many ported concepts/code. Licensed under Ms-PL
  • RestSharp - the OAuth helper file is a fork from the RestSharp project which uses this internally for some authenticators. Licensed under Apache 2.0

callisto's People

Contributors

dotmorten avatar kiwidev avatar lprichar avatar nigel-sampson avatar scottdorman avatar scottisafool avatar timheuer avatar xvir 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

callisto's Issues

Add WinJS.UI.Rating Control

As far as I am concerned JavaScript should never have a control we don't have. This one seems like it might be easy to implement. Getting a lot of requests for it @ application accelerator labs, // Jerry

Back button doesn't always have a hover color

If you run the sample application with a dark theme, the back button in the settings fly out no longer has a hover color. You do get one in the light theme. I'm not clear why this isn't working, as it should be pulling the BackButtonHoverBackgroundBrush from the current theme, as far as I can tell. Pressed color works though.

....Stefan

Add Error/Warning bar

UX guidelines talk about error/warning bars but provide no guidance on what controls to use, only the position. This would be a simple control to add a Popup positioned at the UX guideline area for the error/warning

Flyout does not have correct right margin with only togglemenuitems

When you use the flyout control and only add ToggleMenuItems. The result will be a flyout with it's right border trimmed to the text instead of having the same left margin behind the text.

Example screenshot: http://yfrog.com/esrpddp

Code to reproduce:

    private void ShowFlyoutMenu(object sender, RoutedEventArgs e)
    {
        Flyout f = new Flyout();
        f.PlacementTarget = sender as UIElement;
        f.Placement = PlacementMode.Top;
        f.Closed += (x, y) =>
        {
            LogEvent("Event: Closed");
        };

        Menu menu = new Menu();

        ToggleMenuItem tmi1 = new ToggleMenuItem();
        tmi1.Text = "Visug";
        tmi1.IsChecked = _toggleMenuChecked["visug"];
        tmi1.Tapped += (a, b) =>
        {
            _toggleMenuChecked["visug"] = !_toggleMenuChecked["visug"];
        };

        ToggleMenuItem tmi2 = new ToggleMenuItem();
        tmi2.Text = "WiPhug";
        tmi2.IsChecked = _toggleMenuChecked["wiphug"];
        tmi2.Tapped += (a, b) =>
        {
            _toggleMenuChecked["wiphug"] = !_toggleMenuChecked["wiphug"];
        };

        menu.Items.Add(tmi1);
        menu.Items.Add(tmi2);

        f.Content = menu;
        f.IsOpen = true;

        UpdateLayout();
    }

XamlParseException on WebViewExtension.StringSource

I am unable to get WebViewExtension binding to work and am getting two exceptions thrown when the binding occurs at runtime. The first thrown exception (chronologically) is:
"A System.InvalidCastException was thrown: "Unable to cast object of type 'Windows.UI.Xaml.Data.Binding' to type 'System.String'"
and then the XamlParseException.

The InvalidCastException, which seems to be causing the issue is at this line in \obj\Debug\XamlTypeInfo.g.cs:
Callisto.WebViewExtension.SetStringSource((Windows.UI.Xaml.Controls.WebView)instance, (System.String)Value);

I have a simple repro app to show this with the following code (full solution available on request). Any ideas how to get this working?

Page:

<Page
    x:Class="WebViewExTestApp.MainPage"
    IsTabStop="false"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:WebViewExTestApp"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:callisto="using:Callisto"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <WebView callisto:WebViewExtension.StringSource="{Binding Content}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
    </Grid>
</Page>

Code:

using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238

namespace WebViewExTestApp
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();
            DataContext = post;
        }

        Post post = new Post() { Content = "This is test content." };

        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.  The Parameter
        /// property is typically used to configure the page.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
        }

        public class Post
        {
            public string Content { get; set; }
        }
    }
}

Create AppBarCommand

There can definitely be a need/consideration for having a stronger typed AppBarButton rather than just a styled button. This would allow it to automatically respond to snapped state which is supposed to remove showing the label for the button.

Notify when SettingsFlyout closed

Please implement a Closed handler on SettingsFlyout, so that I can be notified when it shuts. There are a number of settings that the user might set that will cause me to refresh the page. I don't want to do that until the user has completed the settings, otherwise it could waste a lot of data, so I need to know when the fly out is shut, and refresh then. Would be fine if it worked the same way as Flyout does, I think.

Settings Flyout no background color

We test the same code in 2 machines and found out that one of the machine doesn't have any background for the setting flyout panel? Any idea?

Including Callisto but not using SQLite will fail cert

If you are using Callisto but not using SQLite, the app will fail store certification. This is because the app would need to declare the C++ runtime as a dependency. If an app isn't using SQLite though this is not clear and seems unnecessary.

This might be a reason to remove the SQLLite.cs file with Metro mods from this project and just point to the original source.

Implement Pivot

Implement a pivot control like the Windows Phone has. Use open source history from phone.codeplex.com as base starting point?

ToggleMenuItem does not widen overal Menu container

If a ToggleMenuItem is used with other menu items, then the entire aligment of the menu items is off and against the UX design for the ToggleMenu per design.windows.com. This needs to be fixed so that if a ToggleMenuItem is used with others, then the overall Menu margin on the left is wider.

OAuthTools.GetSignature method throws NotImplementedException

In OAuthTools.cs, line 310 (inside the final GetSignature overload) throws a NotImplementedException because it passes “HMAC_SHA1” into the OpenAlgorithm method. According to the documentation on MSDN "HMAC_SHA1" isn’t a valid value.

Since the algorithm provider class instantiated inside the method is only used to specify which provider implementation should be used in your HashWith extension method (Extensions.cs, line 414), perhaps a better implementation would be to just translate the OAuthSignatureMethod enum value into a string and pass that into the HashWith method. As long as the “HMAC_SHA1” string gets passed into the MacAlgorithmProvider.OpenAlgorithm method, things work fine.

Rating: Binding to Value does not seem to work

I may be doing something wrong. However, it seems that the binding to Rating.Value does not work when the underlying value is changed. If I set the Value property without binding the stars show properly. If the user selects a star the binding fires into the view model.

Would you have a sample that demonstrates binding to the Rating control. Specifically binding the underlying value to the rating control on load of the screen to show what a user had rated in the past.

Thanks much,
Tom

Fix entrance transition for settings

The settings pane root popup should actually transition in as well (not just the content). The Popup doesn't allow the panel animation right now in the consumer preview so this can't easily be implemented that won't be throw away code.

Menu duplicate of Windows.UI.Popups.PopupMenu

PopupMenu can be used for Menu scenarios in XAML apps, so why would we need Menu? One argument is that Menu in Callisto can better align with MVVM models as PopupMenu doesn't implement ICommand but rather IUICommand.

Additionally Menu can be styled/templated.

SettingsFlyout only works well within Light theme app

Because the SettingsFlyout design is a light theme, the default is dark text, which is fine. The problem arises when a user chooses dark theme app (in App.xaml) and then the text on the SettingsFlyout will be all light, making it miserable.

What needs to happen is overrides within the SettingsFlyout by having theme resources defined in generic.xaml. The problem is that they all have to be defined again (including all variants for Menu and other defined brushes within Theme RDs. Having Issue #1 resolved might help this

Settings Flyout _contentGrid is null

Hi,

Using SettingsFlyout control the following throws an exception, I tried adding a Grid with that Name, doesn't work

_contentGrid = GetTemplateChild("SettingsFlyoutContentGrid") as Grid;

Is this a issue or am I missing something?

WebViewExtension Two-Way Binding Doesn't Seem to Work

The binding now works in one direction (from DataContext to control) thanks (very much!) to your fix (76531d3), but not from control to DataContext. I am using a

with ContentEditable="true" as the HtmlSource to test this as it allows me to change the Html in the control. When I go to get the HTML content from the DataContext, I still get the same HTML as the DataContext originally held, so it seems that the return to the DataContext isn't happening. I get no DataBinding errors in the Output window, so I don't think I've done the databinding wrong.

Here's my XAML:

    <Page.Resources>
        <ResourceDictionary>
            <local:PostContentToViewerHtmlConverter x:Key="posttoviewconverter"></local:PostContentToViewerHtmlConverter>
        </ResourceDictionary>
    </Page.Resources>
...
        <WebView x:Name="blogPostViewer" Margin="0,88" callisto:WebViewExtension.HtmlSource="{Binding Content, Mode=TwoWay, Converter={StaticResource posttoviewconverter}}" />

And my Converter that wraps the HTML so that it's editable:

    public class PostContentToViewerHtmlConverter : IValueConverter
    {
        #region Constants
        const string editorBaseHTMLPrefix = "<html><head></head><body><div id='postContent' contenteditable='true'>";
        const string editorBaseHTMLSuffix = "</div></body></html>"; 
        #endregion

        public object Convert(object value, Type targettype, object parameter, string language)
        {
            return editorBaseHTMLPrefix + value + editorBaseHTMLSuffix;
        }

        public object ConvertBack(object value, Type targettype, object parameter, string language)
        {
            return value.ToString().Replace(editorBaseHTMLPrefix, "").Replace(editorBaseHTMLSuffix, "");
        }
    }

Would you like me to make a repro using the new WebViewExtension sample in the SampleApp?

Backbutton does not work for all scenarios.

When there are multiple levels of flyouts, the backbutton does not seem to work as expected. The backbutton only seems to go back to the settings charm. If I have gone from one flyout to another flyout, the backbutton should move me to the previous flyout, at least this is my expectation.

Add push scrolling helper

Add some helper to enable the 'push scrolling' capability you see on the start screen for horizontal panning with mouse.

Rename LiveTile

I wonder if we should rename LiveTile -- this is very much a Start Screen term and we don't want to confuse what the developer creates with something that won't show up on the Start Screen experience?

Consider making the SQLite port async

Currently the SQLite methods are synchronous which doesn't totally match with the Metro philosophy. In most cases the operations are likely fast enough not to matter. However we should consider making things like Insert, Create, Drop, etc. async.

Tighten up Flyout positioning logic

Need a CR/better enhancement on PlacementTarget logic on Flyout. This was extracted from Silverlight toolkit and some hacks in place to meet UI guidelines for Win8...would be good to see if this could be tightened up some more.

Tilt effect needs to reset

The animation should reset every time you press on it so it appears responsive. Now it just stays in the same state.

Settings Flyout Template issues

Grid containing the actual settings panel content should have a vertical alignment of Stretch, rather than top.
The template uses a ContentControl rather than a ContentPresenter.

Settings flyout and layout changes

I haven't tested this in all cases, but setting _windowBounds in the constructor of the control and then using it in the loaded event to set Canvas.LeftProperty doesn't allow reaction to changes in the layout. If the view loads in fullscreen mode, and then is changed to filled, the settings flyout will render too far to the right by 320 pixels.

Add SL PivotView

Without question, this is the most commonly requested Metro control.
// Jerry

Flyout dimensions limited

It seems that I can't make a Flyout bigger than Width=450 or so. Is this by design or is there someway I can make it bigger?
I tried specifying the width of my user control at construction time but it still did no good, the controls were cut off on the right hand edge.

Create theme switcher

Implement an API helper to dynamically switch to light/dark theme on a given visual tree starting point. This allows for the app to have one theme (i.e., dark) but other areas (i.e., Settings panel) to have a light theme without having to re-style each control being used.

Fix exit transition for flyout

the flyout experience is supposed to fade out if you look at other system-level flyouts. Popup currently doesn't allow animations to run when IsOpen=False is set. A bug has been filed on the consumer preview and we will have to wait to see if that can be changed

Odd Flyout control position on second click

After clicking the control which the Flyout control PlacementTarget is set to, the position the flyout appears is shifted down to the right. I was able to repro this issue in the sample code as well by clicking the Show Menu button repeatedly and quickly.

RTL not being handled correctly

RTL for both FlowDirection as well as OS-based RTL languages needs to be handled correctly for the developer. Right now, for instance, SettingsFlyout will always position on right side of the screen. If the OS is an RTL language, then the charms bar will actually be on the left and the SettingsFlyout should position accordingly to be predictable for the user

DateTimePicker control

I dont know but I can't use in DatePicker. I installed your package, I wrote Using Callisto.Controls but DatePicker is not there.

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.