]> O.S.I.I.S - jp/crow.git/commitdiff
update template and tests with new sizing policy for stacks (stretched
authorjpbruyere <jp.bruyere@hotmail.com>
Sat, 12 Sep 2015 19:46:14 +0000 (21:46 +0200)
committerjpbruyere <jp.bruyere@hotmail.com>
Sat, 12 Sep 2015 19:46:14 +0000 (21:46 +0200)
by default)

Templates/Checkbox.goml
Templates/RadioButton.goml
Tests/GOLIBTest_4.cs
Tests/Interfaces/fps.goml
Tests/Interfaces/test4.goml
Tests/Interfaces/testExpandable.goml
Tests/Interfaces/testHStack.goml
Tests/Interfaces/testWindow.goml
Tests/Tests.csproj
src/GraphicObjects/Checkbox.cs
src/GraphicObjects/RadioButton.cs

index a2f8bb211e9eae3dfd5400e70bb4f8dbdb1be77e..b37b15f111fdaa64514c035a6ac77ce5cec02430 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>\r
 <HorizontalStack Width="{Width}" Height="{Height}" Margin="0" Spacing="1">\r
        <Image Name="Image" Width="16" Height="16" Path="#go.Images.Icons.checkbox.svg"/>\r
-       <Label Name="Caption" Height="{Height}" Width="0"/>\r
+       <Label Name="Caption" Height="{Height}" Width="-1"/>\r
 </HorizontalStack>
\ No newline at end of file
index 0d8ab32ab7e41fe52aae41142583c4506247bdfb..ac52ea753ba6c1face3d316d0e117e50dd2a628a 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>\r
-<HorizontalStack Margin="0" Spacing="1" Focusable="false">\r
+<HorizontalStack Width="{Width}" Height="{Height}" Margin="0" Spacing="1">\r
        <Image Name="Image" Width="12" Height="12" Path="#go.Images.Icons.radiobutton.svg"/>\r
-       <Label Name="Caption"/>\r
+       <Label Name="Caption" Height="{Height}" Width="-1"/>\r
 </HorizontalStack>
\ No newline at end of file
index c1f2e0ad2a7cb6c8e926abe431d75ea44f724cc5..a5cdbb4903ca813293cb1c01d3b2cd9a51d4a894 100644 (file)
@@ -33,7 +33,7 @@ namespace test
 \r
 \r
                #region FPS\r
-               static int _fps = 0;\r
+               int _fps = 0;\r
 \r
                public int fps {\r
                        get { return _fps; }\r
@@ -52,20 +52,24 @@ namespace test
                                }\r
 \r
                                ValueChanged.Raise(this, new ValueChangeEventArgs ("fps", _fps));\r
+                               ValueChanged.Raise (this, new ValueChangeEventArgs ("update",\r
+                                       this.updateTime.ElapsedMilliseconds.ToString () + " ms"));\r
                        }\r
                }\r
 \r
-               public static int fpsMin = 0;\r
-               public static int fpsMax = 0;\r
+               public int fpsMin = int.MaxValue;\r
+               public int fpsMax = 0;\r
 \r
-               static void resetFps ()\r
+               void resetFps ()\r
                {\r
                        fpsMin = int.MaxValue;\r
                        fpsMax = 0;\r
                        _fps = 0;\r
                }\r
+               public string update = "";\r
                #endregion\r
 \r
+\r
                GraphicObject c;\r
                ProgressBar pb, pb2;\r
                Label labMousePos, labPb, labF, labA, labH, labFps, labFpsMin, labFpsMax, labV,\r
@@ -88,19 +92,19 @@ namespace test
                        //c2.HorizontalAlignment = HorizontalAlignment.Left;\r
                        //c2.VerticalAlignment = VerticalAlignment.Top;\r
                        c.Background.AdjustAlpha (0.5);\r
