<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" >\r
<GraphicObject Width="5"/>\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
+ <Image Margin="1" Width="12" Height="12" Path="{Icon}"/>\r
+ <Label Foreground="White" Width="0" Margin="1" TextAlignment="Center" Text="{Title}" />\r
<Border CornerRadius="6" BorderWidth="1" BorderColor="Transparent" Height="12" Width="12"\r
MouseEnter="{BorderColor=White}" MouseLeave="{BorderColor=Transparent}">\r
<Image Focusable="true" Name="Image" Margin="0" Width="0" Height="0" Path="#go.Images.Icons.exit2.svg"\r
<GraphicObject Width="5"/>\r
</HorizontalStack>\r
</Border>\r
- <Container Name="Content"/>\r
+ <Container Name="Content" Background="0,5;0,5;0,5;0,5"/>\r
</VerticalStack>\r
</Border>
\ No newline at end of file
<?xml version="1.0"?>\r
<!--<Group>-->\r
-<Window Name="window1" Left="10" Top="10" Title="Test window" Width="200" Height="200" Background="0,5;0,5;0,5;0,8" \r
- Focusable="True" CornerRadius="20" MinimumSize="100;100" MaximumSize="500;500">\r
- <Template>\r
- <Border BorderWidth="1" BorderColor="White" Margin="0" CornerRadius="20">\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
- <Border CornerRadius="6" BorderWidth="1" Margin="0" BorderColor="Transparent" Height="12" Width="12"\r
- MouseEnter="{BorderColor=White}" MouseLeave="{BorderColor=Transparent}">\r
- <Image Focusable="true" Name="Image" Margin="0" Width="0" Height="0" Path="#go.Images.Icons.exit2.svg"\r
- MouseClick="butQuitPress"/>\r
- </Border>\r
- <GraphicObject Width="5" Height="0"/>\r
- </HorizontalStack>\r
- </Border>\r
- <Container Name="Content" Margin="0" Width="0" Height="0"/>\r
- </VerticalStack>\r
- </Border>\r
- </Template>\r
+<Window Name="window1" Left="10" Top="10" Title="Test window" \r
+ Width="250" Height="300" >\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="100"/>\r
- <Checkbox Height="-1" Width="100"/>\r
+ <HorizontalStack Width="0" Height="-1" Margin="10" Background="BlueCrayola">\r
+ <Checkbox Height="-1" Width="80"/>\r
+ <GraphicObject Width="0"/>\r
+ <Checkbox Height="-1" Width="80"/>\r
</HorizontalStack>\r
- <GroupBox Title="test" Height="-1" Width="-1" Margin="5">\r
- <VerticalStack Height="-1" Width="-1">\r
+ <GroupBox Text="test" Height="-1" Width="0" Margin="5">\r
+ <VerticalStack Height="-1" Width="0">\r
<RadioButton Caption="Radio 1"/>\r
<RadioButton Caption="Radio 2" IsChecked="true"/>\r
<RadioButton Caption="Radio 3"/>\r
<LogicalName>Tests.Interfaces.test7.goml</LogicalName>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
+ <None Include="Interfaces\testWindow2.goml">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
</ItemGroup>
<ItemGroup>
<Folder Include="Interfaces\" />
[DefaultTemplate("#go.Templates.Window.goml")]
public class Window : TemplatedContainer
{
- Label _title;
- Image _icon;
+ string _title;
+ string _icon;
Container _contentContainer;
+ #region GraphicObject overrides
+ [XmlAttributeAttribute()][DefaultValue(true)]//overiden to get default to true
+ public override bool Focusable
+ {
+ get { return base.Focusable; }
+ set { base.Focusable = value; }
+ }
+ #endregion
+
public override GraphicObject Content {
get {
return _contentContainer == null ? null : _contentContainer.Child;
}
[XmlAttributeAttribute()][DefaultValue("Window")]
public string Title {
- get { return _title.Text; }
+ get { return _title; }
set {
- if (_title == null)
- return;
- _title.Text = value;
+ _title = value;
+ NotifyValueChanged ("Title", _title);
}
- }
+ }
+ [XmlAttributeAttribute()][DefaultValue("#go.Images.Icons.tetra.png")]
+ public string Icon {
+ get { return _icon; }
+ set {
+ _icon = value;
+ NotifyValueChanged ("Icon", _icon);
+ }
+ }
+
public Window () : base()
{
}
{
base.loadTemplate (template);
_contentContainer = this.child.FindByName ("Content") as Container;
- _title = this.child.FindByName ("Title") as Label;
- _icon = this.child.FindByName ("Icon") as Image;
}
protected void butQuitPress (object sender, MouseButtonEventArgs e)