Add IgnoreChildControlMouseEvents; demo: control_basic_button

This commit is contained in:
Zihan Chen
2021-06-17 16:11:33 -07:00
parent 044cbb3a15
commit 27b5e051ae
12 changed files with 184 additions and 50 deletions

View File

@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<Resource>
<Folder name="GacGenConfig">
<Folder name="ResX86">
<Text name="Resource">..\..\UIRes\32bits\control_basic_button.bin</Text>
</Folder>
<Folder name="ResX64">
<Text name="Resource">..\..\UIRes\64bits\control_basic_button.bin</Text>
</Folder>
</Folder>
<Folder name="MainWindow">
<Doc name="ButtonDocument">
<Doc>
<Content>
<p align="Center">
<div style="Header">Hi!</div>
</p>
<p>
<nop>Button text could be replaced by a document!</nop><br/>
<nop>It is in <b>DocumentLabel</b> control.</nop>
</p>
<p>
<nop>You can put anything in a control (not just a button), </nop>
<nop>but remember not to set the <b>Text</b> property.</nop>
</p>
</Content>
<Styles>
<Style name="Header">
<size>24</size>
<b>true</b>
</Style>
</Styles>
</Doc>
</Doc>
<Instance name="MainWindowResource">
<Instance ref.Class="sample::MainWindow">
<Window ref.Name="self" Text="control_basic_button" ClientSize="x:480 y:320">
<MessageDialog ref.Name="messageDialog" Title-bind="self.Text" Text="Hello, world!"/>
<Table AlignmentToParent="left:0 top:0 right:0 bottom:0" CellPadding="10" BorderVisible="false" MinSizeLimitation="LimitToElementAndChildren">
<att.Rows>
<CellOption>composeType:Percentage percentage:0.5</CellOption>
<CellOption>composeType:MinSize</CellOption>
<CellOption>composeType:Percentage percentage:0.5</CellOption>
</att.Rows>
<att.Columns>
<CellOption>composeType:Percentage percentage:0.5</CellOption>
<CellOption>composeType:MinSize</CellOption>
<CellOption>composeType:Percentage percentage:0.5</CellOption>
</att.Columns>
<Cell Site="row:1 column:1">
<Button IgnoreChildControlMouseEvents="false">
<att.ContainerComposition-set PreferredMinSize="x:160"/>
<DocumentLabel EditMode="ViewOnly" Document-uri="res://MainWindow/ButtonDocument">
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
</DocumentLabel>
</Button>
</Cell>
</Table>
</Window>
</Instance>
</Instance>
</Folder>
</Resource>