<commit_before>/// <reference path="../Runtime/Nullstone.js" />
/// <reference path="Control.js"/>
/// <reference path="Grid.js"/>
/// CODE

//#region ContentControl
var ContentControl = Nullstone.Create("ContentControl", Control);

ContentControl._FallbackTemplate = (function () {
    // <ControlTemplate><Grid><TextBlock Text="{Binding}" /></Grid></ControlTemplate>
    return new ControlTemplate(ContentControl, {
        Type: Grid,
        Children: [
            {
                Type: TextBlock,
                Props: {
                    Text: new BindingMarkup()
                }
            }
        ]
    });
})();

//#region DEPENDENCY PROPERTIES

ContentControl.ContentProperty = DependencyProperty.Register("Content", function () { return Object; }, ContentControl);
ContentControl.Instance.GetContent = function () {
    return this.$GetValue(ContentControl.ContentProperty);
};
ContentControl.Instance.SetContent = function (value) {
    this.$SetValue(ContentControl.ContentProperty, value);
};

ContentControl.ContentTemplateProperty = DependencyProperty.Register("ContentTemplate", function () { return ControlTemplate; }, ContentControl);
ContentControl.Instance.GetContentTemplate = function () {
    return this.$GetValue(ContentControl.ContentTemplateProperty);
};
ContentControl.Instance.SetContentTemplate = function (value) {
    this.$SetValue(ContentControl.ContentTemplateProperty, value);
};

//#endregion

//#region PROPERTIES

ContentControl.Instance.GetFallbackRoot = function () {
    if (this._FallbackRoot == null)
        this._FallbackRoot = ContentControl._FallbackTemplate.GetVisualTree(this);
    return this._FallbackRoot;
};

//#endregion

//#region INSTANCE METHODS

ContentControl.Instance._GetDefaultTemplate = function () {
    return this.GetFallbackRoot();
};

//#endregion

//#region ANNOTATIONS

ContentControl.Annotations = {
    ContentProperty: ContentControl.ContentProperty
};

//#endregion

Nullstone.FinishCreate(ContentControl);
//#endregion<commit_msg>Added OnContentChanged and OnContentTemplateChanged virtual methods to ContentControl.<commit_after>/// <reference path="../Runtime/Nullstone.js" />
/// <reference path="Control.js"/>
/// <reference path="Grid.js"/>
/// CODE

//#region ContentControl
var ContentControl = Nullstone.Create("ContentControl", Control);

ContentControl._FallbackTemplate = (function () {
    // <ControlTemplate><Grid><TextBlock Text="{Binding}" /></Grid></ControlTemplate>
    return new ControlTemplate(ContentControl, {
        Type: Grid,
        Children: [
            {
                Type: TextBlock,
                Props: {
                    Text: new BindingMarkup()
                }
            }
        ]
    });
})();

//#region Dependency Properties

ContentControl._OnContentPropertyChanged = function (d, args) {
    d.OnContentChanged(args.OldValue, args.NewValue);
};
ContentControl.ContentProperty = DependencyProperty.RegisterCore("Content", function () { return Object; }, ContentControl, undefined, ContentControl._OnContentPropertyChanged);
ContentControl.Instance.GetContent = function () {
    return this.$GetValue(ContentControl.ContentProperty);
};
ContentControl.Instance.SetContent = function (value) {
    this.$SetValue(ContentControl.ContentProperty, value);
};

ContentControl._OnContentTemplatePropertyChanged = function (d, args) {
    d.OnContentTemplateChanged(args.OldValue, args.NewValue);
};
ContentControl.ContentTemplateProperty = DependencyProperty.RegisterCore("ContentTemplate", function () { return ControlTemplate; }, ContentControl, undefined, ContentControl._OnContentTemplatePropertyChanged);
ContentControl.Instance.GetContentTemplate = function () {
    return this.$GetValue(ContentControl.ContentTemplateProperty);
};
ContentControl.Instance.SetContentTemplate = function (value) {
    this.$SetValue(ContentControl.ContentTemplateProperty, value);
};

//#endregion

//#region Properties

ContentControl.Instance.GetFallbackRoot = function () {
    if (this._FallbackRoot == null)
        this._FallbackRoot = ContentControl._FallbackTemplate.GetVisualTree(this);
    return this._FallbackRoot;
};

//#endregion

//#region Instance Methods

ContentControl.Instance.OnContentChanged = function (oldContent, newContent) {
};
ContentControl.Instance.OnContentTemplateChanged = function (oldContentTemplate, newContentTemplate) {
};

ContentControl.Instance._GetDefaultTemplate = function () {
    return this.GetFallbackRoot();
};

//#endregion

//#region Annotations

ContentControl.Annotations = {
    ContentProperty: ContentControl.ContentProperty
};

//#endregion

Nullstone.FinishCreate(ContentControl);
//#endregion
{'fraction_non_alphanumeric': 0.12031476496168979, 'fraction_numerical': 0.0, 'mean_word_length': 3.639769452449568, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2563754', 'n_tokens_mistral': 1275, 'n_tokens_neox': 1232, 'n_words': 216}