How to use the tns-core-modules/ui/core/view.Property function in tns-core-modules

To help you get started, we’ve selected a few tns-core-modules examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LeCaoPhuc / nativescript-mpchart / src / chart / nativescript-mpchart.common.ts View on Github external
export type XAxisLabelPosition = "Top" | "Bottom" | "BothSided" | "TopInside" | "BottomInside";
export type TypeFormatter = "Int" | "Float"

// Property

export const itemsProperty = new Property>({
    name: "items"
});
itemsProperty.register(MPChartBase);

export const labelsProperty = new Property>({
    name: "labels"
});
labelsProperty.register(MPChartBase);

export const showLegendProperty = new Property({
    name: "showLegend",
    defaultValue: true,
    valueConverter: booleanConverter
});
showLegendProperty.register(MPChartBase);

export const showGridLinesProperty = new Property({
    name: "showGridLines",
    defaultValue: false,
    valueConverter: booleanConverter
});
showGridLinesProperty.register(MPChartBase);

export const scaleEnableProperty = new Property({
    name: "scaleEnable",
    defaultValue: false,
github LeCaoPhuc / nativescript-mpchart / src / chart / nativescript-mpchart.common.ts View on Github external
valueChanged: function (value) {
        console.log("value Change ", value);
    }
});
leftAxisFormatterProperty.register(MPChartBase);
export const rightAxisFormatterProperty = new Property({
    name: "rightAxisFormatter",
});
rightAxisFormatterProperty.register(MPChartBase);

export const fontProperty = new Property({
    name: "font",
});
fontProperty.register(MPChartBase);

export const showValueLabelsProperty = new Property({
    name: "showValueLabels",
    defaultValue: false,
    valueConverter: booleanConverter
});
showValueLabelsProperty.register(MPChartBase);

export const showLeftAxisProperty = new Property({
    name: "showLeftAxis",
    defaultValue: true,
    valueConverter: booleanConverter
});
showLeftAxisProperty.register(MPChartBase);

export const showRightAxisProperty = new Property({
    name: "showRightAxis",
    defaultValue: true,
github EddyVerbruggen / nativescript-numeric-keyboard / src / numeric-keyboard.common.ts View on Github external
}

  getText(): string {
    return this.text;
  }

  getMaxLength(): number {
    return this.maxLength;
  }

  getNativeTextField(): number {
    return this.nativeView;
  }
}

export const returnKeyTitleProperty = new Property({
  name: "returnKeyTitle",
  defaultValue: "Done"
});
returnKeyTitleProperty.register(NumericKeyboardViewBase);

export const localeProperty = new Property({name: "locale"});
localeProperty.register(NumericKeyboardViewBase);

export const noDecimalsProperty = new Property({
  name: "noDecimals",
  defaultValue: false,
  valueConverter: booleanConverter
});
noDecimalsProperty.register(NumericKeyboardViewBase);

export const noReturnKeyProperty = new Property({
github nstudio / nativescript-videoplayer / videoplayer-common.ts View on Github external
});
isLoadingProperty.register(Video);

export const observeCurrentTimeProperty = new Property({
  name: "observeCurrentTime",
  valueConverter: booleanConverter
});
observeCurrentTimeProperty.register(Video);

export const autoplayProperty = new Property({
  name: "autoplay",
  valueConverter: booleanConverter
});
autoplayProperty.register(Video);

export const controlsProperty = new Property({
  name: "controls",
  valueConverter: booleanConverter
});
controlsProperty.register(Video);

export const loopProperty = new Property({
  name: "loop",
  valueConverter: booleanConverter
});
loopProperty.register(Video);

export const mutedProperty = new Property({
  name: "muted",
  valueConverter: booleanConverter
});
mutedProperty.register(Video);
github nstudio / nativescript-videoplayer / src / videoplayer-common.ts View on Github external
});
observeCurrentTimeProperty.register(VideoCommon);

export const autoplayProperty = new Property({
  name: 'autoplay',
  valueConverter: booleanConverter
});
autoplayProperty.register(VideoCommon);

export const controlsProperty = new Property({
  name: 'controls',
  valueConverter: booleanConverter
});
controlsProperty.register(VideoCommon);

export const loopProperty = new Property({
  name: 'loop',
  valueConverter: booleanConverter
});
loopProperty.register(VideoCommon);

export const mutedProperty = new Property({
  name: 'muted',
  valueConverter: booleanConverter
});
mutedProperty.register(VideoCommon);

