Permalink
Browse files

Final few tweaks for RC release

  • Loading branch information...
timheuer committed May 31, 2012
1 parent 9056549 commit 504287489822fea00473b43bd49b01e38b9e04c7
View
@@ -5,9 +5,7 @@
MinVSVersion="11.0"
MinToolsVersion="4.0"
CopyRedistToSubDirectory="Callisto"
- AppliesTo="WindowsAppContainer+WindowsXAML+Managed"
+ AppliesTo="WindowsAppContainer+Managed"
MoreInfo="http://github.com/timheuer/Callisto">
- <File Reference="Callisto.dll">
- <ContainsControls>True</ContainsControls>
- </File>
+ <File Reference="Callisto.dll" />
</FileList>
View
@@ -17,14 +17,13 @@ So far Callisto includes:
* `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
+* 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
-* `ThemeSwitcher` - to dynamically switch themes for certain UI components
## How To Install It?
There are two ways you can install the control.
@@ -117,5 +116,4 @@ Great, please [log a bug](https://github.com/timheuer/Callisto/issues/new) so th
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](http://silverlight.codeplex.com) - for providing the base of many ported concepts/code. Licensed under Ms-PL
-* [RestSharp](http://restsharp.org) - the OAuth helper file is a fork from the RestSharp project which uses this internally for some authenticators. Licensed under Apache 2.0
-* [Jeff Wilcox](http://www.jeff.wilcox.name) - Jeff's projects have provided a lot of inspiration in what shapes some of the curent "TODO" items (i.e., theme manager) and is a great source for Metro style app development for Windows Phone
+* [RestSharp](http://restsharp.org) - the OAuth helper file is a fork from the RestSharp project which uses this internally for some authenticators. Licensed under Apache 2.0
@@ -1,39 +0,0 @@
-<Page
- x:Class="XamlControlsUITestApp.BlankPage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="using:XamlControlsUITestApp"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:callisto_converters="using:Callisto.Converters"
- xmlns:callisto="using:Callisto.Controls"
- mc:Ignorable="d">
-
- <Page.Resources>
- <callisto_converters:RelativeTimeConverter x:Key="RelativeTimeConverter" />
- </Page.Resources>
- <Grid x:Name="LayoutRoot" Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
- <StackPanel Margin="100,100,0,0" HorizontalAlignment="Left">
- <TextBlock x:Name="DateFormatted" />
- <StackPanel Orientation="Horizontal">
- <TextBlock x:Name="DateCalculated" Text="{Binding Converter={StaticResource RelativeTimeConverter}}" />
- </StackPanel>
- <TextBlock Text="Time Picker:" />
- <!--<callisto:TimePicker x:Name="MyTimePicker"/>-->
- <TextBlock Text="Date Picker:" />
- <!--<callisto:DatePicker x:Name="MyDatePicker"/>-->
- <TextBox x:Name="LogOutput" AcceptsReturn="True" Width="500" />
- </StackPanel>
- </Grid>
-
- <Page.BottomAppBar>
- <AppBar Height="88" Background="{StaticResource AppBarTestBackground}">
- <Grid>
- <StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
- <Button Content="Get Objects" Click="Button_Click_1" />
- <Button Content="GC" Click="ForceGC" />
- </StackPanel>
- </Grid>
- </AppBar>
- </Page.BottomAppBar>
-</Page>
@@ -1,64 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.IO;
-using System.Linq;
-using System.Windows.Input;
-using Callisto.Controls;
-using UIElementLeakTester;
-using Windows.ApplicationModel.Resources;
-using Windows.ApplicationModel.Resources.Core;
-using Windows.Foundation;
-using Windows.Foundation.Collections;
-using Windows.UI;
-using Windows.UI.ApplicationSettings;
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Controls.Primitives;
-using Windows.UI.Xaml.Data;
-using Windows.UI.Xaml.Input;
-using Windows.UI.Xaml.Media;
-using Windows.UI.Xaml.Media.Imaging;
-using Windows.UI.Xaml.Navigation;
-
-namespace XamlControlsUITestApp
-{
- /// <summary>
- /// An empty page that can be used on its own or navigated to within a Frame.
- /// </summary>
- public sealed partial class BlankPage : Page
- {
- public BlankPage()
- {
- this.InitializeComponent();
- }
-
- /// <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)
- {
-
- //DateTimeWrapper dtw = new DateTimeWrapper(DateTime.Now);
- DateFormatted.Text = Windows.Globalization.DateTimeFormatting.DateTimeFormatter.ShortDate.Format(DateTimeOffset.Now); //dtw.HourNumber.ToString();
- DateCalculated.DataContext = DateTime.Now.AddHours(-2); // new DateTime(2012, 1, 12, 13, 13, 5);
-
- //MyTimePicker.Value = DateTime.Now;
- }
-
- private void Button_Click_1(object sender, RoutedEventArgs e)
- {
- ObjectTracker.GarbageCollect(LogOutput);
- }
-
- private void ForceGC(object sender, RoutedEventArgs e)
- {
- GC.Collect();
- GC.WaitForPendingFinalizers();
- GC.Collect();
- }
- }
-}
@@ -117,9 +117,6 @@
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
- <Compile Include="BlankPage.xaml.cs">
- <DependentUpon>BlankPage.xaml</DependentUpon>
- </Compile>
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
@@ -212,10 +209,6 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
- <Page Include="BlankPage.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
</ItemGroup>
<ItemGroup>
<None Include="Callisto.TestApp_TemporaryKey.pfx" />
@@ -20,8 +20,7 @@
</Grid.ColumnDefinitions>
<Grid Grid.ColumnSpan="2">
- <Image Source="ms-appx:/Images/Callisto.png"
- Stretch="None" Margin="5" PointerPressed="Image_PointerPressed_1" />
+ <TextBlock Text="Callisto Testing Area" FontSize="53" FontWeight="Light" Margin="5" PointerPressed="Image_PointerPressed_1" />
</Grid>
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
@@ -45,7 +45,6 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
if (Samples == null)
{
Samples = new List<SamplePage>();
- Samples.Add(new SamplePage() { Name = "BlankPage", Page = typeof(XamlControlsUITestApp.BlankPage) });
Samples.Add(new SamplePage() { Name = "Flyout", Page = typeof(SamplePages.FlyoutSample) });
Samples.Add(new SamplePage() { Name = "Settings", Page = typeof(SamplePages.SettingsSample) });
Samples.Add(new SamplePage() { Name = "Tilt Effect", Page = typeof(SamplePages.TiltSample) });
@@ -54,17 +54,26 @@ private void BlankPage_CommandsRequested(SettingsPane sender, SettingsPaneComman
{
SettingsFlyout settings = new SettingsFlyout();
settings.FlyoutWidth = (Callisto.Controls.SettingsFlyout.SettingsFlyoutWidth)Enum.Parse(typeof(Callisto.Controls.SettingsFlyout.SettingsFlyoutWidth), settingswidth.SelectionBoxItem.ToString());
- //settings.HeaderBrush = new SolidColorBrush(Colors.Orange);
+ //settings.HeaderBrush = new SolidColorBrush(Colors.Orange);
+ //settings.Background = new SolidColorBrush(Colors.White);
settings.HeaderText = "Foo Bar Custom Settings";
BitmapImage bmp = new BitmapImage(new Uri("ms-appx:///Assets/SmallLogo.png"));
settings.SmallLogoImageSource = bmp;
+ StackPanel sp = new StackPanel();
+
ToggleSwitch ts = new ToggleSwitch();
ts.Header = "Download updates automatically";
- settings.Content = ts;
+ Button b = new Button();
+ b.Content = "Test";
+
+ sp.Children.Add(ts);
+ sp.Children.Add(b);
+
+ settings.Content = sp;
settings.IsOpen = true;
@@ -8,7 +8,7 @@
<License>License.txt</License>
<Icon>CallistoMoon.png</Icon>
<PreviewImage>CallistoLogo.png</PreviewImage>
- <Tags>xaml winrt flyout settings popup menu win8 metro pivot sqlite sql</Tags>
+ <Tags>xaml winrt flyout settings popup menu win8 metro pivot</Tags>
</Metadata>
<Installation Scope="Global" AllUsers="true">
<InstallationTarget Id="Microsoft.ExtensionSDK" TargetPlatformIdentifier="Windows" TargetPlatformVersion="v8.0" SdkName="Callisto" SdkVersion="1.0.0" />
@@ -198,7 +198,6 @@
<SubType>Designer</SubType>
</PRIResource>
</ItemGroup>
- <ItemGroup />
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' ">
<VisualStudioVersion>11.0</VisualStudioVersion>
</PropertyGroup>
@@ -1,139 +0,0 @@
-//
-// Copyright (c) 2012 Tim Heuer
-//
-// Licensed under the Microsoft Public License (Ms-PL) (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/Ms-PL.html
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-#if INCLUDE_EXPERIMENTAL
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Windows.UI.Xaml.Controls;
-
-namespace Callisto.Controls
-{
- abstract class DataSource
- {
- protected abstract DateTime? GetRelativeTo(DateTime relativeDate, int delta);
-
- public event EventHandler<SelectionChangedEventArgs> SelectionChanged;
-
- private DateTimeWrapper _selectedItem;
-
- public object SelectedItem
- {
- get { return _selectedItem; }
- set
- {
- if (value != _selectedItem)
- {
- DateTimeWrapper valueWrapper = (DateTimeWrapper)value;
- if ((null == valueWrapper) || (null == _selectedItem) || (valueWrapper.DateTime != _selectedItem.DateTime))
- {
- object previousSelectedItem = _selectedItem;
- _selectedItem = valueWrapper;
- var handler = SelectionChanged;
- if (null != handler)
- {
- handler(this, new SelectionChangedEventArgs(new object[] { previousSelectedItem }, new object[] { _selectedItem }));
- }
- }
- }
- }
- }
- }
-
- class YearDataSource : DataSource
- {
- protected override DateTime? GetRelativeTo(DateTime relativeDate, int delta)
- {
- if ((1601 == relativeDate.Year) || (3000 == relativeDate.Year))
- {
- return null;
- }
- int nextYear = relativeDate.Year + delta;
- int nextDay = Math.Min(relativeDate.Day, DateTime.DaysInMonth(nextYear, relativeDate.Month));
- return new DateTime(nextYear, relativeDate.Month, nextDay, relativeDate.Hour, relativeDate.Minute, relativeDate.Second);
- }
- }
-
- class MonthDataSource : DataSource
- {
- protected override DateTime? GetRelativeTo(DateTime relativeDate, int delta)
- {
- int monthsInYear = 12;
- int nextMonth = ((monthsInYear + relativeDate.Month - 1 + delta) % monthsInYear) + 1;
- int nextDay = Math.Min(relativeDate.Day, DateTime.DaysInMonth(relativeDate.Year, nextMonth));
- return new DateTime(relativeDate.Year, nextMonth, nextDay, relativeDate.Hour, relativeDate.Minute, relativeDate.Second);
- }
- }
-
- class DayDataSource : DataSource
- {
- protected override DateTime? GetRelativeTo(DateTime relativeDate, int delta)
- {
- Windows.Globalization.Calendar cal = new Windows.Globalization.Calendar();
- int daysInMonth = cal.NumberOfDaysInThisMonth;
- int nextDay = ((daysInMonth + relativeDate.Day - 1 + delta) % daysInMonth) + 1;
- return new DateTime(relativeDate.Year, relativeDate.Month, nextDay, relativeDate.Hour, relativeDate.Minute, relativeDate.Second);
- }
- }
-
- class TwelveHourDataSource : DataSource
- {
- protected override DateTime? GetRelativeTo(DateTime relativeDate, int delta)
- {
- int hoursInHalfDay = 12;
- int nextHour = (hoursInHalfDay + relativeDate.Hour + delta) % hoursInHalfDay;
- nextHour += hoursInHalfDay <= relativeDate.Hour ? hoursInHalfDay : 0;
- return new DateTime(relativeDate.Year, relativeDate.Month, relativeDate.Day, nextHour, relativeDate.Minute, 0);
- }
- }
-
- class MinuteDataSource : DataSource
- {
- protected override DateTime? GetRelativeTo(DateTime relativeDate, int delta)
- {
- int minutesInHour = 60;
- int nextMinute = (minutesInHour + relativeDate.Minute + delta) % minutesInHour;
- return new DateTime(relativeDate.Year, relativeDate.Month, relativeDate.Day, relativeDate.Hour, nextMinute, 0);
- }
- }
-
- class AmPmDataSource : DataSource
- {
- protected override DateTime? GetRelativeTo(DateTime relativeDate, int delta)
- {
- int hoursInDay = 24;
- int nextHour = relativeDate.Hour + (delta * (hoursInDay / 2));
- if ((nextHour < 0) || (hoursInDay <= nextHour))
- {
- return null;
- }
- return new DateTime(relativeDate.Year, relativeDate.Month, relativeDate.Day, nextHour, relativeDate.Minute, 0);
- }
- }
-
- class TwentyFourHourDataSource : DataSource
- {
- protected override DateTime? GetRelativeTo(DateTime relativeDate, int delta)
- {
- int hoursInDay = 24;
- int nextHour = (hoursInDay + relativeDate.Hour + delta) % hoursInDay;
- return new DateTime(relativeDate.Year, relativeDate.Month, relativeDate.Day, nextHour, relativeDate.Minute, 0);
- }
- }
-}
-#endif
Oops, something went wrong.

0 comments on commit 5042874

Please sign in to comment.