commonXAMLControls/.DS_Store
__MACOSX/commonXAMLControls/._.DS_Store
commonXAMLControls/commonXAMLControls/App.xaml
<Application
x:Class="commonXAMLControls.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:commonXAMLControls">
</Application>
commonXAMLControls/commonXAMLControls/App.xaml.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
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.Animation;
using Windows.UI.Xaml.Navigation;
// The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=391641
namespace commonXAMLControls
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
public sealed partial class App : Application
{
private TransitionCollection transitions;
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
this.InitializeComponent();
this.Suspending += this.OnSuspending;
}
/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used when the application is launched to open a specific file, to display
/// search results, and so forth.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
#if DEBUG
if (System.Diagnostics.Debugger.IsAttached)
{
this.DebugSettings.EnableFrameRateCounter = true;
}
#endif
Frame rootFrame = Window.Current.Content as Frame;
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
// TODO: change this value to a cache size that is appropriate for your application
rootFrame.CacheSize = 1;
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
.
2. using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
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.Animation;
using Windows.UI.Xaml.Navigation;
// The Blank Application template is documented at
http://go.microsoft.com/fwlink/?LinkId=391641
namespace commonXAMLControls
{
/// <summary>
3. /// Provides application-specific behavior to supplement the
default Application class.
/// </summary>
public sealed partial class App : Application
{
private TransitionCollection transitions;
/// <summary>
/// Initializes the singleton application object. This is the
first line of authored code
/// executed, and as such is the logical equivalent of
main() or WinMain().
/// </summary>
public App()
{
this.InitializeComponent();
this.Suspending += this.OnSuspending;
}
/// <summary>
4. /// Invoked when the application is launched normally by
the end user. Other entry points
/// will be used when the application is launched to open a
specific file, to display
/// search results, and so forth.
/// </summary>
/// <param name="e">Details about the launch request and
process.</param>
protected override void
OnLaunched(LaunchActivatedEventArgs e)
{
#if DEBUG
if (System.Diagnostics.Debugger.IsAttached)
{
this.DebugSettings.EnableFrameRateCounter = true;
}
#endif
Frame rootFrame = Window.Current.Content as Frame;
5. // Do not repeat app initialization when the Window
already has content,
// just ensure that the window is active
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and
navigate to the first page
rootFrame = new Frame();
// TODO: change this value to a cache size that is
appropriate for your application
rootFrame.CacheSize = 1;
if (e.PreviousExecutionState ==
ApplicationExecutionState.Terminated)
{
// TODO: Load state from previously suspended
application
}
6. // Place the frame in the current Window
Window.Current.Content = rootFrame;
}
if (rootFrame.Content == null)
{
// Removes the turnstile navigation for startup.
if (rootFrame.ContentTransitions != null)
{
this.transitions = new TransitionCollection();
foreach (var c in rootFrame.ContentTransitions)
{
this.transitions.Add(c);
}
}
rootFrame.ContentTransitions = null;
rootFrame.Navigated +=
this.RootFrame_FirstNavigated;
7. // When the navigation stack isn't restored navigate
to the first page,
// configuring the new page by passing required
information as a navigation
// parameter
if (!rootFrame.Navigate(typeof(MainPage),
e.Arguments))
{
throw new Exception("Failed to create initial
page");
}
}
// Ensure the current window is active
Window.Current.Activate();
}
/// <summary>
/// Restores the content transitions after the app has
8. launched.
/// </summary>
/// <param name="sender">The object where the handler is
attached.</param>
/// <param name="e">Details about the navigation
event.</param>
private void RootFrame_FirstNavigated(object sender,
NavigationEventArgs e)
{
var rootFrame = sender as Frame;
rootFrame.ContentTransitions = this.transitions ?? new
TransitionCollection() { new NavigationThemeTransition() };
rootFrame.Navigated -=
this.RootFrame_FirstNavigated;
}
/// <summary>
/// Invoked when application execution is being suspended.
Application state is saved
/// without knowing whether the application will be
terminated or resumed with the contents
/// of memory still intact.
9. /// </summary>
/// <param name="sender">The source of the suspend
request.</param>
/// <param name="e">Details about the suspend
request.</param>
private void OnSuspending(object sender,
SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
// TODO: Save application state and stop any
background activity
deferral.Complete();
}
}
}
commonXAMLControls/commonXAMLControls/Assets/Logo.sc
ale-240.png
commonXAMLControls/commonXAMLControls/Assets/SmallL
ogo.scale-240.png
commonXAMLControls/commonXAMLControls/Assets/SplashS
24. commonXAMLControls/commonXAMLControls/MainPage.xaml
.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
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.Navigation;
// The Blank Page item template is documented at
http://go.microsoft.com/fwlink/?LinkId=391641
25. namespace commonXAMLControls
{
/// <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();
this.NavigationCacheMode =
NavigationCacheMode.Required;
}
/// <summary>
/// Invoked when this page is about to be displayed in a
Frame.
26. /// </summary>
/// <param name="e">Event data that describes how this
page was reached.
/// This parameter is typically used to configure the
page.</param>
protected override void
OnNavigatedTo(NavigationEventArgs e)
{
// TODO: Prepare page for display here.
// TODO: If your application contains multiple pages,
ensure that you are
// handling the hardware Back button by registering for
the
//
Windows.Phone.UI.Input.HardwareButtons.BackPressed event.
// If you are using the NavigationHelper provided by
some templates,
// this event is handled for you.
}
//((ComboBoxItem)myComboBox.SelectedItem).Content.ToStri
28. {
if (myToggleButton.IsChecked == true)
myProgressRing.IsActive = true;
else
myProgressRing.IsActive = false;
}
}
}
commonXAMLControls/commonXAMLControls/obj/Debug/App
.g.cs
#pragma checksum
"C:UserscslabDesktopcommonXAMLControlscommonXAM
LControlsApp.xaml" "{406ea660-64cf-4c82-b6f0-
42d48172a799}" "C757CA06661F2E2821CEFE903713DEB0"
//-------------------------------------------------------------------------
-----
// <auto-generated>
// This code was generated by a tool.
29. //
// Changes to this file may cause incorrect behavior and will
be lost if
// the code is regenerated.
// </auto-generated>
//-------------------------------------------------------------------------
-----
namespace commonXAMLControls
{
partial class App : global::Windows.UI.Xaml.Application,
global::Windows.UI.Xaml.Markup.IComponentConnector
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("
Microsoft.Windows.UI.Xaml.Build.Tasks"," 4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void Connect(int connectionId, object target)
{
30. this._contentLoaded = true;
}
}
}
commonXAMLControls/commonXAMLControls/obj/Debug/App
.g.i.cs
#pragma checksum
"C:UserscslabDesktopcommonXAMLControlscommonXAM
LControlsApp.xaml" "{406ea660-64cf-4c82-b6f0-
42d48172a799}" "C757CA06661F2E2821CEFE903713DEB0"
//-------------------------------------------------------------------------
-----
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will
31. be lost if
// the code is regenerated.
// </auto-generated>
//-------------------------------------------------------------------------
-----
namespace commonXAMLControls
{
#if !DISABLE_XAML_GENERATED_MAIN
public static class Program
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("
Microsoft.Windows.UI.Xaml.Build.Tasks"," 4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
static void Main(string[] args)
{
global::Windows.UI.Xaml.Application.Start((p) => new
App());
32. }
}
#endif
partial class App : global::Windows.UI.Xaml.Application
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("
Microsoft.Windows.UI.Xaml.Build.Tasks"," 4.0.0.0")]
private bool _contentLoaded;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("
Microsoft.Windows.UI.Xaml.Build.Tasks"," 4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void InitializeComponent()
{
if (_contentLoaded)
return;
40. // This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will
be lost if
// the code is regenerated.
// </auto-generated>
//-------------------------------------------------------------------------
-----
namespace commonXAMLControls
{
partial class MainPage :
global::Windows.UI.Xaml.Controls.Page,
global::Windows.UI.Xaml.Markup.IComponentConnector
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("
Microsoft.Windows.UI.Xaml.Build.Tasks"," 4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void Connect(int connectionId, object target)
42. this._contentLoaded = true;
}
}
}
commonXAMLControls/commonXAMLControls/obj/Debug/Mai
nPage.g.i.cs
#pragma checksum
"C:UserscslabDesktopcommonXAMLControlscommonXAM
LControlsMainPage.xaml" "{406ea660-64cf-4c82-b6f0-
42d48172a799}" "B7DE005FE9C2793BF0A7B62B290A017A"
//-------------------------------------------------------------------------
-----
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will
43. be lost if
// the code is regenerated.
// </auto-generated>
//-------------------------------------------------------------------------
-----
namespace commonXAMLControls
{
partial class MainPage :
global::Windows.UI.Xaml.Controls.Page
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("
Microsoft.Windows.UI.Xaml.Build.Tasks"," 4.0.0.0")]
private global::Windows.UI.Xaml.Controls.TextBlock
myTextblock;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("
Microsoft.Windows.UI.Xaml.Build.Tasks"," 4.0.0.0")]
private global::Windows.UI.Xaml.Controls.Button
myButton;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("
71. internal class XamlSystemBaseType :
global::Windows.UI.Xaml.Markup.IXamlType
{
string _fullName;
global::System.Type _underlyingType;
public XamlSystemBaseType(string fullName,
global::System.Type underlyingType)
{
_fullName = fullName;
_underlyingType = underlyingType;
}
public string FullName { get { return _fullName; } }
public global::System.Type UnderlyingType
{
get
{
72. return _underlyingType;
}
}
virtual public
global::Windows.UI.Xaml.Markup.IXamlType BaseType { get {
throw new global::System.NotImplementedException(); } }
virtual public
global::Windows.UI.Xaml.Markup.IXamlMember
ContentProperty { get { throw new
global::System.NotImplementedException(); } }
virtual public
global::Windows.UI.Xaml.Markup.IXamlMember
GetMember(string name) { throw new
global::System.NotImplementedException(); }
virtual public bool IsArray { get { throw new
global::System.NotImplementedException(); } }
virtual public bool IsCollection { get { throw new
global::System.NotImplementedException(); } }
virtual public bool IsConstructible { get { throw new
global::System.NotImplementedException(); } }
virtual public bool IsDictionary { get { throw new
global::System.NotImplementedException(); } }
virtual public bool IsMarkupExtension { get { throw new
global::System.NotImplementedException(); } }
73. virtual public bool IsBindable { get { throw new
global::System.NotImplementedException(); } }
virtual public bool IsReturnTypeStub { get { throw new
global::System.NotImplementedException(); } }
virtual public bool IsLocalType { get { throw new
global::System.NotImplementedException(); } }
virtual public
global::Windows.UI.Xaml.Markup.IXamlType ItemType { get {
throw new global::System.NotImplementedException(); } }
virtual public
global::Windows.UI.Xaml.Markup.IXamlType KeyType { get {
throw new global::System.NotImplementedException(); } }
virtual public object ActivateInstance() { throw new
global::System.NotImplementedException(); }
virtual public void AddToMap(object instance, object key,
object item) { throw new
global::System.NotImplementedException(); }
virtual public void AddToVector(object instance, object
item) { throw new global::System.NotImplementedException();
}
virtual public void RunInitializer() { throw new
global::System.NotImplementedException(); }
virtual public object CreateFromString(string input) {
throw new global::System.NotImplementedException(); }
}
80. nstructor(UnderlyingType.TypeHandle);
}
override public object CreateFromString(string input)
{
if (_enumValues != null)
{
int value = 0;
string[] valueParts = input.Split(',');
foreach (string valuePart in valueParts)
{
object partValue;
int enumFieldValue = 0;
try
{
if
(_enumValues.TryGetValue(valuePart.Trim(), out partValue))