-                       labMousePos = c.FindByName ("labMouse") as Label;\r
-                       //pb = c.FindByName("pbBar") as ProgressBar;\r
-                       pb2 = c.FindByName("pbBar2") as ProgressBar;\r
-                       labPb = c.FindByName ("labPb") as Label;\r
+//                     labMousePos = c.FindByName ("labMouse") as Label;\r
+//                     //pb = c.FindByName("pbBar") as ProgressBar;\r
+//                     pb2 = c.FindByName("pbBar2") as ProgressBar;\r
+//                     labPb = c.FindByName ("labPb") as Label;\r
                        labF = c.FindByName ("labFocus") as Label;\r
                        labA = c.FindByName ("labActive") as Label;\r
                        labH = c.FindByName ("labHover") as Label;\r
-                       labFps = c.FindByName ("labFps") as Label;\r
-                       labFpsMin = c.FindByName ("labFpsMin") as Label;\r
-                       labFpsMax = c.FindByName ("labFpsMax") as Label;\r
-                       labV = c.FindByName ("labValue") as Label;\r
-                       labUpdate = c.FindByName ("labUpdate") as Label;\r
-                       slTest = c.FindByName ("slider") as Slider;\r
+//                     labFps = c.FindByName ("labFps") as Label;\r
+//                     labFpsMin = c.FindByName ("labFpsMin") as Label;\r
+//                     labFpsMax = c.FindByName ("labFpsMax") as Label;\r
+//                     labV = c.FindByName ("labValue") as Label;\r
+//                     labUpdate = c.FindByName ("labUpdate") as Label;\r
+//                     slTest = c.FindByName ("slider") as Slider;\r
                        colors = c.FindByName ("colors") as Group;\r
 \r
 \r
@@ -112,7 +116,7 @@ namespace test
 \r
                        int i = 0;\r
                        foreach (Color col in Color.ColorDic) {\r
-                               HorizontalStack s = colors.addChild (new HorizontalStack ());\r
+                               HorizontalStack s = colors.addChild (new HorizontalStack () { Fit = true});\r
                                s.HorizontalAlignment = HorizontalAlignment.Left;\r
                                Border b = new Border () {\r
                                        Bounds = new Size (32, 20),\r
@@ -139,7 +143,7 @@ namespace test
                                if (i > 150)\r
                                        break;\r
                        }\r
-                       ValueChanged.Raise(this, new ValueChangeEventArgs ("TestList", TestList));\r
+//                     ValueChanged.Raise(this, new ValueChangeEventArgs ("TestList", TestList));\r
                }\r
                void pFps_mousemove(object sender, MouseMoveEventArgs e)\r
                {\r
@@ -158,38 +162,36 @@ namespace test
 \r
                        fps = (int)RenderFrequency;\r
 \r
-                       labUpdate.Text = this.updateTime.ElapsedMilliseconds.ToString() + " ms";\r
 \r
                        if (frameCpt > 200) {\r
                                resetFps ();\r
                                frameCpt = 0;\r
-\r
                        }\r
                        frameCpt++;\r
 \r
-                       if (pb2.Value == pb2.Maximum)\r
-                               pb2.Value = 0;\r
-                       pb2.Value++;\r
-\r
-                       if (FocusedWidget==null)\r
-                               labF.Text = "- none -";\r
-                       else\r
-                               labF.Text = FocusedWidget.Name;\r
 \r
-                       if (activeWidget==null)\r
-                               labA.Text = "- none -";\r
-                       else\r
-                               labA.Text = activeWidget.Name;\r
-\r
-                       if (hoverWidget==null)\r
-                               labH.Text = "- none -";\r
-                       else\r
-                               labH.Text = hoverWidget.Name;\r
+//                     if (FocusedWidget==null)\r
+//                             labF.Text = "- none -";\r
+//                     else\r
+//                             labF.Text = FocusedWidget.Name;\r
+//\r
+//                     if (activeWidget==null)\r
+//                             labA.Text = "- none -";\r
+//                     else\r
+//                             labA.Text = activeWidget.Name;\r
+//\r
+//                     if (hoverWidget==null)\r
+//                             labH.Text = "- none -";\r
+//                     else\r
+//                             labH.Text = hoverWidget.Name;\r
                }\r
+               //public Point MousePosition;\r
+\r
                protected override void OnMouseMove (MouseMoveEventArgs e)\r
                {\r
                        base.OnMouseMove (e);\r
-                       labMousePos.Text = e.Position.ToString ();\r
+                       //MousePosition = e.Position;\r
+                       ValueChanged.Raise(this, new ValueChangeEventArgs ("MousePosition", e.Position.ToString()));\r
                }\r
                [STAThread]\r
                static void Main ()\r
