mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
border props added to view
This commit is contained in:
@@ -187,6 +187,26 @@ export class View extends proxy.ProxyObject implements definition.View {
|
||||
}
|
||||
|
||||
// START Style property shortcuts
|
||||
get borderRadius(): number {
|
||||
return this.style.borderRadius;
|
||||
}
|
||||
set borderRadius(value: number) {
|
||||
this.style.borderRadius = value;
|
||||
}
|
||||
|
||||
get borderWidth(): number {
|
||||
return this.style.borderWidth;
|
||||
}
|
||||
set borderWidth(value: number) {
|
||||
this.style.borderWidth = value;
|
||||
}
|
||||
|
||||
get borderColor(): color.Color {
|
||||
return this.style.borderColor;
|
||||
}
|
||||
set borderColor(value: color.Color) {
|
||||
this.style.borderColor = value;
|
||||
}
|
||||
|
||||
get color(): color.Color {
|
||||
return this.style.color;
|
||||
|
||||
15
ui/core/view.d.ts
vendored
15
ui/core/view.d.ts
vendored
@@ -95,6 +95,21 @@ declare module "ui/core/view" {
|
||||
* A View occupies a rectangular area on the screen and is responsible for drawing and layouting of all UI components within.
|
||||
*/
|
||||
export class View extends proxy.ProxyObject {
|
||||
/**
|
||||
* Gets or sets the corner radius of the view.
|
||||
*/
|
||||
borderRadius: number;
|
||||
|
||||
/**
|
||||
* Gets or sets the border width of the view.
|
||||
*/
|
||||
borderWidth: number;
|
||||
|
||||
/**
|
||||
* Gets or sets the border color of the view.
|
||||
*/
|
||||
borderColor: color.Color;
|
||||
|
||||
/**
|
||||
* String value used when hooking to loaded event.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user