midora Posted June 1, 2013 Share Posted June 1, 2013 It would be nice if we could get some controls to structure the content. Like tabs, groupboxes, or just a void element whicht provides DisplayName and Description element only. I implemented something simular now in the OptionBasedLibrary und used it in development. Here is a code example which shows how simple this could be in the code (even easier as PropertyBased implementation because there is no context, which is used for translation and more): OptionControlList options = new OptionControlList { new OptionContainerTabControl(OptionNames.Tab, optContext) { new OptionContainerTabPage(OptionNames.Page1, optContext) { new OptionPathDrawingBoard(OptionNames.DrawingBoard, optContext) { SourceSize = EnvironmentParameters.SourceSurface.Size, }, }, new OptionContainerTabPage(OptionNames.Page2, optContext) { new OptionInt32Slider(OptionNames.LineWidth, optContext, 2, 1, 100) { Unit = "px", }, new OptionInt32ColorWheel(OptionNames.LineColor, optContext) { ColorSelect = ColorSelect.Any | ColorSelect.Primary | ColorSelect.Secondary, Primary = (int)EnvironmentParameters.PrimaryColor.Bgra, Secondary = (int)EnvironmentParameters.SecondaryColor.Bgra, }, new OptionEnumDropDown<LineStyleEnum>(OptionNames.LineStyle, optContext, LineStyleEnum.Solid), new OptionEnumDropDown<LineDashCapEnum>(OptionNames.LineDashCap, optContext, LineDashCapEnum.Round), new OptionEnumDropDown<LineCapEnum>(OptionNames.LineStartCap, optContext, LineCapEnum.Round), new OptionEnumDropDown<LineCapEnum>(OptionNames.LineEndCap, optContext, LineCapEnum.Round), new OptionEnumDropDown<LineJoinEnum>(OptionNames.LineJoin, optContext, LineJoinEnum.Round), }, }, new OptionEnumCheckBoxes<ShowEnum>(OptionNames.ShowWhileEditing, optContext, new bool[] { true, true}), }; which produces the following dialog: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.