index 151d9905ef1196ea46ba0ad0ba5250be3ea70e7c..edc63e70b48c2dd082f78d75b73fb210f299902b 100755 (executable)
@@ -3,20 +3,20 @@
        HorizontalAlignment="Left" VerticalAlignment="Top"\r
        Margin="10" Width="-1" Height="-1" Focusable="True" >\r
 \r
-               <VerticalStack Name="vsFps"  BorderWidth="1" Margin="5" Spacing="4">\r
-                       <HorizontalStack>\r
+               <VerticalStack Name="vsFps"  BorderWidth="1" Margin="5" Spacing="4" Fit="true">\r
+                       <HorizontalStack Height="-1">\r
                                <Label Text="Update:" FontColor="White" />\r
                                <Label Name="labUpdate" Text="{update}" FontSize="12" Background="DarkGreen"/>\r
                        </HorizontalStack>\r
-                       <HorizontalStack Name="hsFps" Background="Red" >\r
+                       <HorizontalStack Height="-1" Name="hsFps" Background="Red" >\r
                                <Label Name="captionFps" Text="Fps:" />\r
                                <Label Name="valueFps" Text="{fps}" Font="droid bold, 12" TextAlignment="Center" Background="AoEnglish"/>\r
                        </HorizontalStack>\r
-                       <HorizontalStack Background="Red">\r
+                       <HorizontalStack Height="-1" Background="Red">\r
                                <Label Text="Min:" Width = "30" />\r
                                <Label Text="{fpsMin}" Font="droid bold, 12" TextAlignment="Center" Background="AoEnglish"/>\r
                        </HorizontalStack>\r
-                       <HorizontalStack Background="Red" >\r
+                       <HorizontalStack Height="-1" Background="Red" >\r
                                <Label Text="Max:" Width = "30"/>\r
                                <Label Text="{fpsMax}" Font="droid bold, 12" TextAlignment="Center" Background="AoEnglish"/>\r
                        </HorizontalStack>\r
index 4d824a2e8742508d4263c20e6a42e2221f9b5b81..d2866bb6286b57d7958d12150dde64627e61fd0b 100755 (executable)
@@ -1,91 +1,64 @@
 <?xml version="1.0"?>\r
-<Group Name="MainGrp" Focusable="true"\r
+<Group Name="MainGrp"\r
        Width="800" Height="500"\r
        Background="0,5;0,5;0,5;0,5" Foreground="White"\r
        Margin="10" >\r
-       <Border Margin="10"\r
+       <Border Margin="10" CornerRadius="10"\r
                Name="mainBorder"\r
                BorderWidth="2" BorderColor="Transparent"\r
                Focusable="True"\r
                MouseEnter="{BorderColor = White}"\r
                MouseLeave="{BorderColor = Transparent}">\r
-\r
-               <HorizontalStack Name="hs0"\r
-                       WidgetSpacing="1" \r
-                       VerticalAlignment="Top">\r
-                       <Slider Orientation="Vertical" Height="300" Width="10" Background="Transparent" />\r
-                       <VerticalStack Name="vs1" Spacing="5">\r
-                               <Slider Height="10" Width="300" BorderWidth="1" Background="Transparent" />\r
-                               <Label Name="labMouse" Text="MousePos"/>\r
-                               <HorizontalStack WidgetSpacing="10">\r
-                                       <VerticalStack Width="100">\r
-                                               <Checkbox Name="chk1" Focusable="true"/>\r
+               <HorizontalStack WidgetSpacing="1">\r
+                       <VerticalStack Width="-1">\r
+                               <HorizontalStack WidgetSpacing="1" Fit="true">\r
+                                       <VerticalStack Fit="true">\r
+                                               <Label Text="{MousePosition}"/>\r
+                                               <HorizontalStack  Name="hsFocus" Fit="true">\r
+                                                       <Label Text="Focused:"/>\r
+                                                       <Label Name="labFocus"/>\r
+                                               </HorizontalStack>\r
+                                               <HorizontalStack Fit="true">\r
+                                                       <Label Text="Active:"  Name="hsActive"/>\r
+                                                       <Label Name="labActive"/>\r
+                                               </HorizontalStack>\r
+                                               <HorizontalStack Fit="true">\r
+                                                       <Label Text="Hover:"  Name="hsHover"/>\r
+                                                       <Label Name="labHover"/>\r
+                                               </HorizontalStack>\r
+                                       </VerticalStack>\r
+                                       <VerticalStack Fit="true">                                      \r
+                                               <Checkbox Name="chk1"/>\r
                                                <Checkbox Name="chk2" IsChecked="true"/>\r
