This commit is contained in:
vczh
2016-07-31 01:05:22 -07:00
parent d7d8ba940f
commit c0d76c9216
4 changed files with 37 additions and 2 deletions
@@ -176,7 +176,7 @@
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandBigIcon" Image-uri="res://Images/BigIcon" Selected="true">
<ToolstripCommand ref.Name="commandBigIcon" Image-uri="res://Images/BigIcon">
<ev.Executed>commandBigIcon_Executed</ev.Executed>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandSmallIcon" Image-uri="res://Images/SmallIcon">
@@ -185,7 +185,7 @@
<ToolstripCommand ref.Name="commandList" Image-uri="res://Images/List">
<ev.Executed>commandList_Executed</ev.Executed>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandDetail" Image-uri="res://Images/Detail">
<ToolstripCommand ref.Name="commandDetail" Image-uri="res://Images/Detail" Selected="true">
<ev.Executed>commandDetail_Executed</ev.Executed>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandTile" Image-uri="res://Images/Tile">
@@ -283,6 +283,11 @@
<ListViewColumn Text="Phone" TextProperty="Phone" Size="120"/>
<ListViewColumn Text="Address" TextProperty="Address" Size="120"/>
</att.Columns>
<att.DataColumns>
<Int32>1</Int32>
<Int32>2</Int32>
</att.DataColumns>
</BindableListView>
</Cell>
</Table>
@@ -14,26 +14,44 @@ namespace demo
void MainWindow::commandBigIcon_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
{
ClearViewSelection();
commandBigIcon->SetSelected(true);
listViewContacts->ChangeItemStyle(new list::ListViewBigIconContentProvider);
}
void MainWindow::commandDetail_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
{
ClearViewSelection();
commandDetail->SetSelected(true);
listViewContacts->ChangeItemStyle(new list::ListViewDetailContentProvider);
}
void MainWindow::commandInformation_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
{
ClearViewSelection();
commandInformation->SetSelected(true);
listViewContacts->ChangeItemStyle(new list::ListViewInformationContentProvider);
}
void MainWindow::commandList_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
{
ClearViewSelection();
commandList->SetSelected(true);
listViewContacts->ChangeItemStyle(new list::ListViewListContentProvider);
}
void MainWindow::commandSmallIcon_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
{
ClearViewSelection();
commandSmallIcon->SetSelected(true);
listViewContacts->ChangeItemStyle(new list::ListViewSmallIconContentProvider);
}
void MainWindow::commandTile_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
{
ClearViewSelection();
commandTile->SetSelected(true);
listViewContacts->ChangeItemStyle(new list::ListViewTileContentProvider);
}
void MainWindow::OnCreate()
@@ -46,6 +64,16 @@ namespace demo
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
void MainWindow::ClearViewSelection()
{
commandBigIcon->SetSelected(false);
commandSmallIcon->SetSelected(false);
commandList->SetSelected(false);
commandDetail->SetSelected(false);
commandTile->SetSelected(false);
commandInformation->SetSelected(false);
}
MainWindow::MainWindow(Ptr<demo::IViewModel> ViewModel)
{
InitializeComponents(ViewModel);
@@ -29,6 +29,8 @@ namespace demo
void OnCreate();
void OnDestroy();
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
void ClearViewSelection();
public:
MainWindow(Ptr<demo::IViewModel> ViewModel);
~MainWindow();
Binary file not shown.