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
/// <summary> | |
/// Sets the anchor point and translates the view so that it stays in its current position. | |
/// Normally, changing the anchor point also adjusts the view's position. | |
/// </summary> | |
/// <param name='oView'>the view whose anchor point has to be modified</param> | |
/// <param name='oNewAnchorPoint'>the new anchor point</param> | |
public void SetAnchorPointAndTranslate(PointF oNewAnchorPoint ) | |
{ | |
UIView oView = this; | |
PointF oNewPoint = new PointF(oView.Bounds.Width * oNewAnchorPoint.X, oView.Bounds.Height * oNewAnchorPoint.Y); |
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
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Diagnostics; | |
using System.Runtime.CompilerServices; | |
namespace Xplat_Core | |
{ | |
public class PropertyChangedBase : INotifyPropertyChanged | |
{ | |
private Dictionary<string, object> properties = new Dictionary<string, object> (); |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using MonoTouch.Foundation; | |
using MonoTouch.UIKit; | |
using System.Drawing; | |
using Praeclarum.UI; | |
namespace LayoutTest | |
{ |
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
namespace GalaSoft.MvvmLight.Helpers | |
{ | |
/// <summary> | |
/// A <see cref="BaseAdapter{T}"/> that can be used with an Android ListView. After setting | |
/// the <see cref="DataSource"/> and the <see cref="GetTemplate"/> properties, the adapter is | |
/// suitable for a list control. If the DataSource is an <see cref="INotifyCollectionChanged"/>, | |
/// changes to the collection will be observed and the UI will automatically be updated. | |
/// </summary> | |
/// <typeparam name="T">The type of the items contained in the <see cref="DataSource"/>.</typeparam> | |
////[ClassInfo(typeof(ObservableAdapter<T>), |
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
/// <summary> | |
/// Grouped observable collection. | |
/// KEY_TYPE = the type used for the group key | |
/// ITEM_TYPE = the type used for the items of the list. | |
/// </summary> | |
public class GroupedObservableCollection<KEY_TYPE, ITEM_TYPE> : ObservableCollection<ITEM_TYPE> | |
{ | |
/// <summary> | |
/// Gets the grouping key. | |
/// </summary> |
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
using System.Collections.Generic; | |
using System; | |
using System.Collections.Specialized; | |
using Foundation; | |
using UIKit; | |
namespace LongRunningTasks | |
{ | |
/// <summary> |
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
public static class CocosExtensions | |
{ | |
/// <summary> | |
/// Runs an action so that it can be awaited. | |
/// </summary> | |
/// <param name="node">Node.</param> | |
/// <param name="actions">Actions.</param> | |
public static Task<bool> RunActionsAsync(this CCNode node, params CCFiniteTimeAction[] actions) | |
{ | |
var tcs = new TaskCompletionSource<bool> (); |
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
using System; | |
using UIKit; | |
namespace MemoryTest | |
{ | |
public class CustomView : UIView | |
{ | |
public int magicNumber; | |
} |
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
using CoreGraphics; | |
using Foundation; | |
using System; | |
using System.Runtime.CompilerServices; | |
using UIKit; | |
namespace MemoryTest | |
{ | |
[Register("ViewController")] | |
public class ViewController : UIViewController | |
{ |
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
public class Application | |
{ | |
// This is the main entry point of the application. | |
static void Main(string[] args) | |
{ | |
UIApplication.Main(args, typeof(CustomApplication), typeof(AppDelegate)); | |
} | |
} | |
// Inherits from UIApplication |
OlderNewer