-                                               <Checkbox Name="chk3" Template="#go.Templates.Checkbox2.goml"/>\r
-                                               <Checkbox Name="chk4">\r
+                                               <Checkbox Name="chk4" >\r
                                                        <Template>\r
-                                                               <HorizontalStack Margin="0" Spacing="1" Focusable="false">\r
-                                                                       <Image Name="Image" Width="16" Height="16" Path="#go.Images.Icons.checkbox.svg"/>\r
-                                                                       <Label Name="Caption" Foreground="Black" Background="Yellow"/>\r
+                                                               <HorizontalStack Fit="True" Margin="0" Spacing="1">\r
+                                                                       <Image Name="Image" Width="20" Height="20" Path="#go.Images.Icons.checkbox.svg"/>\r
+                                                                       <Label Name="Caption" Height="-1" Width="-1" Foreground="Black" Background="Yellow"/>\r
                                                                </HorizontalStack>\r
                                                        </Template>\r
                                                </Checkbox>\r
                                        </VerticalStack>\r
-                                       <VerticalStack Width="100">\r
+                                       <VerticalStack Fit="true">\r
                                                <RadioButton IsChecked="true"/>\r
                                                <RadioButton/>\r
                                                <RadioButton>                                                   \r
                                                        <Template>\r
-                                                               <HorizontalStack Background="Green" Margin="0" Spacing="1" Focusable="false">\r
-                                                                       <Image Name="Image" Width="16" Height="16" Path="#go.Images.Icons.radiobutton.svg"/>\r
+                                                               <HorizontalStack Fit="true" Background="Green" Margin="0" Spacing="1" Focusable="false">\r
+                                                                       <Image Name="Image" Width="20" Height="20" Path="#go.Images.Icons.radiobutton.svg"/>\r
                                                                        <Label Name="Caption"/>\r
                                                                </HorizontalStack>\r
                                                        </Template>\r
                                                </RadioButton>\r
-                                               <RadioButton/>\r
                                        </VerticalStack>\r
-                                       <Spinner Width="50" Value="5"></Spinner>\r
-                               </HorizontalStack>\r
-<!--                           <ListBox Data="{TestList}"></ListBox>-->\r
-                               <HorizontalStack Name="hsPbar" Margin="5">\r
-                                       <ProgressBar Name="pbBar" \r
-                                               Width="200" Height="20"\r
-                                               Minimum="0"\r
-                                               Maximum="200"\r
-                                               Value="{fps}"\r
-                                               Foreground="BlueCrayola" Background="DarkGray"\r
-                                               BorderWidth="2" BorderColor="White"/>\r
-<!--                                   <Label Name="labPb"\r
-                                               Width="30"\r
-                                               TextAlignment="RightCenter"/>-->\r
-                               </HorizontalStack>\r
-                               <HorizontalStack  Name="hsFocus">\r
-                                       <Label Text="Focused:"/>\r
-                                       <Label Name="labFocus"/>\r
-                               </HorizontalStack>\r
-                               <HorizontalStack>\r
-                                       <Label Text="Active:"  Name="hsActive"/>\r
-                                       <Label Name="labActive"/>\r
-                               </HorizontalStack>\r
-                               <HorizontalStack>\r
-                                       <Label Text="Hover:"  Name="hsHover"/>\r
-                                       <Label Name="labHover"/>\r
                                </HorizontalStack>\r
