mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-03-24 00:13:48 +08:00
...
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -58,6 +58,7 @@
|
||||
prop TitleColumn : DataColumn^ = null {const, not observe}
|
||||
prop AuthorColumn : DataColumn^ = null {const, not observe}
|
||||
prop DatePublishedColumn : DataColumn^ = null {const, not observe}
|
||||
prop SummaryColumn : DataColumn^ = null {const, not observe}
|
||||
|
||||
func FormatDate(date: DateTime): string
|
||||
{
|
||||
@@ -88,6 +89,7 @@
|
||||
SetTitleColumn(columnTitle);
|
||||
SetAuthorColumn(columnAuthor);
|
||||
SetDatePublishedColumn(columnDatePublished);
|
||||
SetSummaryColumn(columnSummary);
|
||||
}
|
||||
]]></ref.Ctor>
|
||||
<Window ref.Name="self" ClientSize="x:800 y:600">
|
||||
@@ -114,10 +116,10 @@
|
||||
<att.LargeImageProperty>SmallImage</att.LargeImageProperty>
|
||||
<att.SmallImageProperty>LargeImage</att.SmallImageProperty>
|
||||
<att.Columns>
|
||||
<DataColumn ref.Name="columnTitle" Text="Title" TextProperty="Title"/>
|
||||
<DataColumn ref.Name="columnAuthor" Text="Author" TextProperty="Author"/>
|
||||
<DataColumn ref.Name="columnDatePublished" Text="Date Published" TextProperty="self.FormatDate(item.DatePublished)"/>
|
||||
<DataColumn ref.Name="columnSummary" Text="Summary" TextProperty="Summary"/>
|
||||
<DataColumn ref.Name="columnTitle" Text="Title" TextProperty="Title" ValueProperty="Title"/>
|
||||
<DataColumn ref.Name="columnAuthor" Text="Author" TextProperty="Author" ValueProperty="Author"/>
|
||||
<DataColumn ref.Name="columnDatePublished" Text="Date Published" TextProperty="self.FormatDate(item.DatePublished)" ValueProperty="DatePublished"/>
|
||||
<DataColumn ref.Name="columnSummary" Text="Summary" TextProperty="Summary" ValueProperty="Summary"/>
|
||||
</att.Columns>
|
||||
<att.DataColumns>
|
||||
<_>0</_>
|
||||
|
||||
@@ -15,7 +15,40 @@
|
||||
<Text name="Resource">..\..\UIRes\64bits\control_datagrid_visualizer.bin</Text>
|
||||
</Folder>
|
||||
</Folder>
|
||||
<Image content="File">Summary.png</Image>
|
||||
<Folder name="MainWindow">
|
||||
<Instance name="SummaryVisualizerResource">
|
||||
<Instance ref.CodeBehind="false" ref.Class="sample::SummaryVisualizer">
|
||||
<GridVisualizerTemplate ref.Name="self">
|
||||
<Table AlignmentToParent="left:0 top:0 right:0 bottom:0" CellPadding="5" BorderVisible="false" MinSizeLimitation="LimitToElementAndChildren">
|
||||
<att.Rows>
|
||||
<CellOption>composeType:Percentage percentage:1.0</CellOption>
|
||||
</att.Rows>
|
||||
<att.Columns>
|
||||
<CellOption>composeType:MinSize</CellOption>
|
||||
<CellOption>composeType:Percentage percentage:1.0</CellOption>
|
||||
</att.Columns>
|
||||
|
||||
<Cell Site="row:0 column:0">
|
||||
<CustomControl TooltipWidth="240">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
<Bounds AlignmentToParent="left:0 top:0 right:0 bottom:0" MinSizeLimitation="LimitToElementAndChildren">
|
||||
<ImageFrame Image-uri="res://Summary.png"/>
|
||||
</Bounds>
|
||||
<att.TooltipControl>
|
||||
<DocumentLabel Text-bind="self.Text"/>
|
||||
</att.TooltipControl>
|
||||
</CustomControl>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:0 column:1">
|
||||
<SolidLabel Text-bind="cast string self.CellValue ?? ''" Font-bind="self.Font" Color-bind="self.PrimaryTextColor" Ellipse="true"/>
|
||||
</Cell>
|
||||
</Table>
|
||||
</GridVisualizerTemplate>
|
||||
</Instance>
|
||||
</Instance>
|
||||
|
||||
<Instance name="MainWindowResource">
|
||||
<Instance ref.Class="sample::MainWindow" xmlns:sample="sample::*">
|
||||
<sample:DataGridWindowBase ref.Name="self" Text="control_datagrid_visualizer" env.ItemType="sample::BookItem^">
|
||||
@@ -26,7 +59,7 @@
|
||||
var cell = self.DataGrid.SelectedCell;
|
||||
if (cell.row != -1 and cell.column == 1)
|
||||
{
|
||||
messageDialog.Text = (cast (BookItem^) self.DataGrid.SelectedRowValue).Author;
|
||||
messageDialog.Text = cast string self.DataGrid.SelectedCellValue;
|
||||
messageDialog.ShowDialog();
|
||||
}
|
||||
}
|
||||
@@ -35,6 +68,9 @@
|
||||
<att.AuthorColumn-set>
|
||||
<att.VisualizerFactory>HyperlinkVisualizerTemplate;FocusRectangleVisualizerTemplate;CellBorderVisualizerTemplate</att.VisualizerFactory>
|
||||
</att.AuthorColumn-set>
|
||||
<att.SummaryColumn-set>
|
||||
<att.VisualizerFactory>sample:SummaryVisualizer;FocusRectangleVisualizerTemplate;CellBorderVisualizerTemplate</att.VisualizerFactory>
|
||||
</att.SummaryColumn-set>
|
||||
</sample:DataGridWindowBase>
|
||||
</Instance>
|
||||
</Instance>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 570 B |
Reference in New Issue
Block a user