public ServerInfo(ServersResponse.Resource.ResourceItem server) { this.Server = server; this.Children.Add(new ProgressRing { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, Width = 50, Height = 50, IsActive = true }); this.Children.Add(this.Pivot); this.Loaded += (a, b) => this.Load(); }
public ServerBtn(ServersResponse.Resource.ResourceItem server) { this.ServerName = server.UserDescription?.Length > 0 ? server.UserDescription : server.Info; this.HorizontalAlignment = HorizontalAlignment.Stretch; this.HorizontalContentAlignment = HorizontalAlignment.Stretch; this.Margin = new Thickness(10, 5, 10, 5); this.Content = new ServerElement(server); this.BorderBrush = new Windows.UI.Xaml.Media.SolidColorBrush(Windows.UI.Colors.Gray); this.BorderThickness = new Thickness(1); this.CornerRadius = new CornerRadius(3); this.Background = new Windows.UI.Xaml.Media.SolidColorBrush(Windows.UI.Colors.Transparent); this.Click += (a, b) => { App.Main.Navigation.SelectedItem = null; App.Main.ContentFrame.Content = new ServerInfo(server); }; }
public ServerElement(ServersResponse.Resource.ResourceItem item) { this.Server = item; this.Load(); }