-                               <Button  Margin="5" BorderWidth="0" Width="-1" Height="-1"  HorizontalAlignment="Center">\r
-                                       <Label FontSize="18" Text="This is a test" Margin="5" Foreground="Black" />\r
-                               </Button>\r
                                <TextBoxWidget Name="textbox1" TextAlignment="LeftCenter" Font="droid,14"                                               \r
-                                                               Width="300" Height="-1" Margin="2"\r
-                                                               BorderColor="White" BorderWidth="1"\r
+                                                               Width="200" Height="-1" Margin="2" Background="White"\r
+                                                               Forground="Black"\r
+                                                               BorderColor="DimGray" BorderWidth="1"\r
                                                                Text="editable text"/>\r
-                               <GroupBox Title="Group Box" Width="300" Height="100" \r
-                                       BorderColor="White" BorderWidth="2" Margin="3">\r
-                                       <Label Name="labValue" FontSize="14" Text="{../../slider.Value}" TextAlignment="Center"/>\r
-                               </GroupBox>\r
-                               <Slider Height="10" Width="300" BorderWidth="1" Background="Transparent" />\r
-                               <GraduatedSlider Name="slider" Height="30" Width="300" Foreground="BlueBell"/>\r
                        </VerticalStack>\r
-                       <VerticalStack Width="-1" Height="-1"  Margin="0" WidgetSpacing="1">\r
+                       <VerticalStack Fit="true"  Margin="0" WidgetSpacing="1">\r
                                <Button  Margin="1" Width="150" Height="100">\r
                                        <Image Path="#Tests.image.tetra.png"/>\r
                                </Button>\r
                                </Expandable>\r
                                <HorizontalStack>\r
                                        <Label Text="Update" FontColor="White"/>\r
-                                       <Label Name="labUpdate" Text="xxxx" FontSize="16" Width="60" TextAlignment="Center" Background="DarkGreen"/>\r
+                                       <Label Name="labUpdate" Text="{update}" FontSize="16" Width="60" TextAlignment="Center" Background="DarkGreen"/>\r
                                </HorizontalStack>\r
                                <HorizontalStack>\r
                                        <Label Text="Fps:" Width = "30"/>\r
                                                TextAlignment="Center" Background="AoEnglish"/>\r
                                </HorizontalStack>\r
                        </VerticalStack>\r
+                       <HorizontalStack Width="-1">\r
+                               <Scroller Name="scroller1" Background="DimGray" Width="-1"  \r
+                                        Margin="5" VerticalScrolling="true" ScrollY="{../scrollbar1.Scroll}">\r
+                                       <VerticalStack Name="colors" VerticalAlignment="Top" Margin="1" Fit="true">\r
+                                               <ProgressBar Name="pbBar2" Width="100" Height="20" Value="50"\r
+                                                                       BorderWidth="2" BorderColor="White" Foreground="BlueCrayola" Background="DarkGray"/>\r
+                                               <ProgressBar Width="100" Height="20" Value="{fps}" BorderWidth="2"\r
+                                                       BorderColor="White" Foreground="BlueCrayola" Background="DarkGray"/>                                                                                            \r
+                                       </VerticalStack>\r
+                               </Scroller>\r
+                               <Scrollbar Name="scrollbar1" Scroll="{../scroller1.ScrollY}" MaximumScroll="{../scroller1.MaximumScroll}"\r
+                                       Orientation="Vertical" Width="16" />\r
+                       </HorizontalStack>\r
+               </HorizontalStack>\r
+<!--           <HorizontalStack Name="hs0"\r
+                       WidgetSpacing="1" \r
+                       VerticalAlignment="Top">\r
+                       <Slider Orientation="Vertical" Height="300" Width="10" Background="Transparent" />\r
+                       <VerticalStack Name="vs1" Spacing="5">\r
+                               <Slider Height="10" Width="300" BorderWidth="1" Background="Transparent" />\r
+                               <HorizontalStack WidgetSpacing="10">\r
+                                       \r
+\r
+                                       <Spinner Width="50" Value="5"></Spinner>\r
+                               </HorizontalStack>\r
+                               <HorizontalStack Name="hsPbar" Margin="5">\r
+                                       <ProgressBar Name="pbBar" \r
+                                               Width="200" Height="20"\r
+                                               Minimum="0"\r
+                                               Maximum="200"\r
+                                               Value="{fps}"\r
+                                               Foreground="BlueCrayola" Background="DarkGray"\r
+                                               BorderWidth="2" BorderColor="White"/>\r
+                               </HorizontalStack>\r
+\r
+                               <Button  Margin="5" BorderWidth="0" Width="-1" Height="-1"  HorizontalAlignment="Center">\r
+                                       <Label FontSize="18" Text="This is a test" Margin="5" Foreground="Black" />\r
+                               </Button>\r
+\r
+                               <GroupBox Title="Group Box" Width="300" Height="100" \r
+                                       BorderColor="White" BorderWidth="2" Margin="3">\r
+                                       <Label Name="labValue" FontSize="14" Text="{../../slider.Value}" TextAlignment="Center"/>\r
+                               </GroupBox>\r
+                               <Slider Height="10" Width="300" BorderWidth="1" Background="Transparent" />\r
+                               <GraduatedSlider Name="slider" Height="30" Width="300" Foreground="BlueBell"/>\r
+                       </VerticalStack>\r
+       \r
                        <HorizontalStack Height="350" Width="-1">\r
                                <Scroller Name="scroller1" Background="DimGray" Height="0" Width="-1"  \r
                                         Margin="5" VerticalScrolling="true" ScrollY="{../scrollbar1.Scroll}">\r
                                        Orientation="Vertical" Width="16" />\r
                        </HorizontalStack>\r
                </HorizontalStack>\r