export const fillProperty = new Property({
  name: 'fill',
  valueConverter: booleanConverter
});
fillProperty.register(VideoCommon);
github HoangJK / nativescript-range-seek-bar / src / range-seek-bar.common.ts View on Github external
});
barHeightProperty.register(RangeSeekBarBase);

export const barHeightCssProperty = new CssProperty({
    name: "barHeight",
    cssName: "bar-height",
    valueConverter: (v) => {
        if (parseFloat(v) !== NaN) {
            return parseFloat(v);
        }
        throw new Error("Property 'barHeight' must be a number");
    }
});
barHeightCssProperty.register(Style);

export const barColorProperty = new Property({
    name: "barColor",
    valueConverter: (v) => new Color(v)
});
barColorProperty.register(RangeSeekBarBase);

export const barColorCssProperty = new CssProperty({
    name: "barColor",
    cssName: "bar-color",
    valueConverter: (v) => new Color(v)
});
barColorCssProperty.register(Style);

export const barHighlightColorProperty = new Property({
    name: "barHighlightColor",
    valueConverter: (v) => new Color(v)
});
github triniwiz / nativescript-videorecorder / src / advanced / advanced-video-view.common.ts View on Github external
export class AdvancedVideoViewBase extends View {
    cameraPosition: CameraPositionType;
    saveToGallery: boolean;
    quality: Quality;
    thumbnailCount: number;
    fill: boolean;

    public static isAvailable(): boolean {
        return false;
    }

    public static requestPermissions(explanation?: string): Promise {
        return Promise.resolve();
    }
}
export const fillProperty = new Property({
    name: 'fill',
    defaultValue: false
});
export const thumbnailCountProperty = new Property({
    name: 'thumbnailCount',
    defaultValue: 1
});
export const qualityProperty = new Property({
    name: 'quality',
    defaultValue: Quality.MAX_480P
});
export const cameraPositionProperty = new Property({
        name: 'cameraPosition',
        defaultValue: 'back'
    });
github LeCaoPhuc / nativescript-mpchart / src / chart / nativescript-mpchart.common.ts View on Github external
});
itemsProperty.register(MPChartBase);

export const labelsProperty = new Property>({
    name: "labels"
});
labelsProperty.register(MPChartBase);

export const showLegendProperty = new Property({
    name: "showLegend",
    defaultValue: true,
    valueConverter: booleanConverter
});
showLegendProperty.register(MPChartBase);

export const showGridLinesProperty = new Property({
    name: "showGridLines",
    defaultValue: false,
    valueConverter: booleanConverter
});
showGridLinesProperty.register(MPChartBase);

export const scaleEnableProperty = new Property({
    name: "scaleEnable",
    defaultValue: false,
    valueConverter: booleanConverter
});
scaleEnableProperty.register(MPChartBase);


export const descriptionTextProperty = new Property({
    name: "descriptionText",
github HoangJK / nativescript-range-seek-bar / src / range-seek-bar.common.ts View on Github external
});
minValueProperty.register(RangeSeekBarBase);

export const maxValueProperty = new Property({
    name: "maxValue",
    defaultValue: 0,
    valueConverter: (v) => {
        if (parseFloat(v) !== NaN) {
            return parseFloat(v);
        }
        throw new Error("Property 'maxValue' must be a number");
    }
});
maxValueProperty.register(RangeSeekBarBase);

export const minStartValueProperty = new Property({
    name: "minStartValue",
    defaultValue: 0,
    valueConverter: (v) => {
        if (parseFloat(v) !== NaN) {
            return parseFloat(v);
        }
        throw new Error("Property 'minStartValue' must be a number");
    }
});
minStartValueProperty.register(RangeSeekBarBase);

export const maxStartValueProperty = new Property({
    name: "maxStartValue",
    defaultValue: 0,
    valueConverter: (v) => {
        if (parseFloat(v) !== NaN) {
github vcooley / nativescript-input-mask / src / input-mask.common.ts View on Github external
export abstract class InputMaskBase extends TextField implements InputMaskDefinition {
  private _extractedValue: string;
  private _completed: boolean;
  mask: string;

  get extractedValue() {
    return this._extractedValue;
  }

  get completed() {
    return this._completed;
  }
}

export const completedProperty = new Property({
  name: 'completed',
  defaultValue: false,
  valueConverter: booleanConverter,
});
completedProperty.register(InputMaskBase);

export const extractedValueProperty = new Property({
  name: 'extractedValue',
  defaultValue: '',
});
extractedValueProperty.register(InputMaskBase);

export const maskProperty = new Property({
  name: 'mask',
  defaultValue: '',
});