Demo: GacUI_Xml\Binding_Uri

This commit is contained in:
vczh
2016-04-14 00:30:17 -07:00
parent d2e5c3926f
commit 205867b7a3
4 changed files with 59 additions and 4 deletions
+49 -4
View File
@@ -12,14 +12,59 @@
<Text name="PrecompiledBinary">Binding_Uri.bin</Text>
</Folder>
</Folder>
<Folder name="Data">
<Text name="Title">Binding_Uri</Text>
<Image name="Logo" content="File">..\..\..\GacUI_Layout\RichTextEmbedding\UI\Gaclib.png</Image>
<Doc name="Document">
<Doc>
<Content>
<p align="Center">
<div style="Title">
<b>Binding_Uri</b>
</div>
</p>
<p>
<div style="Body">
<nop>Welcome to the demo!</nop>
</div>
</p>
</Content>
<Styles>
<Style name="Content">
<face>Segoe UI</face>
</Style>
<Style name="Title" parent="Content">
<size>24</size>
<b>true</b>
</Style>
<Style name="Body" parent="Content">
<size>14</size>
</Style>
</Styles>
</Doc>
</Doc>
</Folder>
<Folder name="MainWindow">
<Instance name="MainWindowResource">
<Instance ref.CodeBehind="false" ref.Class="demo::MainWindow">
<Window Text="Binding_Uri" ClientSize="x:480 y:320">
<Window Text-uri="res://Data/Title" ClientSize="x:480 y:320">
<att.BoundsComposition-set PreferredMinSize="x:480 y:320"/>
<Label Text="This is a window!">
<att.Font>fontFamily:{Segoe UI} size:32 antialias:true</att.Font>
</Label>
<Tab>
<att.BoundsComposition-set AlignmentToParent="left:5 top:5 right:5 bottom:5"/>
<TabPage Text="Image">
<Bounds MinSizeLimitation="LimitToElement">
<ImageFrameElement Image-uri="res://Data/Logo"/>
</Bounds>
</TabPage>
<TabPage Text="Document">
<DocumentLabel ref.Name="documentLabel" Document-uri="res://Data/Document">
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
<ev.ActiveHyperlinkExecuted>documentLabel_ActiveHyperlinkExecuted</ev.ActiveHyperlinkExecuted>
</DocumentLabel>
</TabPage>
</Tab>
</Window>
</Instance>
</Instance>
@@ -14,6 +14,10 @@ namespace demo
{
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
void MainWindow::documentLabel_ActiveHyperlinkExecuted(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
{
}
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
MainWindow::MainWindow()
@@ -40,6 +44,8 @@ namespace vl
BEGIN_CLASS_MEMBER(demo::MainWindow)
CLASS_MEMBER_BASE(vl::presentation::controls::GuiWindow)
CLASS_MEMBER_CONSTRUCTOR(demo::MainWindow*(), NO_PARAMETER)
CLASS_MEMBER_GUIEVENT_HANDLER(documentLabel_ActiveHyperlinkExecuted, vl::presentation::compositions::GuiEventArgs)
END_CLASS_MEMBER(demo::MainWindow)
#undef _
@@ -23,11 +23,13 @@ namespace demo
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
private:
protected:
vl::presentation::controls::GuiDocumentLabel* documentLabel;
void InitializeComponents()
{
if (InitializeFromResource())
{
GUI_INSTANCE_REFERENCE(documentLabel);
}
else
{
@@ -37,6 +39,7 @@ namespace demo
MainWindow_()
:vl::presentation::GuiInstancePartialClass<vl::presentation::controls::GuiWindow>(L"demo::MainWindow")
,vl::presentation::controls::GuiWindow(vl::presentation::theme::GetCurrentTheme()->CreateWindowStyle())
,documentLabel(0)
{
}
};
@@ -62,6 +65,7 @@ namespace demo
protected:
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
void documentLabel_ActiveHyperlinkExecuted(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments);
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
public:
MainWindow();
Binary file not shown.