-\r
-               <Slider \r
+-->\r
+<!--           <Slider \r
                        Height="20" Width="100" \r
                        Background="Transparent"\r
-                       VerticalAlignment="Bottom" />\r
+                       VerticalAlignment="Bottom" />-->\r
                </Border>\r
 </Group>
\ No newline at end of file
index a292cdde1d785f4712fda436436fa5055cf1f894..0caf0a32ce6b28a4cae8b090ea4aee07d9532269 100755 (executable)
@@ -3,7 +3,7 @@
        Margin="20" Focusable="True" Background="Gray">\r
 \r
        <Expandable Width="150" Height="-1" Margin="2" VerticalAlignment="Top">\r
-                       <VerticalStack Width="100" >\r
+                       <VerticalStack Width="100" Height="-1">\r
                                <Checkbox Name="chk1"/>\r
                                <Checkbox Name="chk2" IsChecked="true"/>\r
                                <Checkbox Name="chk3"/>\r
index 8e4083a00488648e179d8cd0d018d80b1e82588e..ac03eac9ee70b30c931edfa94fb95c65ab73015f 100755 (executable)
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>\r
 <!--<HorizontalStack Background="Gray" Margin="1">-->\r
-<Group  Background="Gray" Margin="5" Height="-1" Width="-1">\r
+<Group  Background="Gray" Margin="5" Height="200" Width="300">\r
        <VerticalStack Background="Green" Margin="1">\r
-               <HorizontalStack Width="-1" Height="-1" Margin="5" Background="Red">\r
-                       <Checkbox Height="100" Width="200" Background="Blue"/>\r
+               <HorizontalStack Width="0" Height="0" Margin="5" Background="Red">\r
+                       <Checkbox Height="-1" Width="100" Background="Blue"/>\r
        <!--            <Checkbox Height="-1" Width="-1"/>-->\r
                </HorizontalStack>\r
        </VerticalStack>\r
index efad1d8f8dda2ad1aba685cb4edbdc1086803586..b336a9dc0648100d5e57be6406f62929ae09b49c 100755 (executable)
@@ -4,9 +4,9 @@
        Focusable="True"  CornerRadius="20" MinimumSize="100;100" MaximumSize="500;500">\r
        <Template>\r
                <Border BorderWidth="1" BorderColor="White" Margin="0" CornerRadius="20">\r
