public BindingEditor() { this.Content = new TableLayout { Padding = 5, Rows = { new TableRow { Cells = { new TableCell { ScaleWidth = true, Control = new Group { Text = "Tip Bindings", Content = new StackView { Items = { new Group { Text = "Tip Button", Orientation = Orientation.Horizontal, ExpandContent = false, Content = tipButton = new BindingDisplay { MinimumSize = new Size(300, 0) } }, new Group { Text = "Tip Pressure", Orientation = Orientation.Horizontal, Content = tipPressure = new FloatSlider() } } } } }, new TableCell { ScaleWidth = true, Control = new Group { Text = "Eraser Bindings", Content = new StackView { Items = { new Group { Text = "Eraser Button", ExpandContent = false, Orientation = Orientation.Horizontal, Content = eraserButton = new BindingDisplay { MinimumSize = new Size(300, 0) } }, new Group { Text = "Eraser Pressure", Orientation = Orientation.Horizontal, Content = eraserPressure = new FloatSlider() } } } } } } }, new TableRow { Cells = { new TableCell { ScaleWidth = true, Control = new Group { Text = "Pen Button Bindings", Content = new Scrollable { Border = BorderType.None, Content = penButtons = new BindingDisplayList { Prefix = "Pen Button" } } } }, new TableCell { ScaleWidth = true, Control = new Group { Text = "Auxiliary Button Bindings", Content = new Scrollable { Border = BorderType.None, Content = auxButtons = new BindingDisplayList { Prefix = "Auxiliary Button" } } } } } } } }; tipButton.StoreBinding.Bind(SettingsBinding.Child(c => c.TipButton)); eraserButton.StoreBinding.Bind(SettingsBinding.Child(c => c.EraserButton)); tipPressure.ValueBinding.Bind(SettingsBinding.Child(c => c.TipActivationPressure)); eraserPressure.ValueBinding.Bind(SettingsBinding.Child(c => c.EraserActivationPressure)); penButtons.ItemSourceBinding.Bind(SettingsBinding.Child(c => (IList <PluginSettingStore>)c.PenButtons)); auxButtons.ItemSourceBinding.Bind(SettingsBinding.Child(c => (IList <PluginSettingStore>)c.AuxButtons)); }
public BindingEditor() { this.Content = new TableLayout { Padding = 5, Rows = { new TableRow { Cells = { new TableCell { ScaleWidth = true, Control = new Group { Text = "Tip Bindings", Content = new StackView { Items = { new Group { Text = "Tip Button", Orientation = Orientation.Horizontal, ExpandContent = false, Content = tipButton = new BindingDisplay { MinimumSize = new Size(300, 0) } }, new Group { Text = "Tip Pressure", Orientation = Orientation.Horizontal, Content = tipPressure = new FloatSlider() } } } } }, new TableCell { ScaleWidth = true, Control = new Group { Text = "Eraser Bindings", Content = new StackView { Items = { new Group { Text = "Eraser Button", ExpandContent = false, Orientation = Orientation.Horizontal, Content = eraserButton = new BindingDisplay { MinimumSize = new Size(300, 0) } }, new Group { Text = "Eraser Pressure", Orientation = Orientation.Horizontal, Content = eraserPressure = new FloatSlider() } } } } } } }, new TableRow { Cells = { new TableCell { ScaleWidth = true, Control = new Group { Text = "Pen Button Bindings", Content = new Scrollable { Border = BorderType.None, Content = penButtons = new BindingDisplayList { Prefix = "Pen Button" } } } }, new TableCell { ScaleWidth = true, Control = new Group { Text = "Auxiliary Button Bindings", Content = new Scrollable { Border = BorderType.None, Content = auxButtons = new BindingDisplayList { Prefix = "Auxiliary Button" } } } } } } } }; }