本文整理汇总了C#中AbsoluteLayout类的典型用法代码示例。如果您正苦于以下问题:C# AbsoluteLayout类的具体用法?C# AbsoluteLayout怎么用?C# AbsoluteLayout使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AbsoluteLayout类属于命名空间,在下文中一共展示了AbsoluteLayout类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: InitializeComponent
private void InitializeComponent() {
this.LoadFromXaml(typeof(StandingsView));
NameGrid = this.FindByName<Grid>("NameGrid");
MessagesLayoutFrame = this.FindByName<AbsoluteLayout>("MessagesLayoutFrame");
MessagesLayoutFrameInner = this.FindByName<ContentView>("MessagesLayoutFrameInner");
MessagesListView = this.FindByName<ListView>("MessagesListView");
}
开发者ID:JavierErdozain,项目名称:Events,代码行数:7,代码来源:StandingsView.xaml.g.cs
示例2: ClockPage
public ClockPage()
{
AbsoluteLayout absoluteLayout = new AbsoluteLayout();
for (int i = 0; i < tickMarks.Length; i++)
{
tickMarks[i] = new BoxView
{
Color = Color.Accent
};
absoluteLayout.Children.Add(tickMarks[i]);
}
absoluteLayout.Children.Add(hourHand =
new BoxView
{
Color = Color.Accent
});
absoluteLayout.Children.Add(minuteHand =
new BoxView
{
Color = Color.Accent
});
absoluteLayout.Children.Add(secondHand =
new BoxView
{
Color = Color.Red
});
Content = absoluteLayout;
Device.StartTimer(TimeSpan.FromMilliseconds(16), OnTimerTick);
SizeChanged += OnPageSizeChanged;
}
开发者ID:dimgrek,项目名称:AnalogClockXamarin,代码行数:34,代码来源:ClockPage.cs
示例3: CircularTextPage
public CircularTextPage()
{
// Create the AbsoluteLayout.
absoluteLayout = new AbsoluteLayout();
absoluteLayout.SizeChanged += (sender, args) =>
{
LayOutLabels();
};
Content = absoluteLayout;
// Create the Labels.
string text = "Xamarin.Forms makes me want to code more with ";
labels = new Label[text.Length];
double fontSize = 1.5 * Device.GetNamedSize(NamedSize.Large, typeof(Label));
int countSized = 0;
for (int index = 0; index < text.Length; index++)
{
char ch = text[index];
Label label = new Label
{
Text = ch == ' ' ? "\u00A0" : ch.ToString(),
FontSize = fontSize,
};
label.SizeChanged += (sender, args) =>
{
if (++countSized >= labels.Length)
LayOutLabels();
};
labels[index] = label;
absoluteLayout.Children.Add(label);
}
}
开发者ID:jenart,项目名称:xamarin-forms-book-preview-2,代码行数:35,代码来源:CircularTextPage.cs
示例4: InitializeCell
protected override void InitializeCell ()
{
var width = CellWidth;
var height = CellHeight;
_titleLabel = new Label ();
AbsoluteLayout simpleLayout = new AbsoluteLayout {
VerticalOptions = LayoutOptions.FillAndExpand,
WidthRequest = CellWidth,
HeightRequest = CellHeight,
};
_image = new FastImage () {
Aspect = Aspect.AspectFill,
BackgroundColor = Color.Black,
};
_titleLabel = new Label {
Text = "",
TextColor = Color.White,
FontSize = 14,
XAlign = TextAlignment.Center,
YAlign = TextAlignment.Center,
LineBreakMode = LineBreakMode.TailTruncation,
BackgroundColor = Color.FromHex ("#272727"),
};
simpleLayout.Children.Add (_image, new Rectangle (0, 0, width, height - 30));
simpleLayout.Children.Add (_titleLabel, new Rectangle (0, height - 30, width, 30));
View = simpleLayout;
}
开发者ID:DevinvN,项目名称:TwinTechsFormsLib,代码行数:32,代码来源:InnerGridViewThumbnailCell.cs
示例5: OptionsContentCell
public OptionsContentCell()
{
var labelName = new Label
{
Text = "Texto principal",
TextColor = Color.Black,
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
VerticalOptions = LayoutOptions.CenterAndExpand,
HorizontalOptions = LayoutOptions.StartAndExpand,
FontFamily = Device.OnPlatform("GillSans", "Quattrocento Sans", "Comic Sans MS")
};
labelName.SetBinding(Label.TextProperty, "Text");
StackLayout stack = new StackLayout
{
Orientation = StackOrientation.Horizontal,
VerticalOptions = LayoutOptions.FillAndExpand,
HorizontalOptions = LayoutOptions.FillAndExpand,
Padding = new Thickness(5, 0, 0, 0),
Children = { labelName }
};
var absoluteLayout = new AbsoluteLayout();
var background = new Image
{
Style = Styles.CellBackground
};
absoluteLayout.Children.Add(background, new Rectangle(0, 0, 1, 1), AbsoluteLayoutFlags.All);
absoluteLayout.Children.Add(stack, new Rectangle(0, 0, 1, 1), AbsoluteLayoutFlags.All);
View = absoluteLayout;
}
开发者ID:RobertoOFonseca,项目名称:MySafety,代码行数:33,代码来源:OptionsContentCell.cs
示例6: AbsoluteLayoutExample
public AbsoluteLayoutExample()
{
Label red = new Label
{
Text = "Stop",
BackgroundColor = Color.Red,
FontSize = 20,
WidthRequest = 200,
HeightRequest = 30
};
Label yellow = new Label
{
Text = "Slow down",
BackgroundColor = Color.Yellow,
FontSize = 20,
WidthRequest = 160,
HeightRequest = 160
};
Label green = new Label
{
Text = "Go",
BackgroundColor = Color.Green,
FontSize = 20,
WidthRequest = 50,
HeightRequest = 50
};
AbsoluteLayout absLayout = new AbsoluteLayout();
absLayout.Children.Add(red, new Point(20, 20));
absLayout.Children.Add(yellow, new Point(40, 60));
absLayout.Children.Add(green, new Point(80, 180));
Content = absLayout;
}
开发者ID:RickySan65,项目名称:xamarin-forms-samples,代码行数:33,代码来源:AbsoluteLayoutExample.cs
示例7: AbsoluteLayoutPageCode
public AbsoluteLayoutPageCode ()
{
Title = "AbsoluteLayout - C#";
BackgroundImage = "deer.jpg";
var outerLayout = new AbsoluteLayout ();
var scroll = new ScrollView ();
outerLayout.Children.Add (scroll, new Rectangle (0, 0, 1, 1), AbsoluteLayoutFlags.All);
outerLayout.Children.Add (new Button {
Text = "Previous",
BackgroundColor = Color.White,
TextColor = Color.Green,
BorderRadius = 0
}, new Rectangle (0, 1, .5, 60), AbsoluteLayoutFlags.PositionProportional | AbsoluteLayoutFlags.WidthProportional);
outerLayout.Children.Add (new Button {
Text = "Next",
BackgroundColor = Color.White,
TextColor = Color.Green,
BorderRadius = 0
}, new Rectangle (1, 1, .5, 60), AbsoluteLayoutFlags.PositionProportional | AbsoluteLayoutFlags.WidthProportional);
var innerLayout = new AbsoluteLayout ();
scroll.Content = innerLayout;
innerLayout.Children.Add (new Image { Source = "deer.jpg" }, new Rectangle (.5, 0, 300, 300), AbsoluteLayoutFlags.PositionProportional);
innerLayout.Children.Add (new BoxView { Color = Color.FromHex ("#CC1A7019") }, new Rectangle (.5, 300, .7, 50), AbsoluteLayoutFlags.XProportional | AbsoluteLayoutFlags.WidthProportional);
innerLayout.Children.Add (new Label { Text = "deer.jpg", XAlign = TextAlignment.Center, TextColor = Color.White }, new Rectangle (.5, 310, 1, 50), AbsoluteLayoutFlags.XProportional | AbsoluteLayoutFlags.WidthProportional);
Content = outerLayout;
}
开发者ID:zhenningshao,项目名称:xamarin-forms-samples,代码行数:26,代码来源:AbsoluteLayoutPageCode.cs
示例8: GerenciarFeriadosView
public GerenciarFeriadosView(GerenciarFeriadosViewModel viewModel)
{
Title = "Feriados";
BindingContext = viewModel;
this.SetBinding(ContentPage.NavigationProperty, "Navigation", BindingMode.TwoWay);
// message.SetBinding(Label.IsVisibleProperty, "messageVisibility", BindingMode.TwoWay);
listViewHolidays.SetBinding(ListView.ItemsSourceProperty, "holidays", BindingMode.TwoWay);
listViewHolidays.ItemTemplate = new DataTemplate(typeof(TwoColumnsGridCell));
listViewHolidays.ItemTapped += listViewHolidays_ItemTapped;
FloatButton.AnimateWithAction();
FloatButton.Command = new Command(toolbarAddHoliday);
/*ToolbarItems.Add(new ToolbarItem
{
Icon = Images.Add2,
Order = ToolbarItemOrder.Primary,
Command = new Command(toolbarAddHoliday)
});*/
iconStack = new StackLayout
{
VerticalOptions = LayoutOptions.CenterAndExpand,
HorizontalOptions = LayoutOptions.CenterAndExpand,
Children = { iconMsg, message }
};
stack = new StackLayout
{
Padding = new Thickness(0, 15, 0, 0),
VerticalOptions = LayoutOptions.FillAndExpand,
HorizontalOptions = LayoutOptions.FillAndExpand,
BackgroundColor = Color.FromHex("#ECEFF1"),
Children = { listViewHolidays }
};
var absoluteLayout = new AbsoluteLayout
{
VerticalOptions = LayoutOptions.FillAndExpand,
};
//var background = new Image { Source = Images.Background, Aspect = Aspect.Fill };
//absoluteLayout.Children.Add (background, new Rectangle (0, 0, 1, 1), AbsoluteLayoutFlags.All);
//AbsoluteLayout.SetLayoutFlags(background, AbsoluteLayoutFlags.All);
//AbsoluteLayout.SetLayoutBounds(background, new Rectangle(0, 0, 1, 1));
//absoluteLayout.Children.Add (stack, new Rectangle (0, 0, 1, 1), AbsoluteLayoutFlags.All);
AbsoluteLayout.SetLayoutFlags(stack, AbsoluteLayoutFlags.All);
AbsoluteLayout.SetLayoutBounds(stack, new Rectangle(0, 0, 1, 1));
//absoluteLayout.Children.Add (Add, new Rectangle (0.85, 0.85, 0.185, 0.1), AbsoluteLayoutFlags.All);
AbsoluteLayout.SetLayoutFlags(FloatButton, AbsoluteLayoutFlags.PositionProportional);
AbsoluteLayout.SetLayoutBounds(FloatButton, new Rectangle(0.99f, 0.98f, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize));
//absoluteLayout.Children.Add(background);
absoluteLayout.Children.Add(stack);
absoluteLayout.Children.Add(FloatButton);
Content = absoluteLayout;
}
开发者ID:RobertoOFonseca,项目名称:MySafety,代码行数:60,代码来源:GerenciarFeriadosView.cs
示例9: RotateAnimationWithAnchorsPageCS
public RotateAnimationWithAnchorsPageCS ()
{
Title = "Rotate Animation with Anchors";
image = new Image { Source = ImageSource.FromFile ("monkey.png"), VerticalOptions = LayoutOptions.EndAndExpand };
startButton = new Button { Text = "Start Animation", VerticalOptions = LayoutOptions.End };
cancelButton = new Button { Text = "Cancel Animation", IsEnabled = false };
image.SizeChanged += OnImageSizeChanged;
startButton.Clicked += OnStartAnimationButtonClicked;
cancelButton.Clicked += OnCancelAnimationButtonClicked;
absoluteLayout = new AbsoluteLayout ();
absoluteLayout.Children.Add (image);
var stackLayout = new StackLayout {
Children = {
startButton,
cancelButton
}
};
var grid = new Grid {
RowDefinitions = {
new RowDefinition { Height = new GridLength (0.8, GridUnitType.Star) },
new RowDefinition { Height = new GridLength (0.2, GridUnitType.Star) }
},
Children = {
absoluteLayout,
}
};
grid.Children.Add (stackLayout, 0, 1);
Content = grid;
}
开发者ID:RickySan65,项目名称:xamarin-forms-samples,代码行数:35,代码来源:RotateAnimationWithAnchorsPageCS.cs
示例10: MyAbsoluteLayout
public MyAbsoluteLayout ()
{
var red = new Label {
Text = "Stop",
BackgroundColor = Color.Red,
Font = Font.SystemFontOfSize (20),
WidthRequest = 200, HeightRequest = 30
};
var yellow = new Label {
Text = "Slow down",
BackgroundColor = Color.Yellow,
Font = Font.SystemFontOfSize (20),
WidthRequest = 160, HeightRequest = 160
};
var green = new Label {
Text = "Go",
BackgroundColor = Color.Green,
Font = Font.SystemFontOfSize (20),
WidthRequest = 50, HeightRequest = 50
};
var absLayout = new AbsoluteLayout ();
absLayout.Children.Add (red, new Point (20, 20));
absLayout.Children.Add (yellow, new Point (40, 60));
absLayout.Children.Add (green, new Point (80, 180));
Content = absLayout;
}
开发者ID:BobSchlitten,项目名称:xamarin-forms-samples,代码行数:28,代码来源:MyAbsoluteLayout.cs
示例11: AboutPage
public AboutPage()
{
Title = "Informacoes";
// GetValue ();
var stack = new StackLayout {
VerticalOptions = LayoutOptions.FillAndExpand,
Children = {
lbInformation
}
};
var scroll = new ScrollView {
BackgroundColor = Colors.BackgroundDefault,
Content = stack
};
var absoluteLayout = new AbsoluteLayout ();
var background = new Image {
Style = Styles.BackgroundImage
};
absoluteLayout.Children.Add (background, new Rectangle (0, 0, 1, 1), AbsoluteLayoutFlags.All);
absoluteLayout.Children.Add (scroll, new Rectangle (0, 0, 1, 1), AbsoluteLayoutFlags.All);
Content = absoluteLayout;
}
开发者ID:RobertoOFonseca,项目名称:MySafety,代码行数:28,代码来源:AboutPage.cs
示例12: AbsoluteLayoutExplorationCode
public AbsoluteLayoutExplorationCode ()
{
Title = "Absolute Layout Exploration - C#";
var layout = new AbsoluteLayout();
var centerLabel = new Label {Text = "I'm centered on iPhone 4 but no other device.", LineBreakMode = LineBreakMode.WordWrap, FontSize = 20};
AbsoluteLayout.SetLayoutBounds (centerLabel, new Rectangle (115, 159, 100, 100));
// it is not necessary to set layout flags because absolute positioning is the default
var bottomLabel = new Label { Text = "I'm bottom center on every device.", LineBreakMode = LineBreakMode.WordWrap };
AbsoluteLayout.SetLayoutBounds (bottomLabel, new Rectangle (.5, 1, .5, .1));
AbsoluteLayout.SetLayoutFlags (bottomLabel, AbsoluteLayoutFlags.All);
var rightBox = new BoxView{ Color = Color.Olive };
AbsoluteLayout.SetLayoutBounds (rightBox, new Rectangle (1, .5, 25, 100));
AbsoluteLayout.SetLayoutFlags (rightBox, AbsoluteLayoutFlags.PositionProportional);
var leftBox = new BoxView{ Color = Color.Red };
AbsoluteLayout.SetLayoutBounds (leftBox, new Rectangle (0, .5, 25, 100));
AbsoluteLayout.SetLayoutFlags (leftBox, AbsoluteLayoutFlags.PositionProportional);
var topBox = new BoxView{ Color = Color.Blue };
AbsoluteLayout.SetLayoutBounds (topBox, new Rectangle (.5, 0, 100, 25));
AbsoluteLayout.SetLayoutFlags (topBox, AbsoluteLayoutFlags.PositionProportional);
layout.Children.Add (bottomLabel);
layout.Children.Add (centerLabel);
layout.Children.Add (rightBox);
layout.Children.Add (leftBox);
layout.Children.Add (topBox);
Content = layout;
}
开发者ID:ChandrakanthBCK,项目名称:xamarin-forms-samples,代码行数:34,代码来源:AbsoluteLayoutExplorationCode.cs
示例13: Init
protected override void Init ()
{
AbsoluteLayout layout = new AbsoluteLayout {
HorizontalOptions = LayoutOptions.FillAndExpand,
VerticalOptions = LayoutOptions.FillAndExpand,
};
BackgroundColor = Color.FromUint (0xFFDBDBDB);
_btnLogin = new Button {
HorizontalOptions = LayoutOptions.FillAndExpand,
Text = "Press me",
BackgroundColor = Color.FromUint (0xFF6E932D),
TextColor = Color.White,
};
_btnLogin.Clicked += BtnLogin_Clicked;
layout.Children.Add (_btnLogin, new Rectangle (0.5f, 0.5f, 0.25f, 0.25f), AbsoluteLayoutFlags.All);
_busyBackground = new BoxView {
BackgroundColor = new Color (0, 0, 0, 0.5f),
IsVisible = false,
InputTransparent = false
};
layout.Children.Add (_busyBackground, new Rectangle (0, 0, 1, 1), AbsoluteLayoutFlags.SizeProportional);
Content = layout;
}
开发者ID:Costo,项目名称:Xamarin.Forms,代码行数:28,代码来源:Bugzilla39331.cs
示例14: FlowListViewInternalCell
/// <summary>
/// Initializes a new instance of the <see cref="DLToolkit.Forms.Controls.FlowListViewInternalCell"/> class.
/// </summary>
/// <param name="flowListViewRef">Flow list view reference.</param>
public FlowListViewInternalCell(WeakReference<FlowListView> flowListViewRef)
{
_flowListViewRef = flowListViewRef;
FlowListView flowListView = null;
flowListViewRef.TryGetTarget(out flowListView);
_useGridAsMainRoot = !flowListView.FlowUseAbsoluteLayoutInternally;
if (!_useGridAsMainRoot)
{
_rootLayout = new AbsoluteLayout()
{
Padding = 0d,
BackgroundColor = flowListView.FlowRowBackgroundColor,
};
View = _rootLayout;
}
else
{
_rootLayoutAuto = new Grid()
{
RowSpacing = 0d,
ColumnSpacing = 0d,
Padding = 0d,
BackgroundColor = flowListView.FlowRowBackgroundColor,
};
View = _rootLayoutAuto;
}
_flowColumnTemplate = flowListView.FlowColumnTemplate;
_desiredColumnCount = flowListView.DesiredColumnCount;
_flowColumnExpand = flowListView.FlowColumnExpand;
}
开发者ID:daniel-luberda,项目名称:DLToolkit.Forms.Controls,代码行数:36,代码来源:FlowListViewInternalCell.cs
示例15: StackLayoutAbsolute
public StackLayoutAbsolute ()
{
AbsoluteLayout absoluteLayout = new AbsoluteLayout
{
VerticalOptions = LayoutOptions.FillAndExpand
};
Label firstlabel = new Label
{
Text = "FirstLabel"
};
Label secondlabel = new Label
{
Text = "SecondLabel"
};
absoluteLayout.Children.Add (secondlabel);
AbsoluteLayout.SetLayoutFlags (secondlabel,
AbsoluteLayoutFlags.PositionProportional);
AbsoluteLayout.SetLayoutBounds (secondlabel,
new Rectangle (0, 1, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize));
absoluteLayout.Children.Add (firstlabel);
AbsoluteLayout.SetLayoutFlags (firstlabel,
AbsoluteLayoutFlags.PositionProportional);
AbsoluteLayout.SetLayoutBounds (firstlabel,
new Rectangle (0,0, AbsoluteLayout.AutoSize,AbsoluteLayout.AutoSize));
this.Content = absoluteLayout;
}
开发者ID:kimlaunchlabs,项目名称:xamarintesting,代码行数:35,代码来源:StackLayoutAbsolute.cs
示例16: RightPage
public RightPage ()
{
Title = "Right";
tray = new Tray (TrayOrientation.Right, 0.5) {
VerticalOptions = LayoutOptions.End,
};
tray.Content = new ContentView {
HorizontalOptions = LayoutOptions.FillAndExpand,
VerticalOptions = LayoutOptions.FillAndExpand,
BackgroundColor = Color.Red
};
Button switchTray = new Button {
Text = "Open/Close Tray",
WidthRequest = 0.5 * App.ScreenWidth
};
switchTray.Clicked += ToggleTray;
AbsoluteLayout layout = new AbsoluteLayout () {
HeightRequest = App.ScreenHeight,
WidthRequest = App.ScreenWidth,
BackgroundColor = Color.Yellow
};
layout.Children.Add (switchTray, new Rectangle (App.ScreenWidth * 0.25, 100, switchTray.WidthRequest, 50));
layout.Children.Add (tray, new Rectangle (App.ScreenWidth, 0, tray.WidthRequest, App.ScreenHeight));
Content = layout;
}
开发者ID:biyyalakamal,项目名称:customer-success-samples,代码行数:31,代码来源:RightPage.cs
示例17: EditGateUser
public EditGateUser(GerenciarPortoesViewModel viewModel, GateDevices gateKey)
{
_viewModel = viewModel;
Grid grid = new Grid();
this.gateKey = gateKey;
string name = gateKey.SKeyName;
if (name.Length <= 4)
name = gateKey.SkeyBleId;
Title = "Editar " + name;
removerUserGate.AnimateWithAction();
removerUserGate.Clicked += removerUserGate_Clicked;
grid.Children.AddVertical(listProfileDisponiveis);
grid.Children.Add(removerUserGate);
listProfileDisponiveis.ItemTapped += listProfileDisponiveis_ItemTapped;
var absoluteLayout = new AbsoluteLayout();
var background = new Image
{
Style = Styles.BackgroundImage
};
absoluteLayout.Children.Add(background, new Rectangle(0, 0, 1, 1), AbsoluteLayoutFlags.All);
absoluteLayout.Children.Add(grid, new Rectangle(0, 0, 1, 1), AbsoluteLayoutFlags.All);
Content = absoluteLayout;
}
开发者ID:RobertoOFonseca,项目名称:MySafety,代码行数:31,代码来源:EditGateUser.cs
示例18: ChessboardFixed
public ChessboardFixed()
{
const double squareSize = 35;
AbsoluteLayout absoluteLayout = new AbsoluteLayout
{
BackgroundColor = Color.FromRgb(240, 220, 130),
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.Center
};
for (int row = 0; row < 8; row++)
{
for (int col = 0; col < 8; col++)
{
//Skip every other square.
if (((row ^ col) & 1) == 0)
continue;
BoxView boxView = new BoxView
{
Color = Color.FromRgb(0, 64, 0)
};
Rectangle rect = new Rectangle(col * squareSize,
row * squareSize,
squareSize, squareSize);
absoluteLayout.Children.Add(boxView, rect);
}
}
this.Content = absoluteLayout;
}
开发者ID:tambama,项目名称:XamarinPreviewBook,代码行数:34,代码来源:ChessboardFixed.cs
示例19: LeadListHeaderView
public LeadListHeaderView(Command newLeadTappedCommand)
{
_NewLeadTappedCommand = newLeadTappedCommand;
#region title label
Label headerTitleLabel = new Label()
{
Text = TextResources.Leads_LeadListHeaderTitle.ToUpperInvariant(),
TextColor = Palette._003,
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
FontAttributes = FontAttributes.Bold,
HorizontalTextAlignment = TextAlignment.Start,
VerticalTextAlignment = TextAlignment.Center
};
#endregion
#region new lead image "button"
var newLeadImage = new Image
{
Source = new FileImageSource { File = Device.OnPlatform("add_ios_gray", "add_android_gray", null) },
Aspect = Aspect.AspectFit,
HorizontalOptions = LayoutOptions.EndAndExpand,
};
//Going to use FAB
newLeadImage.IsVisible = false;
newLeadImage.GestureRecognizers.Add(new TapGestureRecognizer()
{
Command = _NewLeadTappedCommand,
NumberOfTapsRequired = 1
});
#endregion
#region absolutLayout
AbsoluteLayout absolutLayout = new AbsoluteLayout();
absolutLayout.Children.Add(
headerTitleLabel,
new Rectangle(0, .5, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize),
AbsoluteLayoutFlags.PositionProportional);
absolutLayout.Children.Add(
newLeadImage,
new Rectangle(1, .5, AbsoluteLayout.AutoSize, .5),
AbsoluteLayoutFlags.PositionProportional | AbsoluteLayoutFlags.HeightProportional);
#endregion
#region setup contentView
ContentView contentView = new ContentView()
{
Padding = new Thickness(10, 0), // give the content some padding on the left and right
HeightRequest = RowSizes.MediumRowHeightDouble, // set the height of the content view
};
#endregion
#region compose the view hierarchy
contentView.Content = absolutLayout;
#endregion
Content = contentView;
}
开发者ID:XnainA,项目名称:app-crm,代码行数:60,代码来源:LeadListHeaderView.cs
示例20: InitializeComponent
private void InitializeComponent()
{
this.LoadFromXaml(typeof(MatrixControlPrototype));
cnvTitle = this.FindByName<ContentView>("cnvTitle");
lblTitle = this.FindByName<Label>("lblTitle");
rootCanvas = this.FindByName<AbsoluteLayout>("rootCanvas");
}
开发者ID:LordOfSmiles,项目名称:MatrixBuilderTest,代码行数:7,代码来源:MatrixBuilderTest.Controls.Prototypes.MatrixControlPrototype.xaml.g.cs
注:本文中的AbsoluteLayout类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论