Created
May 13, 2016 14:47
-
-
Save galvesribeiro/90be9fb9f81d2d5b307d7009848cadae to your computer and use it in GitHub Desktop.
Dock problem
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 SplashView : BaseWindow | |
{ | |
public override void Show(Shell target) | |
{ | |
var bg = new ImageControl(); | |
bg.Texture = "Media/splash.png"; | |
//bg.Size = target.Size; | |
bg.Dock = DockStyle.Fill; | |
Controls.Add(bg); | |
base.Show(target); | |
} | |
} | |
public class BaseWindow : Window | |
{ | |
public override void Show(Shell target) | |
{ | |
var label = new Label(); | |
label.Size = new Point(240, 20); | |
label.Position = new Point(0, 100); | |
//label.Dock = DockStyle.Center; | |
label.Style = "footer"; | |
label.Text = $"v1.0.1 Powered by Pay Insights - TI Pagos"; | |
Controls.Add(label); | |
base.Show(target); | |
} | |
} | |
//aka the Desktop class just renamed | |
public class AppShell : Shell | |
{ | |
} | |
private static Skin GetSkin() | |
{ | |
var skin = new Skin(); | |
var footStyle = new ControlStyle(); | |
footStyle.TextColor = ColorInt.RGB(255, 0, 0); | |
footStyle.Font = "20|LaoUI.ttf"; | |
footStyle.TextAlign = Alignment.MiddleCenter; | |
skin.Add("footer", footStyle); | |
return skin; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't see the BaseWindow/Window getting a proper size assigned anywhere :)
Make sure you give your window a good size - then docking should work.