private ButtonLayout Make_NextButton(int index) { Button button = new Button(); this.nextButtonIndices[button] = index; button.Clicked += NextArrow_Clicked; ButtonLayout buttonLayout = new ButtonLayout(button, downArrow); return(buttonLayout); }
private ButtonLayout Make_PrevButton(int index) { Button button = new Button(); this.prevButtonIndices[button] = index; button.Clicked += PrevArrow_Clicked; this.prevButtonIndices[button] = index; ButtonLayout buttonLayout = new ButtonLayout(button, upArrow); return(buttonLayout); }
private Button MakeButton(string name, ValueProvider <StackEntry> target) { Button button = new Button(); this.buttonsByName[name] = button; button.Clicked += button_Click; ButtonLayout buttonLayout = new ButtonLayout(button, name); this.buttonLayouts_by_button[button] = buttonLayout; this.buttonDestinations[buttonLayout] = target; return(button); }
private void initialize(string message, LayoutChoice_Set detailLayout, LayoutStack layoutStack, double fontSize) { this.message = message; Button button = new Button(); ButtonLayout buttonLayout = new ButtonLayout(button, message, fontSize); this.detailLayout = detailLayout; this.layoutStack = layoutStack; button.Clicked += Button_Clicked; this.LayoutToManage = buttonLayout; }
public PopoutTextbox(string title, LayoutStack layoutStack) { this.title = title; this.layoutStack = layoutStack; Button button = new Button(); button.Clicked += Button_Clicked; this.button = button; ButtonLayout buttonLayout = ButtonLayout.WithoutBevel(button); this.textBox = new Editor(); this.detailsLayout = new TitledControl(title, ScrollLayout.New(new TextboxLayout(this.textBox))); this.SubLayout = new TitledControl(title, buttonLayout); }
private LayoutChoice_Set build() { GridLayout_Builder mainBuilder = new Vertical_GridLayout_Builder().Uniform(); this.buttons = new List <Button>(); this.subtitles = new List <TextblockLayout>(); this.buttonDestinations = new Dictionary <Button, ValueProvider <StackEntry> >(); for (int i = 0; i < this.buttonNameProviders.Count; i++) { Button button = new Button(); button.Clicked += Button_Clicked; this.buttons.Add(button); ButtonLayout buttonLayout = new ButtonLayout(button); TextblockLayout subtitleLayout = new TextblockLayout(); subtitleLayout.AlignHorizontally(TextAlignment.Center); subtitleLayout.AlignVertically(TextAlignment.Center); subtitleLayout.ScoreIfEmpty = false; this.subtitles.Add(subtitleLayout); BoundProperty_List columnWidths = new BoundProperty_List(2); columnWidths.SetPropertyScale(0, 2); columnWidths.SetPropertyScale(1, 1); columnWidths.BindIndices(0, 1); GridLayout entryGrid = GridLayout.New(new BoundProperty_List(1), columnWidths, LayoutScore.Get_UnCentered_LayoutScore(1)); entryGrid.AddLayout(buttonLayout); entryGrid.AddLayout(subtitleLayout); LayoutUnion content = new LayoutUnion(entryGrid, buttonLayout); mainBuilder.AddLayout(content); ValueProvider <StackEntry> destinationProvider = destinationProviders[i]; this.buttonDestinations[button] = destinationProvider; } return(LayoutCache.For(mainBuilder.BuildAnyLayout())); }
public static LayoutChoice_Set HideIfEmpty(ButtonLayout buttonLayout) { return(new LayoutUnion(buttonLayout, new ContainerLayout())); }