-                       <VerticalStack Height="0" Width="0" Margin="0">\r
-                               <Border BorderWidth="1" BorderColor="White"  Height="-1" Width="0" Background="0,1;0,5;1,0;0,5">\r
-                                       <HorizontalStack Name="hs" Margin="1" Spacing="1" Height="-1" Width="0" Focusable="false" >\r
+                       <VerticalStack Margin="0">\r
+                               <Border BorderWidth="1" BorderColor="White"  Height="-1" Background="0,1;0,5;1,0;0,5">\r
+                                       <HorizontalStack Name="hs" Margin="1" Spacing="1" Height="-1" Focusable="false" >\r
                                                <GraphicObject Width="5" Height="0"/>\r
                                                <Image Name="Image" Margin="1" Width="12" Height="12" Path="#go.Images.Icons.tetra.png"/>\r
                                                <Label Foreground="White" Width="0" Name="Title" Margin="1" TextAlignment="Center" />\r
                        </VerticalStack>\r
                </Border>\r
        </Template>\r
-       <VerticalStack Name="contentVSStack" Height="0" Width="0" Margin="10" Spacing="10">\r
+       <VerticalStack Name="contentVSStack" Margin="10" Spacing="10">\r
                <Slider Name="slider" Height="10" Width="0"/>\r
 \r
                <HorizontalStack Width="-1" Height="-1" Margin="0" Background="Red">\r
-                       <Checkbox Height="-1" Width="-1"/>\r
-                       <Checkbox Height="-1" Width="-1"/>\r
+                       <Checkbox Height="-1" Width="100"/>\r
+                       <Checkbox Height="-1" Width="100"/>\r
                </HorizontalStack>\r
                <GroupBox Title="test"  Height="-1" Width="-1" Margin="5">\r
-                       <VerticalStack Width="-1">\r
+                       <VerticalStack  Height="-1" Width="-1">\r
                                <RadioButton  Caption="Radio 1"/>\r
                                <RadioButton  Caption="Radio 2" IsChecked="true"/>\r
                                <RadioButton  Caption="Radio 3"/>\r
index 8694d0e06a4bf1d5db0bb6257e67f326218f62ee..ce66600476013365de0b3bcf0e984bccf7795b29 100644 (file)
@@ -8,7 +8,7 @@
     <OutputType>Exe</OutputType>
     <RootNamespace>Tests</RootNamespace>
     <AssemblyName>Tests</AssemblyName>
-    <StartupObject>test.GOLIBTests</StartupObject>
+    <StartupObject>test.GOLIBTest_4</StartupObject>
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     <OutputPath>..\bin\$(configuration)</OutputPath>
     <IntermediateOutputPath>obj\$(configuration)</IntermediateOutputPath>
index f6b7bae394abdd526576b97ee5a200d02f17d0b8..863cae0c8a499d61ca8af579ca740868c200373d 100644 (file)
@@ -25,7 +25,7 @@ namespace go
                public Checkbox() : base()\r
                {                       \r
                }       \r
-\r
+                       \r
                protected override void loadTemplate(GraphicObject template = null)\r
                {                       \r
                        base.loadTemplate (template);\r
@@ -64,6 +64,11 @@ namespace go
             }\r
         }\r
 \r
+               [XmlAttributeAttribute()][DefaultValue(-1)]\r
+               public override int Height {\r
+                       get { return base.Height; }\r
+                       set { base.Height = value; }\r
+               }\r
                [XmlAttributeAttribute()][DefaultValue(true)]//overiden to get default to true\r
                public override bool Focusable\r
                {\r
index 9d7ef83e7d05f6c8871c72e99599c4836a7353e2..245fd2b239467cd791e22a8791e626cb339feb23 100644 (file)
@@ -30,11 +30,16 @@ namespace go
                {\r
                        base.loadTemplate (template);\r
 \r
-                       _caption = this.child.FindByName ("Caption") as Label;\r
+                       _caption = this.child.FindByName ("Caption") as Label;//TODO:should use bindings instead\r
                        _image = this.child.FindByName ("Image") as Image;\r
                        _image.SvgSub = "unchecked";\r
                }\r
-                       \r
+\r
+               [XmlAttributeAttribute()][DefaultValue(-1)]\r
+               public override int Height {\r
+                       get { return base.Height; }\r
+                       set { base.Height = value; }\r
+               }\r
                [XmlAttributeAttribute()][DefaultValue(true)]//overiden to get default to true\r
                public override bool Focusable\r
                {\r